Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

.NET Renaming/Refactoring

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
NigelRocks
Asked:
NigelRocks
3 Solutions
 
cdaly33Commented:
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
 
Anurag ThakurCommented:
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
 
omegaomegaDeveloperCommented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now