If I run my app on an UWP device I get the following warning in the Output
window:
MakePRI : warning 0xdef00522: Resources found for lang
The warning seems to disappear if I add a AppResources.en-US.resx file (currently I have en-US set as default language in Package.appxmanifest). Additionally, I have a file for AppResources.de.resx and AppResources.resx (should be en). But why does the sample project doesn't need such a file, despite there should be the same settings? What I'm missing?
As you said, the AppResources.resx
is en. And you could expand the Properties node in the Portable Class Library (PCL) project and double-click on the AssemblyInfo.cs file. Add the following line to the file to set the neutral resources assembly language to English:
[assembly: NeutralResourcesLanguage("en")]
This informs the resource manager of the app's default culture, therefore ensuring that the strings defined in the language neutral RESX file (AppResources.resx) will be displayed when the app is running in one the English locales.
You have set en-US
as default language in Package.appxmanifest
, However, there is no such file corresponding to it. So it will throw warning.
The default language of the sample project is en-US
, and there is no such file corresponding to it. It also throw the same warning in my side. if you modify the default language to en
, the warning disappear. Because it has set AppResources.resx
as en
in AssemblyInfo.cs
file.
Foe more you could refer to AssemblyInfo, Supported languages.
Just to extend answer from Nico Zhu - MSFT if you are using .Net Standard there is no assemblyInfo.cs file because everything is stored in the csproj file. So just go to properties of the shared project and change the Project neutral language to whatever your resx default file is. or you can right click on the project and edit the project and the line below.
For me problem was,after converting from PCL to Net Standard, suddently UWP application wasnt picking the default resource file which was en-US. I recognized because i was having this setting in assmeblyInfo.cs and since It was removed, it didnt work. But somehow it works fine for Android project.
<PropertyGroup>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>