2

I am getting the following warning:

Warning CA1824  Mark assemblies with NeutralResourcesLanguageAttribute  JobsLedger.INITIALISATION

I found this.

However I don't know still, how to add the following or indeed if this is what I need to do..

[assembly: NeutralResourcesLanguage("en")]

Could someone tell me what I need to do to remove this error..

si2030
  • 3,895
  • 8
  • 38
  • 87

1 Answers1

1

You can add this attribute to any file in a project. If you have Program.cs or Startup.cs then put it there

using System;
using System.Resources;

[assembly: NeutralResourcesLanguage("en")]

namespace ConsoleApp
{
    public static class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }

}

Or if you want ignore it, add

<NoWarn>CA1824</NoWarn>

to .csproj file

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116