What does MissingManifestResourceException mean and how to fix it?












138















The situation:




  • I have a class library, called RT.Servers, containing a few resources (of type byte, but I don't think that's important)

  • The same class library contains a method which returns one of those resources

  • I have a simple program (with a reference to that library) that only calls that single method


I get a MissingManifestResourceException with the following message:




Could not find any resources
appropriate for the specified culture
or the neutral culture. Make sure
"Servers.Resources.resources" was
correctly embedded or linked into
assembly "RT.Servers" at compile time,
or that all the satellite assemblies
required are loadable and fully
signed.




I have never played around with cultures, or with assembly signing, so I don't know what's going on here. Also, this works in another project which uses the same library. Any ideas?










share|improve this question




















  • 2





    This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

    – rr-
    Sep 8 '15 at 9:35











  • Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

    – maxkoryukov
    Jun 29 '16 at 22:22


















138















The situation:




  • I have a class library, called RT.Servers, containing a few resources (of type byte, but I don't think that's important)

  • The same class library contains a method which returns one of those resources

  • I have a simple program (with a reference to that library) that only calls that single method


I get a MissingManifestResourceException with the following message:




Could not find any resources
appropriate for the specified culture
or the neutral culture. Make sure
"Servers.Resources.resources" was
correctly embedded or linked into
assembly "RT.Servers" at compile time,
or that all the satellite assemblies
required are loadable and fully
signed.




I have never played around with cultures, or with assembly signing, so I don't know what's going on here. Also, this works in another project which uses the same library. Any ideas?










share|improve this question




















  • 2





    This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

    – rr-
    Sep 8 '15 at 9:35











  • Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

    – maxkoryukov
    Jun 29 '16 at 22:22
















138












138








138


26






The situation:




  • I have a class library, called RT.Servers, containing a few resources (of type byte, but I don't think that's important)

  • The same class library contains a method which returns one of those resources

  • I have a simple program (with a reference to that library) that only calls that single method


I get a MissingManifestResourceException with the following message:




Could not find any resources
appropriate for the specified culture
or the neutral culture. Make sure
"Servers.Resources.resources" was
correctly embedded or linked into
assembly "RT.Servers" at compile time,
or that all the satellite assemblies
required are loadable and fully
signed.




I have never played around with cultures, or with assembly signing, so I don't know what's going on here. Also, this works in another project which uses the same library. Any ideas?










share|improve this question
















The situation:




  • I have a class library, called RT.Servers, containing a few resources (of type byte, but I don't think that's important)

  • The same class library contains a method which returns one of those resources

  • I have a simple program (with a reference to that library) that only calls that single method


I get a MissingManifestResourceException with the following message:




Could not find any resources
appropriate for the specified culture
or the neutral culture. Make sure
"Servers.Resources.resources" was
correctly embedded or linked into
assembly "RT.Servers" at compile time,
or that all the satellite assemblies
required are loadable and fully
signed.




I have never played around with cultures, or with assembly signing, so I don't know what's going on here. Also, this works in another project which uses the same library. Any ideas?







c# .net resources manifest culture






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 11 '17 at 14:50









nvoigt

50.3k85794




50.3k85794










asked Aug 25 '09 at 11:33









TimwiTimwi

47.2k25138214




47.2k25138214








  • 2





    This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

    – rr-
    Sep 8 '15 at 9:35











  • Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

    – maxkoryukov
    Jun 29 '16 at 22:22
















  • 2





    This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

    – rr-
    Sep 8 '15 at 9:35











  • Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

    – maxkoryukov
    Jun 29 '16 at 22:22










2




2





This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

– rr-
Sep 8 '15 at 9:35





This is one of the most unhelpful exceptions in .NET. It triggers in at least 3 scenarios that share nothing in common.

– rr-
Sep 8 '15 at 9:35













Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

– maxkoryukov
Jun 29 '16 at 22:22







Sorry, but it is a Microsoft way: remove all, and then add again. Works for resources, NUGET, references and connection strings. There are a lot of tools, but you will spent time for the raw files in non-usual cases...

– maxkoryukov
Jun 29 '16 at 22:22














17 Answers
17






active

oldest

votes


















221














All I needed to do to fix this problem was to right-click the Resources.resx file in the Solution Explorer and click Run Custom Tool. This re-generates the auto-generated Resources.Designer.cs file.



If the .resx file was added to the project manually, the Custom Tool property of the file must be set to "ResXFileCodeGenerator".



The problem is due to a mismatch of namespaces, which occurs if you change the "default namespace" of the assembly in the project settings. (I changed it from (previously) "Servers" to (now) "RT.Servers".)



In the auto-generated code in Resources.Designer.cs, there is the following code:



internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Servers.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}


The literal string "Servers.Resources" had to be changed to "RT.Servers.Resources". I did this manually, but running the custom tool would have equally well done it.






share|improve this answer





















  • 7





    This saved me a lot of time!

    – Eric
    May 6 '10 at 10:34






  • 12





    I love you. :-)

    – Stimul8d
    Sep 16 '10 at 12:50






  • 1





    +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

    – TrueWill
    Oct 12 '10 at 21:17






  • 1





    What if you don't have a resources.resx file?

    – ashes999
    Sep 29 '11 at 20:54











  • @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

    – RenniePet
    Aug 7 '12 at 21:41



















32














I just came across this problem today, and I found this Microsoft Help and Support page that actually did work around the problem.



I had a couple delegates at the top of my file, in the global namespace, and all of a sudden I was getting a MissingManifestResourceException when running the program, on this line:



this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


Then I moved the delegates into the namespace, got the same error. Finally I put the delegates in the only class in that file, and the error went away, but I didn't want the delegates in that class or namespace.



Then I came across that link above, which said




To resolve this problem, move all of the other class definitions so that they appear after the form's class definition.




I put the delegates (which I would not consider "class definitions") at the bottom of that file, outside of the local namespace, and the program didn't get the MissingManifestResourceException anymore. What an irritating error. But, that seems like a more robust solution than modifying the auto-generated code :)






share|improve this answer
























  • Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

    – Timwi
    Sep 5 '09 at 14:02






  • 7





    I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

    – Matt Smith
    Jul 25 '12 at 16:56






  • 2





    That worked for me, thank you!

    – niklon
    Nov 11 '13 at 18:36











  • Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

    – Gary Huckabone
    Jan 4 '18 at 20:30













  • That's the answer. Thank you.

    – Sertan Pekel
    May 3 '18 at 11:34



















23














I've run into a similar issue and, although I know it isn't the cause the OP had, I'll post it here so that if someone else runs across this problem in the future an answer will be available.



If you add a class before the designer class you will get a MissingManifestResourceException exception at runtime (no compile time error or warning) because




Visual Studio requires that designers use the first class in the file.




For (slightly) more information see this post.






share|improve this answer





















  • 10





    Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

    – RenniePet
    Mar 18 '11 at 13:07






  • 2





    Ditto - thanks for taking the time to post it here!

    – Smashery
    Mar 22 '12 at 22:14



















15














I had the same problem, but using the Run Custom Tool command as suggested by Timwi did not help in my case.



However it lead me into the right direction, because I ended up in the Properties of the .resx file. Here I noticed a difference to another .resx file that caused no problems.



In my case I had to change the property "Build Action" from "Resource" to "Embedded Resource".



My best guess for the reason is, that I had the .resx in a library that was used from another application. My application did not have its own .resx file, so it had to use the one from the library - which is only available when it's embedded in the library and not "stand alone".






share|improve this answer





















  • 2





    +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

    – Shan Plourde
    May 1 '11 at 2:31






  • 1





    Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

    – S. Baggy
    Dec 4 '13 at 12:36











  • This worked like a charm, thanks BlaM!

    – bignermo
    May 17 '17 at 9:19



















11














When I run in a similar issue, in Vs 2012, it turned out that the "Custom Tool Namespace" property of the resx file was wrong (in my case, actually, it was unset, so the generated code yeld this exception at runtime).
My final set of properties for the resx file was something like this:




  • Build action: Embedded Resource

  • Copy to Output Directory: Do not copy

  • Custom Tool: ResXFileCodeGenerator

  • Custom Tool Namespace: My.Project.S.Proper.Namespace






share|improve this answer
























  • Thanks man! This saved me!

    – ib11
    Apr 30 '16 at 4:43



















3














I ran into a different cause of this problem, which was unrelated to resx files. I had a class library where AssemblyInfo.cs contained the following:



[assembly: ThemeInfo(
ResourceDictionaryLocation.SourceAssembly,
ResourceDictionaryLocation.SourceAssembly)]


The assembly did not contain any WPF code, theme or Resource dictionaries. I got rid of the exception by removing the ThemeInfo attribute.



I did not get an actual exception, only




A first chance exception of type 'System.Resources.MissingManifestResourceException'.




Viewing exception details, the system was requesting MyAssembly.g.resources



Hope this might be of help to someone else.






share|improve this answer



















  • 2





    Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

    – Andrew Hanlon
    Nov 29 '15 at 19:30











  • Thank you. This fixed it for me.

    – Jamleck
    Apr 27 '16 at 10:01



















2














Not sure it will help people but this one worked for me :



So the issue I had was that I was getting the following message:




Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "My.Resources.Resources.resources" was correctly embedded or linked into assembly "X" at compile time, or that all the satellite assemblies required are loadable and fully signed"




I was trying to get the resources that were embedded in my project from another class library.



What I did to fix the problem was to set the Access Modifier in the tab Project->Properties->Resources from "Internal" (accessible only within the same class library) to "Public" (accessible from another class library)



Then run and voilà, no more error for me...






share|improve this answer

































    2














    Also see: MissingManifestResourceException when running tests after building with MSBuild (.mresource has path in manifest)



    I repeat the answer here just for completeness:



    It appears adding LogicalName to the project file fixes it:



    <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName> 


    i.e. so the embedded resource entry in the project file looks like this:



    <ItemGroup>
    <EmbeddedResource Include="PropertiesResources.resx">
    <Generator>ResXFileCodeGenerator</Generator>
    <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName>
    </EmbeddedResource>
    </ItemGroup>


    This is detailed in: http://blogs.msdn.com/b/msbuild/archive/2007/10/19/manifest-resource-names-changed-for-resources-files.aspx



    Note that we are using a .resx file, but the bug still appears to occur.



    Update: The problem with resources (incl. XAML) appears to be related to output paths and the use of forward or backward slashes as detailed in:
    Why does modifying project output directories cause: IOException was unhandled "Cannot locate resource 'app.xaml'."






    share|improve this answer

































      2














      The solution given by BlaM worked for me too.



      I am a VS 2013 User. After going through many fixes but no luck, I tried this:




      1. Right-click the resource file, one-by-one, in case of multiple-files.

      2. Make sure, the property "Build Action" is set to "Embedded Resource".


      That's it! :)






      share|improve this answer
























      • Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

        – Mosca Pt
        Sep 23 '16 at 5:41





















      2














      I had the same issue, but in my case i places a class in a usercontrol which is related to the usercontrol like this



      Public Class MyUserControlObject

      end Class

      Public Class MyUserCOntrol

      end Class


      The solution was to move the MyUserControlObject to the end of the Usercontrol class, like this



      Public Class MyUserCOntrol

      end Class

      Public Class MyUserControlObject

      end Class


      I hope this helps






      share|improve this answer
























      • Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

        – Adam Lewis
        Jun 1 '18 at 14:04



















      1














      I was getting the MissingManifestResourceException error after I ported my project from VS2005 to VS2010. I didn't have any other classes defined in the file that contains my Form class. And I also had my resx Resource File Name set correctly. Didn't work.



      So I deleted the resx files and regenerated them. All good now.






      share|improve this answer































        1














        Recently ran into the same problem, struggled for a bit, found this topic but no answers were correct for me.



        My issue was that when I removed main window from my WPF project (it does not have a main window), I forgot to remove StartupUri from App.xaml. I guess this exception can happen if you have a mistake in StartupUri, so in case if anybody is struggling with this - check your StartupUri in App.xaml.






        share|improve this answer































          1














          Recently stumbled upon this issue, in my case I did a few things:




          1. Make sure the namespaces are consistent in the Designer.cs file of the resx file


          2. Make sure the default namespace of the Assembly(right click the project and choose Properties) is set the same to the namespace the resources file is in.



          Once I did step 2, the exception went away.






          share|improve this answer

































            0














            Because I am pre-compiling my web application (using VS2012 publish feature). I was getting the error above. I tried all the suggestions, but weirdly changing 'Build Action' to 'Content' did the trick!






            share|improve this answer































              0














              In my case, I have a web api with resources and I create a nuget package from that. When I use this nuget in other projects, I realise that when I request a api with resources, I am getting MissingManifestResourceException after a bit reasearch, I learn nuget packager is not packing resources automatically. If you want to use resources files, you have to do that manually. So you need to add below lines to your .nuspec file:
              (Visit https://github.com/NuGet/Home/issues/1482)



              <package> 
              <metadata>
              </metadata>
              <files>
              <file src="binDebugenMyAssembly.resource.dll" target="libnet40enMyAssembly.resource.dll" />
              <file src="binDebugesMyAssembly.resource.dll" target="libnet40esMyAssembly.resource.dll" />
              </files>
              </package>


              But, before adding files, you need to be sure which version of .net you are using.






              share|improve this answer































                0














                I had the with a newly created F# project.
                The solution was to uncheck "Use standard resource names" in the project properties -> Application -> Resources / Specify how application resources will be managed.
                If you do not see the checkbox then update your Visual Studio! I have 15.6.7 installed. In 15.3.2 this checkbox is not there.






                share|improve this answer































                  -3














                  From the Microsoft support page:




                  This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.




                  To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name:



                  Resgen strings.CultureIdentifier.resx 
                  MyApp.strings.CultureIdentifier.resources





                  share|improve this answer





















                  • 1





                    Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                    – Timwi
                    Aug 25 '09 at 16:15











                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1327692%2fwhat-does-missingmanifestresourceexception-mean-and-how-to-fix-it%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  17 Answers
                  17






                  active

                  oldest

                  votes








                  17 Answers
                  17






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  221














                  All I needed to do to fix this problem was to right-click the Resources.resx file in the Solution Explorer and click Run Custom Tool. This re-generates the auto-generated Resources.Designer.cs file.



                  If the .resx file was added to the project manually, the Custom Tool property of the file must be set to "ResXFileCodeGenerator".



                  The problem is due to a mismatch of namespaces, which occurs if you change the "default namespace" of the assembly in the project settings. (I changed it from (previously) "Servers" to (now) "RT.Servers".)



                  In the auto-generated code in Resources.Designer.cs, there is the following code:



                  internal static global::System.Resources.ResourceManager ResourceManager {
                  get {
                  if (object.ReferenceEquals(resourceMan, null)) {
                  global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Servers.Resources", typeof(Resources).Assembly);
                  resourceMan = temp;
                  }
                  return resourceMan;
                  }
                  }


                  The literal string "Servers.Resources" had to be changed to "RT.Servers.Resources". I did this manually, but running the custom tool would have equally well done it.






                  share|improve this answer





















                  • 7





                    This saved me a lot of time!

                    – Eric
                    May 6 '10 at 10:34






                  • 12





                    I love you. :-)

                    – Stimul8d
                    Sep 16 '10 at 12:50






                  • 1





                    +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                    – TrueWill
                    Oct 12 '10 at 21:17






                  • 1





                    What if you don't have a resources.resx file?

                    – ashes999
                    Sep 29 '11 at 20:54











                  • @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                    – RenniePet
                    Aug 7 '12 at 21:41
















                  221














                  All I needed to do to fix this problem was to right-click the Resources.resx file in the Solution Explorer and click Run Custom Tool. This re-generates the auto-generated Resources.Designer.cs file.



                  If the .resx file was added to the project manually, the Custom Tool property of the file must be set to "ResXFileCodeGenerator".



                  The problem is due to a mismatch of namespaces, which occurs if you change the "default namespace" of the assembly in the project settings. (I changed it from (previously) "Servers" to (now) "RT.Servers".)



                  In the auto-generated code in Resources.Designer.cs, there is the following code:



                  internal static global::System.Resources.ResourceManager ResourceManager {
                  get {
                  if (object.ReferenceEquals(resourceMan, null)) {
                  global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Servers.Resources", typeof(Resources).Assembly);
                  resourceMan = temp;
                  }
                  return resourceMan;
                  }
                  }


                  The literal string "Servers.Resources" had to be changed to "RT.Servers.Resources". I did this manually, but running the custom tool would have equally well done it.






                  share|improve this answer





















                  • 7





                    This saved me a lot of time!

                    – Eric
                    May 6 '10 at 10:34






                  • 12





                    I love you. :-)

                    – Stimul8d
                    Sep 16 '10 at 12:50






                  • 1





                    +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                    – TrueWill
                    Oct 12 '10 at 21:17






                  • 1





                    What if you don't have a resources.resx file?

                    – ashes999
                    Sep 29 '11 at 20:54











                  • @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                    – RenniePet
                    Aug 7 '12 at 21:41














                  221












                  221








                  221







                  All I needed to do to fix this problem was to right-click the Resources.resx file in the Solution Explorer and click Run Custom Tool. This re-generates the auto-generated Resources.Designer.cs file.



                  If the .resx file was added to the project manually, the Custom Tool property of the file must be set to "ResXFileCodeGenerator".



                  The problem is due to a mismatch of namespaces, which occurs if you change the "default namespace" of the assembly in the project settings. (I changed it from (previously) "Servers" to (now) "RT.Servers".)



                  In the auto-generated code in Resources.Designer.cs, there is the following code:



                  internal static global::System.Resources.ResourceManager ResourceManager {
                  get {
                  if (object.ReferenceEquals(resourceMan, null)) {
                  global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Servers.Resources", typeof(Resources).Assembly);
                  resourceMan = temp;
                  }
                  return resourceMan;
                  }
                  }


                  The literal string "Servers.Resources" had to be changed to "RT.Servers.Resources". I did this manually, but running the custom tool would have equally well done it.






                  share|improve this answer















                  All I needed to do to fix this problem was to right-click the Resources.resx file in the Solution Explorer and click Run Custom Tool. This re-generates the auto-generated Resources.Designer.cs file.



                  If the .resx file was added to the project manually, the Custom Tool property of the file must be set to "ResXFileCodeGenerator".



                  The problem is due to a mismatch of namespaces, which occurs if you change the "default namespace" of the assembly in the project settings. (I changed it from (previously) "Servers" to (now) "RT.Servers".)



                  In the auto-generated code in Resources.Designer.cs, there is the following code:



                  internal static global::System.Resources.ResourceManager ResourceManager {
                  get {
                  if (object.ReferenceEquals(resourceMan, null)) {
                  global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Servers.Resources", typeof(Resources).Assembly);
                  resourceMan = temp;
                  }
                  return resourceMan;
                  }
                  }


                  The literal string "Servers.Resources" had to be changed to "RT.Servers.Resources". I did this manually, but running the custom tool would have equally well done it.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 13 '12 at 23:44

























                  answered Aug 25 '09 at 17:09









                  TimwiTimwi

                  47.2k25138214




                  47.2k25138214








                  • 7





                    This saved me a lot of time!

                    – Eric
                    May 6 '10 at 10:34






                  • 12





                    I love you. :-)

                    – Stimul8d
                    Sep 16 '10 at 12:50






                  • 1





                    +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                    – TrueWill
                    Oct 12 '10 at 21:17






                  • 1





                    What if you don't have a resources.resx file?

                    – ashes999
                    Sep 29 '11 at 20:54











                  • @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                    – RenniePet
                    Aug 7 '12 at 21:41














                  • 7





                    This saved me a lot of time!

                    – Eric
                    May 6 '10 at 10:34






                  • 12





                    I love you. :-)

                    – Stimul8d
                    Sep 16 '10 at 12:50






                  • 1





                    +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                    – TrueWill
                    Oct 12 '10 at 21:17






                  • 1





                    What if you don't have a resources.resx file?

                    – ashes999
                    Sep 29 '11 at 20:54











                  • @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                    – RenniePet
                    Aug 7 '12 at 21:41








                  7




                  7





                  This saved me a lot of time!

                  – Eric
                  May 6 '10 at 10:34





                  This saved me a lot of time!

                  – Eric
                  May 6 '10 at 10:34




                  12




                  12





                  I love you. :-)

                  – Stimul8d
                  Sep 16 '10 at 12:50





                  I love you. :-)

                  – Stimul8d
                  Sep 16 '10 at 12:50




                  1




                  1





                  +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                  – TrueWill
                  Oct 12 '10 at 21:17





                  +1! In VS 2010 the ResourceManager literal string shown above is automatically updated to the value of the Default Namespace in the project properties (Application tab), at least for WinForms.

                  – TrueWill
                  Oct 12 '10 at 21:17




                  1




                  1





                  What if you don't have a resources.resx file?

                  – ashes999
                  Sep 29 '11 at 20:54





                  What if you don't have a resources.resx file?

                  – ashes999
                  Sep 29 '11 at 20:54













                  @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                  – RenniePet
                  Aug 7 '12 at 21:41





                  @ashes999: Have you looked in the Properties folder? That's where it usually is for C# projects at least.

                  – RenniePet
                  Aug 7 '12 at 21:41













                  32














                  I just came across this problem today, and I found this Microsoft Help and Support page that actually did work around the problem.



                  I had a couple delegates at the top of my file, in the global namespace, and all of a sudden I was getting a MissingManifestResourceException when running the program, on this line:



                  this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


                  Then I moved the delegates into the namespace, got the same error. Finally I put the delegates in the only class in that file, and the error went away, but I didn't want the delegates in that class or namespace.



                  Then I came across that link above, which said




                  To resolve this problem, move all of the other class definitions so that they appear after the form's class definition.




                  I put the delegates (which I would not consider "class definitions") at the bottom of that file, outside of the local namespace, and the program didn't get the MissingManifestResourceException anymore. What an irritating error. But, that seems like a more robust solution than modifying the auto-generated code :)






                  share|improve this answer
























                  • Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                    – Timwi
                    Sep 5 '09 at 14:02






                  • 7





                    I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                    – Matt Smith
                    Jul 25 '12 at 16:56






                  • 2





                    That worked for me, thank you!

                    – niklon
                    Nov 11 '13 at 18:36











                  • Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                    – Gary Huckabone
                    Jan 4 '18 at 20:30













                  • That's the answer. Thank you.

                    – Sertan Pekel
                    May 3 '18 at 11:34
















                  32














                  I just came across this problem today, and I found this Microsoft Help and Support page that actually did work around the problem.



                  I had a couple delegates at the top of my file, in the global namespace, and all of a sudden I was getting a MissingManifestResourceException when running the program, on this line:



                  this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


                  Then I moved the delegates into the namespace, got the same error. Finally I put the delegates in the only class in that file, and the error went away, but I didn't want the delegates in that class or namespace.



                  Then I came across that link above, which said




                  To resolve this problem, move all of the other class definitions so that they appear after the form's class definition.




                  I put the delegates (which I would not consider "class definitions") at the bottom of that file, outside of the local namespace, and the program didn't get the MissingManifestResourceException anymore. What an irritating error. But, that seems like a more robust solution than modifying the auto-generated code :)






                  share|improve this answer
























                  • Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                    – Timwi
                    Sep 5 '09 at 14:02






                  • 7





                    I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                    – Matt Smith
                    Jul 25 '12 at 16:56






                  • 2





                    That worked for me, thank you!

                    – niklon
                    Nov 11 '13 at 18:36











                  • Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                    – Gary Huckabone
                    Jan 4 '18 at 20:30













                  • That's the answer. Thank you.

                    – Sertan Pekel
                    May 3 '18 at 11:34














                  32












                  32








                  32







                  I just came across this problem today, and I found this Microsoft Help and Support page that actually did work around the problem.



                  I had a couple delegates at the top of my file, in the global namespace, and all of a sudden I was getting a MissingManifestResourceException when running the program, on this line:



                  this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


                  Then I moved the delegates into the namespace, got the same error. Finally I put the delegates in the only class in that file, and the error went away, but I didn't want the delegates in that class or namespace.



                  Then I came across that link above, which said




                  To resolve this problem, move all of the other class definitions so that they appear after the form's class definition.




                  I put the delegates (which I would not consider "class definitions") at the bottom of that file, outside of the local namespace, and the program didn't get the MissingManifestResourceException anymore. What an irritating error. But, that seems like a more robust solution than modifying the auto-generated code :)






                  share|improve this answer













                  I just came across this problem today, and I found this Microsoft Help and Support page that actually did work around the problem.



                  I had a couple delegates at the top of my file, in the global namespace, and all of a sudden I was getting a MissingManifestResourceException when running the program, on this line:



                  this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


                  Then I moved the delegates into the namespace, got the same error. Finally I put the delegates in the only class in that file, and the error went away, but I didn't want the delegates in that class or namespace.



                  Then I came across that link above, which said




                  To resolve this problem, move all of the other class definitions so that they appear after the form's class definition.




                  I put the delegates (which I would not consider "class definitions") at the bottom of that file, outside of the local namespace, and the program didn't get the MissingManifestResourceException anymore. What an irritating error. But, that seems like a more robust solution than modifying the auto-generated code :)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 2 '09 at 14:36









                  Mark RushakoffMark Rushakoff

                  184k29362375




                  184k29362375













                  • Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                    – Timwi
                    Sep 5 '09 at 14:02






                  • 7





                    I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                    – Matt Smith
                    Jul 25 '12 at 16:56






                  • 2





                    That worked for me, thank you!

                    – niklon
                    Nov 11 '13 at 18:36











                  • Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                    – Gary Huckabone
                    Jan 4 '18 at 20:30













                  • That's the answer. Thank you.

                    – Sertan Pekel
                    May 3 '18 at 11:34



















                  • Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                    – Timwi
                    Sep 5 '09 at 14:02






                  • 7





                    I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                    – Matt Smith
                    Jul 25 '12 at 16:56






                  • 2





                    That worked for me, thank you!

                    – niklon
                    Nov 11 '13 at 18:36











                  • Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                    – Gary Huckabone
                    Jan 4 '18 at 20:30













                  • That's the answer. Thank you.

                    – Sertan Pekel
                    May 3 '18 at 11:34

















                  Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                  – Timwi
                  Sep 5 '09 at 14:02





                  Thanks for your answer. This sounds like you had a different problem which caused the same symptom. I didn't have any extra classes in my code, indeed I didn't even have any forms at all. I should edit my previous answer because I discovered I didn't actually need to modify the auto-generated code. I could have just re-run the code generator, and it would have fixed itself. No idea why the build process didn't do it automatically.

                  – Timwi
                  Sep 5 '09 at 14:02




                  7




                  7





                  I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                  – Matt Smith
                  Jul 25 '12 at 16:56





                  I got the error due to adding a class above the Form's class in the Form1.cs file (as discussed in the "Resolution" section of the link you provided). Thanks!

                  – Matt Smith
                  Jul 25 '12 at 16:56




                  2




                  2





                  That worked for me, thank you!

                  – niklon
                  Nov 11 '13 at 18:36





                  That worked for me, thank you!

                  – niklon
                  Nov 11 '13 at 18:36













                  Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                  – Gary Huckabone
                  Jan 4 '18 at 20:30







                  Same problem; nothing else was working so I merely deleted the line: this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 'cause I don't care about the icon in that particular form :)

                  – Gary Huckabone
                  Jan 4 '18 at 20:30















                  That's the answer. Thank you.

                  – Sertan Pekel
                  May 3 '18 at 11:34





                  That's the answer. Thank you.

                  – Sertan Pekel
                  May 3 '18 at 11:34











                  23














                  I've run into a similar issue and, although I know it isn't the cause the OP had, I'll post it here so that if someone else runs across this problem in the future an answer will be available.



                  If you add a class before the designer class you will get a MissingManifestResourceException exception at runtime (no compile time error or warning) because




                  Visual Studio requires that designers use the first class in the file.




                  For (slightly) more information see this post.






                  share|improve this answer





















                  • 10





                    Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                    – RenniePet
                    Mar 18 '11 at 13:07






                  • 2





                    Ditto - thanks for taking the time to post it here!

                    – Smashery
                    Mar 22 '12 at 22:14
















                  23














                  I've run into a similar issue and, although I know it isn't the cause the OP had, I'll post it here so that if someone else runs across this problem in the future an answer will be available.



                  If you add a class before the designer class you will get a MissingManifestResourceException exception at runtime (no compile time error or warning) because




                  Visual Studio requires that designers use the first class in the file.




                  For (slightly) more information see this post.






                  share|improve this answer





















                  • 10





                    Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                    – RenniePet
                    Mar 18 '11 at 13:07






                  • 2





                    Ditto - thanks for taking the time to post it here!

                    – Smashery
                    Mar 22 '12 at 22:14














                  23












                  23








                  23







                  I've run into a similar issue and, although I know it isn't the cause the OP had, I'll post it here so that if someone else runs across this problem in the future an answer will be available.



                  If you add a class before the designer class you will get a MissingManifestResourceException exception at runtime (no compile time error or warning) because




                  Visual Studio requires that designers use the first class in the file.




                  For (slightly) more information see this post.






                  share|improve this answer















                  I've run into a similar issue and, although I know it isn't the cause the OP had, I'll post it here so that if someone else runs across this problem in the future an answer will be available.



                  If you add a class before the designer class you will get a MissingManifestResourceException exception at runtime (no compile time error or warning) because




                  Visual Studio requires that designers use the first class in the file.




                  For (slightly) more information see this post.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 4 '16 at 14:42

























                  answered Dec 1 '10 at 12:50









                  MottiMotti

                  74.4k39157228




                  74.4k39157228








                  • 10





                    Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                    – RenniePet
                    Mar 18 '11 at 13:07






                  • 2





                    Ditto - thanks for taking the time to post it here!

                    – Smashery
                    Mar 22 '12 at 22:14














                  • 10





                    Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                    – RenniePet
                    Mar 18 '11 at 13:07






                  • 2





                    Ditto - thanks for taking the time to post it here!

                    – Smashery
                    Mar 22 '12 at 22:14








                  10




                  10





                  Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                  – RenniePet
                  Mar 18 '11 at 13:07





                  Thanks for posting this "answer". Despite it being "off topic" relative to the OP's problem, it was a good idea to post it here. A search for MissingManifestResourceException led me to this thread, and your answer was spot-on for my problem.

                  – RenniePet
                  Mar 18 '11 at 13:07




                  2




                  2





                  Ditto - thanks for taking the time to post it here!

                  – Smashery
                  Mar 22 '12 at 22:14





                  Ditto - thanks for taking the time to post it here!

                  – Smashery
                  Mar 22 '12 at 22:14











                  15














                  I had the same problem, but using the Run Custom Tool command as suggested by Timwi did not help in my case.



                  However it lead me into the right direction, because I ended up in the Properties of the .resx file. Here I noticed a difference to another .resx file that caused no problems.



                  In my case I had to change the property "Build Action" from "Resource" to "Embedded Resource".



                  My best guess for the reason is, that I had the .resx in a library that was used from another application. My application did not have its own .resx file, so it had to use the one from the library - which is only available when it's embedded in the library and not "stand alone".






                  share|improve this answer





















                  • 2





                    +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                    – Shan Plourde
                    May 1 '11 at 2:31






                  • 1





                    Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                    – S. Baggy
                    Dec 4 '13 at 12:36











                  • This worked like a charm, thanks BlaM!

                    – bignermo
                    May 17 '17 at 9:19
















                  15














                  I had the same problem, but using the Run Custom Tool command as suggested by Timwi did not help in my case.



                  However it lead me into the right direction, because I ended up in the Properties of the .resx file. Here I noticed a difference to another .resx file that caused no problems.



                  In my case I had to change the property "Build Action" from "Resource" to "Embedded Resource".



                  My best guess for the reason is, that I had the .resx in a library that was used from another application. My application did not have its own .resx file, so it had to use the one from the library - which is only available when it's embedded in the library and not "stand alone".






                  share|improve this answer





















                  • 2





                    +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                    – Shan Plourde
                    May 1 '11 at 2:31






                  • 1





                    Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                    – S. Baggy
                    Dec 4 '13 at 12:36











                  • This worked like a charm, thanks BlaM!

                    – bignermo
                    May 17 '17 at 9:19














                  15












                  15








                  15







                  I had the same problem, but using the Run Custom Tool command as suggested by Timwi did not help in my case.



                  However it lead me into the right direction, because I ended up in the Properties of the .resx file. Here I noticed a difference to another .resx file that caused no problems.



                  In my case I had to change the property "Build Action" from "Resource" to "Embedded Resource".



                  My best guess for the reason is, that I had the .resx in a library that was used from another application. My application did not have its own .resx file, so it had to use the one from the library - which is only available when it's embedded in the library and not "stand alone".






                  share|improve this answer















                  I had the same problem, but using the Run Custom Tool command as suggested by Timwi did not help in my case.



                  However it lead me into the right direction, because I ended up in the Properties of the .resx file. Here I noticed a difference to another .resx file that caused no problems.



                  In my case I had to change the property "Build Action" from "Resource" to "Embedded Resource".



                  My best guess for the reason is, that I had the .resx in a library that was used from another application. My application did not have its own .resx file, so it had to use the one from the library - which is only available when it's embedded in the library and not "stand alone".







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 23 '17 at 12:18









                  Community

                  11




                  11










                  answered Sep 8 '10 at 9:58









                  BlaMBlaM

                  17k2984101




                  17k2984101








                  • 2





                    +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                    – Shan Plourde
                    May 1 '11 at 2:31






                  • 1





                    Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                    – S. Baggy
                    Dec 4 '13 at 12:36











                  • This worked like a charm, thanks BlaM!

                    – bignermo
                    May 17 '17 at 9:19














                  • 2





                    +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                    – Shan Plourde
                    May 1 '11 at 2:31






                  • 1





                    Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                    – S. Baggy
                    Dec 4 '13 at 12:36











                  • This worked like a charm, thanks BlaM!

                    – bignermo
                    May 17 '17 at 9:19








                  2




                  2





                  +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                  – Shan Plourde
                  May 1 '11 at 2:31





                  +1 thanks, I double-checked my resource files which are also in a separate library that is referenced by other applications. I had Build Action set to Content, and after changing it to Embedded Resource, all worked well. Silly oversight

                  – Shan Plourde
                  May 1 '11 at 2:31




                  1




                  1





                  Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                  – S. Baggy
                  Dec 4 '13 at 12:36





                  Thanks! This worked for me where I had some text files containing content for either testing, or some business mapping rules. Changing from Content to Embedded Resource fixed the problem.

                  – S. Baggy
                  Dec 4 '13 at 12:36













                  This worked like a charm, thanks BlaM!

                  – bignermo
                  May 17 '17 at 9:19





                  This worked like a charm, thanks BlaM!

                  – bignermo
                  May 17 '17 at 9:19











                  11














                  When I run in a similar issue, in Vs 2012, it turned out that the "Custom Tool Namespace" property of the resx file was wrong (in my case, actually, it was unset, so the generated code yeld this exception at runtime).
                  My final set of properties for the resx file was something like this:




                  • Build action: Embedded Resource

                  • Copy to Output Directory: Do not copy

                  • Custom Tool: ResXFileCodeGenerator

                  • Custom Tool Namespace: My.Project.S.Proper.Namespace






                  share|improve this answer
























                  • Thanks man! This saved me!

                    – ib11
                    Apr 30 '16 at 4:43
















                  11














                  When I run in a similar issue, in Vs 2012, it turned out that the "Custom Tool Namespace" property of the resx file was wrong (in my case, actually, it was unset, so the generated code yeld this exception at runtime).
                  My final set of properties for the resx file was something like this:




                  • Build action: Embedded Resource

                  • Copy to Output Directory: Do not copy

                  • Custom Tool: ResXFileCodeGenerator

                  • Custom Tool Namespace: My.Project.S.Proper.Namespace






                  share|improve this answer
























                  • Thanks man! This saved me!

                    – ib11
                    Apr 30 '16 at 4:43














                  11












                  11








                  11







                  When I run in a similar issue, in Vs 2012, it turned out that the "Custom Tool Namespace" property of the resx file was wrong (in my case, actually, it was unset, so the generated code yeld this exception at runtime).
                  My final set of properties for the resx file was something like this:




                  • Build action: Embedded Resource

                  • Copy to Output Directory: Do not copy

                  • Custom Tool: ResXFileCodeGenerator

                  • Custom Tool Namespace: My.Project.S.Proper.Namespace






                  share|improve this answer













                  When I run in a similar issue, in Vs 2012, it turned out that the "Custom Tool Namespace" property of the resx file was wrong (in my case, actually, it was unset, so the generated code yeld this exception at runtime).
                  My final set of properties for the resx file was something like this:




                  • Build action: Embedded Resource

                  • Copy to Output Directory: Do not copy

                  • Custom Tool: ResXFileCodeGenerator

                  • Custom Tool Namespace: My.Project.S.Proper.Namespace







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 22 '14 at 7:53









                  Starnuto di topoStarnuto di topo

                  1,08611331




                  1,08611331













                  • Thanks man! This saved me!

                    – ib11
                    Apr 30 '16 at 4:43



















                  • Thanks man! This saved me!

                    – ib11
                    Apr 30 '16 at 4:43

















                  Thanks man! This saved me!

                  – ib11
                  Apr 30 '16 at 4:43





                  Thanks man! This saved me!

                  – ib11
                  Apr 30 '16 at 4:43











                  3














                  I ran into a different cause of this problem, which was unrelated to resx files. I had a class library where AssemblyInfo.cs contained the following:



                  [assembly: ThemeInfo(
                  ResourceDictionaryLocation.SourceAssembly,
                  ResourceDictionaryLocation.SourceAssembly)]


                  The assembly did not contain any WPF code, theme or Resource dictionaries. I got rid of the exception by removing the ThemeInfo attribute.



                  I did not get an actual exception, only




                  A first chance exception of type 'System.Resources.MissingManifestResourceException'.




                  Viewing exception details, the system was requesting MyAssembly.g.resources



                  Hope this might be of help to someone else.






                  share|improve this answer



















                  • 2





                    Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                    – Andrew Hanlon
                    Nov 29 '15 at 19:30











                  • Thank you. This fixed it for me.

                    – Jamleck
                    Apr 27 '16 at 10:01
















                  3














                  I ran into a different cause of this problem, which was unrelated to resx files. I had a class library where AssemblyInfo.cs contained the following:



                  [assembly: ThemeInfo(
                  ResourceDictionaryLocation.SourceAssembly,
                  ResourceDictionaryLocation.SourceAssembly)]


                  The assembly did not contain any WPF code, theme or Resource dictionaries. I got rid of the exception by removing the ThemeInfo attribute.



                  I did not get an actual exception, only




                  A first chance exception of type 'System.Resources.MissingManifestResourceException'.




                  Viewing exception details, the system was requesting MyAssembly.g.resources



                  Hope this might be of help to someone else.






                  share|improve this answer



















                  • 2





                    Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                    – Andrew Hanlon
                    Nov 29 '15 at 19:30











                  • Thank you. This fixed it for me.

                    – Jamleck
                    Apr 27 '16 at 10:01














                  3












                  3








                  3







                  I ran into a different cause of this problem, which was unrelated to resx files. I had a class library where AssemblyInfo.cs contained the following:



                  [assembly: ThemeInfo(
                  ResourceDictionaryLocation.SourceAssembly,
                  ResourceDictionaryLocation.SourceAssembly)]


                  The assembly did not contain any WPF code, theme or Resource dictionaries. I got rid of the exception by removing the ThemeInfo attribute.



                  I did not get an actual exception, only




                  A first chance exception of type 'System.Resources.MissingManifestResourceException'.




                  Viewing exception details, the system was requesting MyAssembly.g.resources



                  Hope this might be of help to someone else.






                  share|improve this answer













                  I ran into a different cause of this problem, which was unrelated to resx files. I had a class library where AssemblyInfo.cs contained the following:



                  [assembly: ThemeInfo(
                  ResourceDictionaryLocation.SourceAssembly,
                  ResourceDictionaryLocation.SourceAssembly)]


                  The assembly did not contain any WPF code, theme or Resource dictionaries. I got rid of the exception by removing the ThemeInfo attribute.



                  I did not get an actual exception, only




                  A first chance exception of type 'System.Resources.MissingManifestResourceException'.




                  Viewing exception details, the system was requesting MyAssembly.g.resources



                  Hope this might be of help to someone else.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 18 '15 at 19:56









                  bigfootbigfoot

                  323311




                  323311








                  • 2





                    Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                    – Andrew Hanlon
                    Nov 29 '15 at 19:30











                  • Thank you. This fixed it for me.

                    – Jamleck
                    Apr 27 '16 at 10:01














                  • 2





                    Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                    – Andrew Hanlon
                    Nov 29 '15 at 19:30











                  • Thank you. This fixed it for me.

                    – Jamleck
                    Apr 27 '16 at 10:01








                  2




                  2





                  Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                  – Andrew Hanlon
                  Nov 29 '15 at 19:30





                  Thank you for this! Exactly the fix I needed! Happens when you accidentally create a ViewModel project as a Control library.

                  – Andrew Hanlon
                  Nov 29 '15 at 19:30













                  Thank you. This fixed it for me.

                  – Jamleck
                  Apr 27 '16 at 10:01





                  Thank you. This fixed it for me.

                  – Jamleck
                  Apr 27 '16 at 10:01











                  2














                  Not sure it will help people but this one worked for me :



                  So the issue I had was that I was getting the following message:




                  Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "My.Resources.Resources.resources" was correctly embedded or linked into assembly "X" at compile time, or that all the satellite assemblies required are loadable and fully signed"




                  I was trying to get the resources that were embedded in my project from another class library.



                  What I did to fix the problem was to set the Access Modifier in the tab Project->Properties->Resources from "Internal" (accessible only within the same class library) to "Public" (accessible from another class library)



                  Then run and voilà, no more error for me...






                  share|improve this answer






























                    2














                    Not sure it will help people but this one worked for me :



                    So the issue I had was that I was getting the following message:




                    Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "My.Resources.Resources.resources" was correctly embedded or linked into assembly "X" at compile time, or that all the satellite assemblies required are loadable and fully signed"




                    I was trying to get the resources that were embedded in my project from another class library.



                    What I did to fix the problem was to set the Access Modifier in the tab Project->Properties->Resources from "Internal" (accessible only within the same class library) to "Public" (accessible from another class library)



                    Then run and voilà, no more error for me...






                    share|improve this answer




























                      2












                      2








                      2







                      Not sure it will help people but this one worked for me :



                      So the issue I had was that I was getting the following message:




                      Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "My.Resources.Resources.resources" was correctly embedded or linked into assembly "X" at compile time, or that all the satellite assemblies required are loadable and fully signed"




                      I was trying to get the resources that were embedded in my project from another class library.



                      What I did to fix the problem was to set the Access Modifier in the tab Project->Properties->Resources from "Internal" (accessible only within the same class library) to "Public" (accessible from another class library)



                      Then run and voilà, no more error for me...






                      share|improve this answer















                      Not sure it will help people but this one worked for me :



                      So the issue I had was that I was getting the following message:




                      Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "My.Resources.Resources.resources" was correctly embedded or linked into assembly "X" at compile time, or that all the satellite assemblies required are loadable and fully signed"




                      I was trying to get the resources that were embedded in my project from another class library.



                      What I did to fix the problem was to set the Access Modifier in the tab Project->Properties->Resources from "Internal" (accessible only within the same class library) to "Public" (accessible from another class library)



                      Then run and voilà, no more error for me...







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jan 30 '14 at 14:13









                      Timwi

                      47.2k25138214




                      47.2k25138214










                      answered Jan 30 '14 at 6:25









                      codingismylifecodingismylife

                      8712




                      8712























                          2














                          Also see: MissingManifestResourceException when running tests after building with MSBuild (.mresource has path in manifest)



                          I repeat the answer here just for completeness:



                          It appears adding LogicalName to the project file fixes it:



                          <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName> 


                          i.e. so the embedded resource entry in the project file looks like this:



                          <ItemGroup>
                          <EmbeddedResource Include="PropertiesResources.resx">
                          <Generator>ResXFileCodeGenerator</Generator>
                          <LastGenOutput>Resources.Designer.cs</LastGenOutput>
                          <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName>
                          </EmbeddedResource>
                          </ItemGroup>


                          This is detailed in: http://blogs.msdn.com/b/msbuild/archive/2007/10/19/manifest-resource-names-changed-for-resources-files.aspx



                          Note that we are using a .resx file, but the bug still appears to occur.



                          Update: The problem with resources (incl. XAML) appears to be related to output paths and the use of forward or backward slashes as detailed in:
                          Why does modifying project output directories cause: IOException was unhandled "Cannot locate resource 'app.xaml'."






                          share|improve this answer






























                            2














                            Also see: MissingManifestResourceException when running tests after building with MSBuild (.mresource has path in manifest)



                            I repeat the answer here just for completeness:



                            It appears adding LogicalName to the project file fixes it:



                            <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName> 


                            i.e. so the embedded resource entry in the project file looks like this:



                            <ItemGroup>
                            <EmbeddedResource Include="PropertiesResources.resx">
                            <Generator>ResXFileCodeGenerator</Generator>
                            <LastGenOutput>Resources.Designer.cs</LastGenOutput>
                            <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName>
                            </EmbeddedResource>
                            </ItemGroup>


                            This is detailed in: http://blogs.msdn.com/b/msbuild/archive/2007/10/19/manifest-resource-names-changed-for-resources-files.aspx



                            Note that we are using a .resx file, but the bug still appears to occur.



                            Update: The problem with resources (incl. XAML) appears to be related to output paths and the use of forward or backward slashes as detailed in:
                            Why does modifying project output directories cause: IOException was unhandled "Cannot locate resource 'app.xaml'."






                            share|improve this answer




























                              2












                              2








                              2







                              Also see: MissingManifestResourceException when running tests after building with MSBuild (.mresource has path in manifest)



                              I repeat the answer here just for completeness:



                              It appears adding LogicalName to the project file fixes it:



                              <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName> 


                              i.e. so the embedded resource entry in the project file looks like this:



                              <ItemGroup>
                              <EmbeddedResource Include="PropertiesResources.resx">
                              <Generator>ResXFileCodeGenerator</Generator>
                              <LastGenOutput>Resources.Designer.cs</LastGenOutput>
                              <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName>
                              </EmbeddedResource>
                              </ItemGroup>


                              This is detailed in: http://blogs.msdn.com/b/msbuild/archive/2007/10/19/manifest-resource-names-changed-for-resources-files.aspx



                              Note that we are using a .resx file, but the bug still appears to occur.



                              Update: The problem with resources (incl. XAML) appears to be related to output paths and the use of forward or backward slashes as detailed in:
                              Why does modifying project output directories cause: IOException was unhandled "Cannot locate resource 'app.xaml'."






                              share|improve this answer















                              Also see: MissingManifestResourceException when running tests after building with MSBuild (.mresource has path in manifest)



                              I repeat the answer here just for completeness:



                              It appears adding LogicalName to the project file fixes it:



                              <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName> 


                              i.e. so the embedded resource entry in the project file looks like this:



                              <ItemGroup>
                              <EmbeddedResource Include="PropertiesResources.resx">
                              <Generator>ResXFileCodeGenerator</Generator>
                              <LastGenOutput>Resources.Designer.cs</LastGenOutput>
                              <LogicalName>$(RootNamespace).Properties.Resources.resources</LogicalName>
                              </EmbeddedResource>
                              </ItemGroup>


                              This is detailed in: http://blogs.msdn.com/b/msbuild/archive/2007/10/19/manifest-resource-names-changed-for-resources-files.aspx



                              Note that we are using a .resx file, but the bug still appears to occur.



                              Update: The problem with resources (incl. XAML) appears to be related to output paths and the use of forward or backward slashes as detailed in:
                              Why does modifying project output directories cause: IOException was unhandled "Cannot locate resource 'app.xaml'."







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited May 23 '17 at 12:10









                              Community

                              11




                              11










                              answered Dec 19 '12 at 15:02









                              nietrasnietras

                              2,73812531




                              2,73812531























                                  2














                                  The solution given by BlaM worked for me too.



                                  I am a VS 2013 User. After going through many fixes but no luck, I tried this:




                                  1. Right-click the resource file, one-by-one, in case of multiple-files.

                                  2. Make sure, the property "Build Action" is set to "Embedded Resource".


                                  That's it! :)






                                  share|improve this answer
























                                  • Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                    – Mosca Pt
                                    Sep 23 '16 at 5:41


















                                  2














                                  The solution given by BlaM worked for me too.



                                  I am a VS 2013 User. After going through many fixes but no luck, I tried this:




                                  1. Right-click the resource file, one-by-one, in case of multiple-files.

                                  2. Make sure, the property "Build Action" is set to "Embedded Resource".


                                  That's it! :)






                                  share|improve this answer
























                                  • Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                    – Mosca Pt
                                    Sep 23 '16 at 5:41
















                                  2












                                  2








                                  2







                                  The solution given by BlaM worked for me too.



                                  I am a VS 2013 User. After going through many fixes but no luck, I tried this:




                                  1. Right-click the resource file, one-by-one, in case of multiple-files.

                                  2. Make sure, the property "Build Action" is set to "Embedded Resource".


                                  That's it! :)






                                  share|improve this answer













                                  The solution given by BlaM worked for me too.



                                  I am a VS 2013 User. After going through many fixes but no luck, I tried this:




                                  1. Right-click the resource file, one-by-one, in case of multiple-files.

                                  2. Make sure, the property "Build Action" is set to "Embedded Resource".


                                  That's it! :)







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Aug 10 '16 at 18:09









                                  JitenJiten

                                  14714




                                  14714













                                  • Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                    – Mosca Pt
                                    Sep 23 '16 at 5:41





















                                  • Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                    – Mosca Pt
                                    Sep 23 '16 at 5:41



















                                  Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                  – Mosca Pt
                                  Sep 23 '16 at 5:41







                                  Confirming this. I have a working project but needed to maintain the resource assemblies separatly, so tried flipping from "Embedded Resource" to simply "Resource" and ended up getting the MissingResourceManifestException.

                                  – Mosca Pt
                                  Sep 23 '16 at 5:41













                                  2














                                  I had the same issue, but in my case i places a class in a usercontrol which is related to the usercontrol like this



                                  Public Class MyUserControlObject

                                  end Class

                                  Public Class MyUserCOntrol

                                  end Class


                                  The solution was to move the MyUserControlObject to the end of the Usercontrol class, like this



                                  Public Class MyUserCOntrol

                                  end Class

                                  Public Class MyUserControlObject

                                  end Class


                                  I hope this helps






                                  share|improve this answer
























                                  • Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                    – Adam Lewis
                                    Jun 1 '18 at 14:04
















                                  2














                                  I had the same issue, but in my case i places a class in a usercontrol which is related to the usercontrol like this



                                  Public Class MyUserControlObject

                                  end Class

                                  Public Class MyUserCOntrol

                                  end Class


                                  The solution was to move the MyUserControlObject to the end of the Usercontrol class, like this



                                  Public Class MyUserCOntrol

                                  end Class

                                  Public Class MyUserControlObject

                                  end Class


                                  I hope this helps






                                  share|improve this answer
























                                  • Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                    – Adam Lewis
                                    Jun 1 '18 at 14:04














                                  2












                                  2








                                  2







                                  I had the same issue, but in my case i places a class in a usercontrol which is related to the usercontrol like this



                                  Public Class MyUserControlObject

                                  end Class

                                  Public Class MyUserCOntrol

                                  end Class


                                  The solution was to move the MyUserControlObject to the end of the Usercontrol class, like this



                                  Public Class MyUserCOntrol

                                  end Class

                                  Public Class MyUserControlObject

                                  end Class


                                  I hope this helps






                                  share|improve this answer













                                  I had the same issue, but in my case i places a class in a usercontrol which is related to the usercontrol like this



                                  Public Class MyUserControlObject

                                  end Class

                                  Public Class MyUserCOntrol

                                  end Class


                                  The solution was to move the MyUserControlObject to the end of the Usercontrol class, like this



                                  Public Class MyUserCOntrol

                                  end Class

                                  Public Class MyUserControlObject

                                  end Class


                                  I hope this helps







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Aug 12 '16 at 9:03









                                  SmithSmith

                                  3,0371280138




                                  3,0371280138













                                  • Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                    – Adam Lewis
                                    Jun 1 '18 at 14:04



















                                  • Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                    – Adam Lewis
                                    Jun 1 '18 at 14:04

















                                  Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                  – Adam Lewis
                                  Jun 1 '18 at 14:04





                                  Talk about a crappy error description... I added a helper class to the main form's CS file. Never would I have guessed the error message would link back to this. Thanks!

                                  – Adam Lewis
                                  Jun 1 '18 at 14:04











                                  1














                                  I was getting the MissingManifestResourceException error after I ported my project from VS2005 to VS2010. I didn't have any other classes defined in the file that contains my Form class. And I also had my resx Resource File Name set correctly. Didn't work.



                                  So I deleted the resx files and regenerated them. All good now.






                                  share|improve this answer




























                                    1














                                    I was getting the MissingManifestResourceException error after I ported my project from VS2005 to VS2010. I didn't have any other classes defined in the file that contains my Form class. And I also had my resx Resource File Name set correctly. Didn't work.



                                    So I deleted the resx files and regenerated them. All good now.






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      I was getting the MissingManifestResourceException error after I ported my project from VS2005 to VS2010. I didn't have any other classes defined in the file that contains my Form class. And I also had my resx Resource File Name set correctly. Didn't work.



                                      So I deleted the resx files and regenerated them. All good now.






                                      share|improve this answer













                                      I was getting the MissingManifestResourceException error after I ported my project from VS2005 to VS2010. I didn't have any other classes defined in the file that contains my Form class. And I also had my resx Resource File Name set correctly. Didn't work.



                                      So I deleted the resx files and regenerated them. All good now.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Apr 8 '11 at 18:12









                                      WinstonWinston

                                      111




                                      111























                                          1














                                          Recently ran into the same problem, struggled for a bit, found this topic but no answers were correct for me.



                                          My issue was that when I removed main window from my WPF project (it does not have a main window), I forgot to remove StartupUri from App.xaml. I guess this exception can happen if you have a mistake in StartupUri, so in case if anybody is struggling with this - check your StartupUri in App.xaml.






                                          share|improve this answer




























                                            1














                                            Recently ran into the same problem, struggled for a bit, found this topic but no answers were correct for me.



                                            My issue was that when I removed main window from my WPF project (it does not have a main window), I forgot to remove StartupUri from App.xaml. I guess this exception can happen if you have a mistake in StartupUri, so in case if anybody is struggling with this - check your StartupUri in App.xaml.






                                            share|improve this answer


























                                              1












                                              1








                                              1







                                              Recently ran into the same problem, struggled for a bit, found this topic but no answers were correct for me.



                                              My issue was that when I removed main window from my WPF project (it does not have a main window), I forgot to remove StartupUri from App.xaml. I guess this exception can happen if you have a mistake in StartupUri, so in case if anybody is struggling with this - check your StartupUri in App.xaml.






                                              share|improve this answer













                                              Recently ran into the same problem, struggled for a bit, found this topic but no answers were correct for me.



                                              My issue was that when I removed main window from my WPF project (it does not have a main window), I forgot to remove StartupUri from App.xaml. I guess this exception can happen if you have a mistake in StartupUri, so in case if anybody is struggling with this - check your StartupUri in App.xaml.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Jan 8 '16 at 9:15









                                              ArchegArcheg

                                              5,30932558




                                              5,30932558























                                                  1














                                                  Recently stumbled upon this issue, in my case I did a few things:




                                                  1. Make sure the namespaces are consistent in the Designer.cs file of the resx file


                                                  2. Make sure the default namespace of the Assembly(right click the project and choose Properties) is set the same to the namespace the resources file is in.



                                                  Once I did step 2, the exception went away.






                                                  share|improve this answer






























                                                    1














                                                    Recently stumbled upon this issue, in my case I did a few things:




                                                    1. Make sure the namespaces are consistent in the Designer.cs file of the resx file


                                                    2. Make sure the default namespace of the Assembly(right click the project and choose Properties) is set the same to the namespace the resources file is in.



                                                    Once I did step 2, the exception went away.






                                                    share|improve this answer




























                                                      1












                                                      1








                                                      1







                                                      Recently stumbled upon this issue, in my case I did a few things:




                                                      1. Make sure the namespaces are consistent in the Designer.cs file of the resx file


                                                      2. Make sure the default namespace of the Assembly(right click the project and choose Properties) is set the same to the namespace the resources file is in.



                                                      Once I did step 2, the exception went away.






                                                      share|improve this answer















                                                      Recently stumbled upon this issue, in my case I did a few things:




                                                      1. Make sure the namespaces are consistent in the Designer.cs file of the resx file


                                                      2. Make sure the default namespace of the Assembly(right click the project and choose Properties) is set the same to the namespace the resources file is in.



                                                      Once I did step 2, the exception went away.







                                                      share|improve this answer














                                                      share|improve this answer



                                                      share|improve this answer








                                                      edited Jan 26 '18 at 3:25









                                                      Stephen Rauch

                                                      30k153758




                                                      30k153758










                                                      answered Jan 26 '18 at 3:06









                                                      stormtrooperstormtrooper

                                                      509




                                                      509























                                                          0














                                                          Because I am pre-compiling my web application (using VS2012 publish feature). I was getting the error above. I tried all the suggestions, but weirdly changing 'Build Action' to 'Content' did the trick!






                                                          share|improve this answer




























                                                            0














                                                            Because I am pre-compiling my web application (using VS2012 publish feature). I was getting the error above. I tried all the suggestions, but weirdly changing 'Build Action' to 'Content' did the trick!






                                                            share|improve this answer


























                                                              0












                                                              0








                                                              0







                                                              Because I am pre-compiling my web application (using VS2012 publish feature). I was getting the error above. I tried all the suggestions, but weirdly changing 'Build Action' to 'Content' did the trick!






                                                              share|improve this answer













                                                              Because I am pre-compiling my web application (using VS2012 publish feature). I was getting the error above. I tried all the suggestions, but weirdly changing 'Build Action' to 'Content' did the trick!







                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered Apr 29 '13 at 3:37









                                                              MarkiveMarkive

                                                              1,92111923




                                                              1,92111923























                                                                  0














                                                                  In my case, I have a web api with resources and I create a nuget package from that. When I use this nuget in other projects, I realise that when I request a api with resources, I am getting MissingManifestResourceException after a bit reasearch, I learn nuget packager is not packing resources automatically. If you want to use resources files, you have to do that manually. So you need to add below lines to your .nuspec file:
                                                                  (Visit https://github.com/NuGet/Home/issues/1482)



                                                                  <package> 
                                                                  <metadata>
                                                                  </metadata>
                                                                  <files>
                                                                  <file src="binDebugenMyAssembly.resource.dll" target="libnet40enMyAssembly.resource.dll" />
                                                                  <file src="binDebugesMyAssembly.resource.dll" target="libnet40esMyAssembly.resource.dll" />
                                                                  </files>
                                                                  </package>


                                                                  But, before adding files, you need to be sure which version of .net you are using.






                                                                  share|improve this answer




























                                                                    0














                                                                    In my case, I have a web api with resources and I create a nuget package from that. When I use this nuget in other projects, I realise that when I request a api with resources, I am getting MissingManifestResourceException after a bit reasearch, I learn nuget packager is not packing resources automatically. If you want to use resources files, you have to do that manually. So you need to add below lines to your .nuspec file:
                                                                    (Visit https://github.com/NuGet/Home/issues/1482)



                                                                    <package> 
                                                                    <metadata>
                                                                    </metadata>
                                                                    <files>
                                                                    <file src="binDebugenMyAssembly.resource.dll" target="libnet40enMyAssembly.resource.dll" />
                                                                    <file src="binDebugesMyAssembly.resource.dll" target="libnet40esMyAssembly.resource.dll" />
                                                                    </files>
                                                                    </package>


                                                                    But, before adding files, you need to be sure which version of .net you are using.






                                                                    share|improve this answer


























                                                                      0












                                                                      0








                                                                      0







                                                                      In my case, I have a web api with resources and I create a nuget package from that. When I use this nuget in other projects, I realise that when I request a api with resources, I am getting MissingManifestResourceException after a bit reasearch, I learn nuget packager is not packing resources automatically. If you want to use resources files, you have to do that manually. So you need to add below lines to your .nuspec file:
                                                                      (Visit https://github.com/NuGet/Home/issues/1482)



                                                                      <package> 
                                                                      <metadata>
                                                                      </metadata>
                                                                      <files>
                                                                      <file src="binDebugenMyAssembly.resource.dll" target="libnet40enMyAssembly.resource.dll" />
                                                                      <file src="binDebugesMyAssembly.resource.dll" target="libnet40esMyAssembly.resource.dll" />
                                                                      </files>
                                                                      </package>


                                                                      But, before adding files, you need to be sure which version of .net you are using.






                                                                      share|improve this answer













                                                                      In my case, I have a web api with resources and I create a nuget package from that. When I use this nuget in other projects, I realise that when I request a api with resources, I am getting MissingManifestResourceException after a bit reasearch, I learn nuget packager is not packing resources automatically. If you want to use resources files, you have to do that manually. So you need to add below lines to your .nuspec file:
                                                                      (Visit https://github.com/NuGet/Home/issues/1482)



                                                                      <package> 
                                                                      <metadata>
                                                                      </metadata>
                                                                      <files>
                                                                      <file src="binDebugenMyAssembly.resource.dll" target="libnet40enMyAssembly.resource.dll" />
                                                                      <file src="binDebugesMyAssembly.resource.dll" target="libnet40esMyAssembly.resource.dll" />
                                                                      </files>
                                                                      </package>


                                                                      But, before adding files, you need to be sure which version of .net you are using.







                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Jan 24 '18 at 12:14









                                                                      dcydcy

                                                                      112




                                                                      112























                                                                          0














                                                                          I had the with a newly created F# project.
                                                                          The solution was to uncheck "Use standard resource names" in the project properties -> Application -> Resources / Specify how application resources will be managed.
                                                                          If you do not see the checkbox then update your Visual Studio! I have 15.6.7 installed. In 15.3.2 this checkbox is not there.






                                                                          share|improve this answer




























                                                                            0














                                                                            I had the with a newly created F# project.
                                                                            The solution was to uncheck "Use standard resource names" in the project properties -> Application -> Resources / Specify how application resources will be managed.
                                                                            If you do not see the checkbox then update your Visual Studio! I have 15.6.7 installed. In 15.3.2 this checkbox is not there.






                                                                            share|improve this answer


























                                                                              0












                                                                              0








                                                                              0







                                                                              I had the with a newly created F# project.
                                                                              The solution was to uncheck "Use standard resource names" in the project properties -> Application -> Resources / Specify how application resources will be managed.
                                                                              If you do not see the checkbox then update your Visual Studio! I have 15.6.7 installed. In 15.3.2 this checkbox is not there.






                                                                              share|improve this answer













                                                                              I had the with a newly created F# project.
                                                                              The solution was to uncheck "Use standard resource names" in the project properties -> Application -> Resources / Specify how application resources will be managed.
                                                                              If you do not see the checkbox then update your Visual Studio! I have 15.6.7 installed. In 15.3.2 this checkbox is not there.







                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Apr 27 '18 at 8:32









                                                                              KCTKCT

                                                                              1629




                                                                              1629























                                                                                  -3














                                                                                  From the Microsoft support page:




                                                                                  This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.




                                                                                  To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name:



                                                                                  Resgen strings.CultureIdentifier.resx 
                                                                                  MyApp.strings.CultureIdentifier.resources





                                                                                  share|improve this answer





















                                                                                  • 1





                                                                                    Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                    – Timwi
                                                                                    Aug 25 '09 at 16:15
















                                                                                  -3














                                                                                  From the Microsoft support page:




                                                                                  This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.




                                                                                  To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name:



                                                                                  Resgen strings.CultureIdentifier.resx 
                                                                                  MyApp.strings.CultureIdentifier.resources





                                                                                  share|improve this answer





















                                                                                  • 1





                                                                                    Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                    – Timwi
                                                                                    Aug 25 '09 at 16:15














                                                                                  -3












                                                                                  -3








                                                                                  -3







                                                                                  From the Microsoft support page:




                                                                                  This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.




                                                                                  To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name:



                                                                                  Resgen strings.CultureIdentifier.resx 
                                                                                  MyApp.strings.CultureIdentifier.resources





                                                                                  share|improve this answer















                                                                                  From the Microsoft support page:




                                                                                  This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file that has an inappropriate file name. This problem typically occurs if you manually create a satellite assembly.




                                                                                  To work around this problem, specify the file name of the .resources file when you run Resgen.exe. While you specify the file name of the .resources file, make sure that the file name starts with the namespace name of your application. For example, run the following command at the Microsoft Visual Studio .NET command prompt to create a .resources file that has the namespace name of your application at the beginning of the file name:



                                                                                  Resgen strings.CultureIdentifier.resx 
                                                                                  MyApp.strings.CultureIdentifier.resources






                                                                                  share|improve this answer














                                                                                  share|improve this answer



                                                                                  share|improve this answer








                                                                                  edited Dec 5 '13 at 2:50









                                                                                  Ry-

                                                                                  170k40346362




                                                                                  170k40346362










                                                                                  answered Aug 25 '09 at 11:45









                                                                                  TheVillageIdiotTheVillageIdiot

                                                                                  32.6k14111170




                                                                                  32.6k14111170








                                                                                  • 1





                                                                                    Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                    – Timwi
                                                                                    Aug 25 '09 at 16:15














                                                                                  • 1





                                                                                    Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                    – Timwi
                                                                                    Aug 25 '09 at 16:15








                                                                                  1




                                                                                  1





                                                                                  Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                  – Timwi
                                                                                  Aug 25 '09 at 16:15





                                                                                  Thanks for your response, but I don't know what ResGen.exe is, I've never used it, and frankly I don't want to use it because I'm not trying to use anything fancy. Surely there must be a way to fix this from Visual Studio? For example, since you say the resource is "localized", how do I declare a resource as non-localized? Thanks again.

                                                                                  – Timwi
                                                                                  Aug 25 '09 at 16:15


















                                                                                  draft saved

                                                                                  draft discarded




















































                                                                                  Thanks for contributing an answer to Stack Overflow!


                                                                                  • Please be sure to answer the question. Provide details and share your research!

                                                                                  But avoid



                                                                                  • Asking for help, clarification, or responding to other answers.

                                                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                                                  To learn more, see our tips on writing great answers.




                                                                                  draft saved


                                                                                  draft discarded














                                                                                  StackExchange.ready(
                                                                                  function () {
                                                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1327692%2fwhat-does-missingmanifestresourceexception-mean-and-how-to-fix-it%23new-answer', 'question_page');
                                                                                  }
                                                                                  );

                                                                                  Post as a guest















                                                                                  Required, but never shown





















































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown

































                                                                                  Required, but never shown














                                                                                  Required, but never shown












                                                                                  Required, but never shown







                                                                                  Required, but never shown







                                                                                  Popular posts from this blog

                                                                                  Tonle Sap (See)

                                                                                  I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

                                                                                  Guatemaltekische Davis-Cup-Mannschaft