.NET Core 1.1 File Resource Error

In my .NET Core class library project, the resource file is not updated when the resource file name contains a dot in it. For example, when I add files Resources.en.resxor Resources.es.resxin .NET Core project, a custom tool can not generate or update the resource file, C #. Here is the error message:

The custom tool ResXFileCodeGenerator could not create an output for the input file "Resources.en.resx", but did not register a specific error.

If you know of any workaround or any fix for it, please let me know in the right direction

+4
source share
1 answer

Delete all .resx files that are currently in the directory Resources.

Now go to the directory Resourcesand right click on Add > New Item.

Select Resource Fileand enter the file name at the bottom of the form. It is important that you get the name for the first time and not rename it. You can use something like Resource.resx.

This very first Resource.resxfile should have its own constructor class. It also needs all the keys and values ​​for localization for your project, so if you have an existing one Resource.en.resx, you can copy and paste the values ​​from this into this one.

IStringLocalizer<Resource> , , - Resource, Solution Explorer Resource.resx. "" " ". , resx , ResXFileCodeGenerator PublicResXFileCodeGenerator.

Resource.ja.resx, Resource.es.resx. , ResXFileCodeGenerator, . .

+1

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


All Articles