tags:

views:

48

answers:

5

When I change the assembly name of my project, i.e from "Gui" to "Gui2", I get many errors during build. Most of these errors contain "xxxx could not be found (Are you missing a using directive or an assembly reference?)

What am I doing wrong?

A: 

Have you re-referenced the new DLL?

Adam
+2  A: 

You'll need to fix up all of the references to that assembly to use the new name. Depending on how you made the change, you may also need to fix up namespace references.

Jim Lamb
Actually, no other project references this assembly. This assembly is the one that references all other assemblies in my solution.
sbenderli
The problem was the namespace references. Thanks!
sbenderli
+1  A: 

Maybe you have another project in the solution that needs to update a reference to that assembly? Maybe Visual Studio also changed the namespace of the assembly when you changed its name and "using" statements throughout the project/solution need to be updated?

David
+1  A: 

Did you also change the namespace of the classes in the project?

If you did, you have to make sure that you add appropriate using directives in the source files that reference classes in the changed namespace.

LBushkin
+2  A: 
  1. If you are referencing this Assembly in any of the other projects in your solution, those will give you this error as the assembly with the old name doesn't exist anymore.

  2. If you also changed the namespace, you will have to change all the namespace references in your code as well.

If you are still unable to figure it out you can detail it to me offline at [email protected]

Prashant