SharpAffair
SharpAffair

Reputation: 5478

The satellite assembly named "XX.dll" for fallback culture "en-US" could not be found error in .NET app

I'm customizing an open-source .NET application. It compiles perfectly fine. But forms and controls refuse to show in designer, throwing the following error:

The satellite assembly named "XX.dll" for fallback culture "en-US" either could not be found or could not be loaded. This is generally a setup problem. Please consider reinstalling or repairing the application.

I know it's a multilingual application, but I'd like to drop additional languages and stick to simple captions customization via form designer.

Also, the issue prevents from adding images to controls. The same exception occurs on lines as the following one:

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

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

Thanks...

Upvotes: 5

Views: 5378

Answers (3)

bluish
bluish

Reputation: 27390

I experienced this error only once, when trying to add a reference to a project.

I solved it simply restarting Visual Studio.

Upvotes: 0

AndyC
AndyC

Reputation: 373

That's a way to remove the issue, but to fix it, add a UICulture to your PropertyGroups in the project file that matches the NeutralResourcesLanguage used in the AssemblyInfo file. You can then satisfy FxCop warning CA1824 if you ever need to. e.g. In AssemblyInfo:


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

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


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

Upvotes: 4

SharpAffair
SharpAffair

Reputation: 5478

Found the answer.

Removing the following line from AssemblyInfo solved the problem:

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

Upvotes: 2

Related Questions