Satellite assembly called "XX.dll" for backup culture "en-US" could not be found error in .NET application

I am setting up an open source .NET application. It compiles fine. But the forms and controls refuse to show in the designer, causing the following error:

A satellite assembly called "XX.dll" for the backup culture "en-US" either could not be found or could not be loaded. This is usually a setup problem. Please reinstall or fix the application.

I know this is a multilingual application, but I would like to add additional languages ​​and stick to a simple signature setup through the form builder.

In addition, the problem does not allow adding images to the controls. The same exception occurs on lines like the following:

((System.Drawing.Image)(resources.GetObject("ItemXXX.Glyth"))); 

What do I need to change to disable satellite assembly resources?

Thanks...

+4
source share
3 answers

Found the answer.

Removing the following line from AssemblyInfo solved the problem:

 [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 
+2
source

To remove the problem but fix it , add the UICulture to the PropertyGroup in the project file that matches the NeutralResourcesLanguage used in the AssemblyInfo file. You can then satisfy the FxCop warning CA1824 if you ever need to. e.g. In AssemblyInfo :

 [assembly: NeutralResourcesLanguage("en-GB", UltimateResourceFallbackLocation.Satellite)] 

In the project file (e.g. .csproj):

 ... <PropertyGroup Condition="..."> ... <UICulture>en-GB</UICulture> ... </PropertyGroup> ... 
+3
source

I experienced this error only once, trying to add a link to the project.

I decided to just restart Visual Studio.

0
source

Source: https://habr.com/ru/post/1340806/


All Articles