Question

I have a C# .NET 4.5 project with a custom embeded resource file Messages.en-US.resx

And I cannot access it using this

using System.Reflection;
using System.Resources;

MyApp.Properties.Resources.Messages.MyString

If I add a new resource file without .en-US.resx extension then it works....but I need it for translation to different languages

In my other ASP.NET projects works fine, in Winforms not. I need this resource file for translation.

Était-ce utile?

La solution

At least one messages resource file has to be non-culture-specific. That file has to have a matching .designer file.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top