Consider the following situation:
- In my Windows Forms appliation I have a form.
- That form has a .resx file.
- The form makes use of a class ("OtherClass") from another assembly ("Other.dll").
- "Other.dll" is built in the same VisualStudio 2010 solution as the main application (just a separate project in the same solution).
- In the main project (the Windows Forms application) I have properly added a reference to the "Other.dll" project.
Everything works well (as expected).
Now I need to change the namespace of the type contained in "Other.dll" from "Old.Namespace" to "New.Namespace":
- In VS2010, I bring up the Properties window of the "Other.dll" project
- I change the namespace in the "Default namespace" text box from "Old.Namespace" to "New.Namespace"
- I change namespaces in related .cs files accordingly
- I rebuild the modified "Other.dll" project. No errors. The modified "Other.dll" is produced OK.
Now comes the problem:
When I after this rebuild the whole solution, the compiler stops and reports that the .resx file of the form is invalid:
"Invalid Resx file. Could not load type Old.Namespace.OtherType, Other, Version 1.0.0.0, Culture=neutral, PublicKeyToken=null which is used in the .RESX file. Ensure that the necessary references have been added to your project. Line 1521, position 5"
Clearly, the .resx file still references the type with the old namespace from somewhere. That "somewhere" appers to be from inside the binary section of the .resx file!
Question: How can I make the .resx understand that it must now reference the new type (with the changed namespace)?
Please help, I really don't know how to proceed here...