resources in satellite assembly causes exception &lt;!--DIV {margin:0px;}--&gt; <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"> <div>I have a simple wpf application.<br/> <br/> The project file contains &quot;&lt;UICulture&gt;en-US&lt;/UICulture&gt;&quot;.<br/> <br/> <a href="http://assemblyinfo.cs/"><span class=yshortcuts>AssemblyInfo.cs</span> </a> contains<br/> [assembly: NeutralResourcesLanguage(&quot;en-US&quot;, UltimateResourceFallbackLocation.Satellite)]<br/> <br/> Resources.resx uses the Custom Tool<br/> PublicResXFileCodeGenerator<br/> <br/> There is a single string resource named ButtonText.<br/> <br/> I signed the assembly.<br/> <br/> The following line generates an error.<br/>             string str = Properties.Resources.ButtonText;<br/> <br/> The message is:<br/>             Message=&quot;Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure \&quot;WpfLocTest.Properties.Resources.en-US.resources\&quot; was correctly embedded or linked into assembly \&quot;WpfLocTest\&quot; at compile time, or that all the satellite assemblies required are loadable and fully signed.&quot;<br/> <br/> Does anyone see a solution?<br/> <br/> Bill<br/></div> </div> <br/> <div class="module overlay yui-module yui-overlay" style="top:-400px;left:-400px"></div>© 2009 Microsoft Corporation. All rights reserved.Fri, 03 Jul 2009 15:55:46 Z746e7170-0bc8-469c-a0e6-6bbadc658e94http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#746e7170-0bc8-469c-a0e6-6bbadc658e94http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#746e7170-0bc8-469c-a0e6-6bbadc658e94Bill Swartzhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bill%20Swartzresources in satellite assembly causes exception &lt;!--DIV {margin:0px;}--&gt; <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"> <div>I have a simple wpf application.<br/> <br/> The project file contains &quot;&lt;UICulture&gt;en-US&lt;/UICulture&gt;&quot;.<br/> <br/> <a href="http://assemblyinfo.cs/"><span class=yshortcuts>AssemblyInfo.cs</span> </a> contains<br/> [assembly: NeutralResourcesLanguage(&quot;en-US&quot;, UltimateResourceFallbackLocation.Satellite)]<br/> <br/> Resources.resx uses the Custom Tool<br/> PublicResXFileCodeGenerator<br/> <br/> There is a single string resource named ButtonText.<br/> <br/> I signed the assembly.<br/> <br/> The following line generates an error.<br/>             string str = Properties.Resources.ButtonText;<br/> <br/> The message is:<br/>             Message=&quot;Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure \&quot;WpfLocTest.Properties.Resources.en-US.resources\&quot; was correctly embedded or linked into assembly \&quot;WpfLocTest\&quot; at compile time, or that all the satellite assemblies required are loadable and fully signed.&quot;<br/> <br/> Does anyone see a solution?<br/> <br/> Bill<br/></div> </div> <br/> <div class="module overlay yui-module yui-overlay" style="top:-400px;left:-400px"></div>Thu, 02 Jul 2009 20:45:48 Z2009-07-02T20:45:48Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#40659d65-4e32-4c0e-ab14-898d2c64aa6bhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#40659d65-4e32-4c0e-ab14-898d2c64aa6bDavid M Mortonhttp://social.msdn.microsoft.com/Profile/en-US/?user=David%20M%20Mortonresources in satellite assembly causes exception<p>It seems like you're trying to mix the idea of Satellite resources and resources that are compiled into the assembly.  My guess is that you were following the walkthrough here:<br/><br/><a href="http://msdn.microsoft.com/en-us/library/cc668131.aspx">http://msdn.microsoft.com/en-us/library/cc668131.aspx</a><br/><br/>And you finished it, but it still doesn't work right.  Based on what you're telling me, it seems like you left a couple of steps out. <br/><br/>Things to make sure of:<br/><br/>1.  The Resources.resx <em>shouldn't </em>be using the custom tool. <br/>2.  Resources.resx should be named Resources.en-US.resx. <br/>3.  The call to get the resource should be more like:<br/><br/>ResourceManager rm = new ResourceManager(<br/>    &quot;WpfLocTest.Properties.Resources&quot;,<br/>    Assembly.GetExecutingAssembly());<br/>MessageBox.Show(rm.GetString(&quot;ButtonText&quot;));</p><hr class="sig">David Morton - <a href="http://blog.davemorton.net/">http://blog.davemorton.net/</a> - <a href="http://www.twitter.com/davidmmorton">@davidmmorton</a> - <a href="http://forumsbrowser.codeplex.com/">ForumsBrowser, a WPF MSDN Forums Client</a>Thu, 02 Jul 2009 21:40:48 Z2009-07-02T21:40:48Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#fd5bee12-2992-43a3-8e8a-32930a18b0f9http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#fd5bee12-2992-43a3-8e8a-32930a18b0f9Tarun Jindalhttp://social.msdn.microsoft.com/Profile/en-US/?user=Tarun%20Jindalresources in satellite assembly causes exceptionYou can try two more things:<br/><br/>1: right click on your resources.resx file. Goto properties and provide the CustomToolNamespace as WPFLocTest.Properties<br/><br/>2: Also make sure that you have made all the resources as public. By default they are internal.<br/><br/><br/>Hope it helps.<br/>Cheers,<br/>Tarun<hr class="sig">DeveloperFri, 03 Jul 2009 03:50:47 Z2009-07-03T03:50:47Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#5f824959-7839-435d-94a2-1a4684a60cd1http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#5f824959-7839-435d-94a2-1a4684a60cd1Bill Swartzhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bill%20Swartzresources in satellite assembly causes exceptionI hadn't found that walkthrough. It showed me what I needed to know. Thanks.<br/> BillFri, 03 Jul 2009 15:33:18 Z2009-07-03T15:33:18Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#9e710744-64a5-45d3-9fdd-491a97f73103http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/746e7170-0bc8-469c-a0e6-6bbadc658e94#9e710744-64a5-45d3-9fdd-491a97f73103David M Mortonhttp://social.msdn.microsoft.com/Profile/en-US/?user=David%20M%20Mortonresources in satellite assembly causes exceptionBill, <br/><br/>If it was one of our posts that led you to the answer, it would be nice if you could mark our posts as the answer, and not your own.  The answer posts show up at the top of the list now, so marking the proper post as answer will greatly help anyone else who sees this thread to quickly find the answer.<hr class="sig">David Morton - <a href="http://blog.davemorton.net/">http://blog.davemorton.net/</a> - <a href="http://www.twitter.com/davidmmorton">@davidmmorton</a> - <a href="http://forumsbrowser.codeplex.com/">ForumsBrowser, a WPF MSDN Forums Client</a>Fri, 03 Jul 2009 15:55:46 Z2009-07-03T15:55:46Z