0

After recognizing that my project already exists under the used solutionname i decided to rename the whole solution. I need to do that because I want to share the source code on my homepage as well as the application itself and don't want it to look to users like a copy of some other project that already exist.

I changed all namespaces in every file as well as the assemblyname, the root namespace and the resourcemanager instance call from "OldName" to "NewName" like so:

resManager = new ResourceManager("NewName.Resources.Manifest", System.Reflection.Assembly.GetExecutingAssembly());

After doing that, I recompiled which worked without any errors. Unfortunately I get a runtime error with a System.Resources.MissingManifestResourceException when calling the first resManager.GetString(); method. So the application is not able to see the resources anymore. But why?

Folder structure and all the other source files did not changed. I restored my backup and figured out, that it is not possible to simply change the root namespace as well as the resourcemanager. There must be something I just do not know.

Any help would be great :-)

Here is what I'm doing:

namespace NewName
{

//...

ResourceManager resManager;
CultureInfo cultureInfo;

Settings settingsFromFile = new Settings();

settingsFromFile.readSettings();

if (settingsFromFile.Language == "german")
   cultureInfo = new CultureInfo("de");
else
   cultureInfo = new CultureInfo("en");

resManager = new ResourceManager("NewName.Resources.Manifest", System.Reflection.Assembly.GetExecutingAssembly());

//...

contextMenuStripDoFencyStuff.MenuItems.Add(resManager.GetString("contextMenuStripDoFencyStuffText",cultureInfo)); <-- this is where the exception occurs

}

The name of the resx file is "Manifest.de.resx" and "Manifest.en.resx". These files are in "ProjectFolder/Resources/".

Prisoner
  • 1,839
  • 2
  • 22
  • 38

1 Answers1

0

Ok i got it back to work. For everyone who will experience the same, here is the solution:

I started a new solution with the solution wizard. Added all Projects back to it including the Source files and compiled it.

Thats all. Seems to be a specific problem with SharpDevelop?!

Regards, Steven.