?
Solved

.NET Renaming/Refactoring

Posted on 2009-04-01
3
Medium Priority
?
175 Views
Last Modified: 2013-11-26
I have a .NET project that I want to copy, rename, and alter.  When I change the phrase "Department Notes" to the word "Customer" in all files, I run into problems with the compiler.  Is there a way to do this without running into all these issues?  (I'm doing this in Visual Studio 2008)
0
Comment
Question by:NigelRocks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
cdaly33 earned 800 total points
ID: 24040390
I'm not sure how many instances you need to change but it would be best to do the Replace one-by-one to make sure the replace all isn't changing something unintended such as a property, variable, or method name.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 800 total points
ID: 24040630
search and replace is not an easy taks
you need to verify that what you intend to do is correct and will not break any interface and will not break the project compilation

best approach will be to find the references for "Department Notes" in the complete project and the replace them one by one
0
 
LVL 12

Assisted Solution

by:omegaomega
omegaomega earned 400 total points
ID: 24052115
Hello, NigelRocks,

I suspect that your problem may actually with the word "Customer".  The project may already contain a Property or Method with this name.  When you globally replace another word (or phrase) with the word "Customer" these replacements may appear to be invalid references to that Property or Method.

Before doing a global replace, you must be sure that the new word is not already in use in conflicting ways.    That is (before replacing "Department Notes" one-by-one as others have suggested) I would first search for the word "Customer" to see where that is already being used.

Cheers,
Randy
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question