Skip to content

How to set NeutralResourcesLanguageAttribute in my netcore project? #3878

@fxanimal

Description

@fxanimal

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have a Netcore desktop application project
Compiler gives the following error message :

Error MC1000 Unknown build error, 'Could not find type 'System.Resources.NeutralResourcesLanguageAttribute' in assembly 'C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.dll'.' MyProj C:\Program Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 223

Then I added the following code in AssemblyInfo.cs
[assembly: NeutralResourcesLanguage("en")]

The compiler still gives the same error message.

I'd appreciate it if someone can give me a hint.
Thanks.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

netcore 5

Anything else?

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions