Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Development Edition
 Mark assemblies with NeutralResourc...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Team System
Mark assemblies with NeutralResourcesLanguageAttribute

TypeName

MarkAssembliesWithNeutralResourcesLanguage

CheckId

CA1824

Category

Microsoft.Performance

Breaking Change

Non Breaking

An assembly contains a ResX-based resource but does not have the System.Resources..::.NeutralResourcesLanguageAttribute applied to it.

The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the neutral culture's resources for an assembly. When it looks up resources in the same culture as the neutral resources language, the ResourceManager automatically uses the resources that are located in the main assembly. It does this instead of searching for a satellite assembly with the current user interface culture for the current thread. This improves lookup performance for the first resource you load and can reduce your working set.

To fix a violation of this rule, add the attribute to the assembly, specifying the language of the neutral culture's resources.

To specify the language of the neutral culture’s resource

  1. In Solution Explorer, right-click your project, and then Click Properties.

  2. From the left navigation bar select Application, and then click Assembly Information.

  3. In the Assembly Information dialog box, select the language from the Neutral Language drop-down list.

  4. Click OK.

It is permissible to suppress a warning from this rule. However, startup performance might decrease.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Its not relevant for webapplication      Santhosh0123   |   Edit   |   Show History
Project->Property->Application - This is valid for desktop application; but not web. Webapplication giving this error, but there is no way to fix it.
Tags What's this?: Add a tag
Flag as ContentBug
Fix for Web.Application      Tatworth   |   Edit   |   Show History
A Web.Application can be fixed using the example given and the following gets added to the assembly declarations:

<Assembly: NeutralResourcesLanguageAttribute(

"en-GB")>

In C#
[Assembly: NeutralResourcesLanguageAttribute("en-GB")]
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker