Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MakePRI warning 0xdef01051 while compiling Windows 8.1 Store app #317

Closed
pedropombeiro opened this issue Jul 11, 2014 · 19 comments
Closed

Comments

@pedropombeiro
Copy link

After I added Humanizer to the solution (an English only project), I started getting the following warnings during the build:

6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/DateHumanize_MultipleSecondsAgo_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/DateHumanize_MultipleSecondsFromNow_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/DateHumanize_MultipleHoursFromNow_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleDays_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleHours_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/DateHumanize_MultipleYearsFromNow_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleMinutes_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleMinutes_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleSeconds_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/DateHumanize_MultipleMinutesFromNow_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleMilliseconds_Dual'. The application may throw an exception for certain user configurations when retrieving the resources.
6>MakePRI : warning 0xdef01051: No default or neutral resource given for 'Humanizer.Properties.Resources/TimeSpanHumanize_MultipleDays_Plural'. The application may throw an exception for certain user configurations when retrieving the resources.

When I search the web for the warning code, I came across this: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/2554a1c6-f1b8-45b1-a690-881d835407d0/how-to-solve-makepri-warning-0xdef01051-no-default-or-neutral-resource-given-for?forum=toolsforwinapps

Is this a known issue?

Thanks.

@MehdiK
Copy link
Member

MehdiK commented Jul 12, 2014

Oh! This is the first I'm seeing this!

It seems like a bug in Microsoft Advertising SDK. Not sure about this tbh. Have you tried the workaround proposed in the article?

@pedropombeiro
Copy link
Author

I haven't. I was first looking to know whether this was a known issue or not. I have been using Humanizer successfully in a .NET 4.0 project, and was trying to introduce it to a Windows 8/WP 8.1 store app but I had to roll it back until I find out a fix for this. If I have some time I will try the workaround.

@MehdiK
Copy link
Member

MehdiK commented Jul 12, 2014

I know that some teams have been successfully using Humanizer in Windows 8 applications for quite a while; but WP8.1 support is very new and I'm not sure if anyone has used it. Please keep us updated.

@faisalr
Copy link
Contributor

faisalr commented Jul 23, 2014

We need to fill in the English resources for those special cases of another cultures. Dual in English is the same as plural.

Just make sure to add those in Resource.resx.

@MehdiK
Copy link
Member

MehdiK commented Jul 24, 2014

That's a good point @faisalr. Thanks. I don't think we should pollute English resource with all the possible combinations from all languages; but this is definitely worth investigating. @pombeirp could you please add these entries in the Resource.resx and see if that makes a difference?

@MehdiK
Copy link
Member

MehdiK commented Aug 16, 2014

I'm going to close this issue as it seems like a bug in another framework. @pombeirp please let us know if you find a fix for this issue.

@MehdiK MehdiK closed this as completed Aug 16, 2014
@pedropombeiro
Copy link
Author

@MehdiK Sorry for taking so long to give this a try. I confirm that adding the missing resources to Resources.resx gets rid of the warnings. I understand that the resources aren't really necessary, but my concern here is the number of warnings it generates on each compile. Right now it is a source of concern within my team, before I can get Humanizer in the project. Thanks!

@MehdiK
Copy link
Member

MehdiK commented Dec 12, 2014

Thanks for getting back to me on this. I know this is not ideal; but do you think it's possible for you to disable this warning for your build? You can see a solution here.

We also have #59 which will fix this for English users. Other than these, the only thing I can think of is to add every single key to all the resources which is going to pollute the entire solution and I am not a fond of.

@mexx
Copy link
Collaborator

mexx commented Dec 12, 2014

@MehdiK I think you don't have to add the keys to all resources, but only to the english one. Because it's the default one baked in the main dll.

@MehdiK
Copy link
Member

MehdiK commented Dec 12, 2014

Are you sure @mexx? If so, it isn't quite as bad.

@pedropombeiro
Copy link
Author

@MehdiK yes, that is also what I observed.

@MehdiK
Copy link
Member

MehdiK commented Dec 12, 2014

You have an English only project though
On 12/12/2014 7:21 PM, "Pedro Pombeiro" notifications@github.com wrote:

@MehdiK https://github.com/MehdiK yes, that is also what I observed.


Reply to this email directly or view it on GitHub
#317 (comment).

@pedropombeiro
Copy link
Author

@MehdiK I'm currently localizing my project (and incidently consider Humanizer as a helpful prerequisite for this), so I can confirm that the problem disappears even on a project with multiple languages. I am currently adding the missing resources to Humanizer - if you'd like I can make a pull request and avoid you the trouble of adding the resources yourself.

@MehdiK
Copy link
Member

MehdiK commented Dec 12, 2014

Thanks a lot for the confirmation. In that case that would be an acceptable
solution.

Please make a PR based on your additions when all the warnings disappear.
Please follow the contribution guidelines.

Thanks.
On 12/12/2014 8:13 PM, "Pedro Pombeiro" notifications@github.com wrote:

@MehdiK https://github.com/MehdiK I'm currently localizing my project
(and incidently consider Humanizer as a helpful prerequisite for this), so
I can confirm that the problem disappears even on a project with multiple
languages. I am currently adding the missing resources to Humanizer - if
you'd like I can make a pull request and avoid you the trouble of adding
the resources yourself.


Reply to this email directly or view it on GitHub
#317 (comment).

@pedropombeiro
Copy link
Author

Done.

MehdiK added a commit that referenced this issue Dec 12, 2014
Add special case resources to neutral language. Fixes #317
@pedropombeiro
Copy link
Author

:-( After taking the NuGet package from the CI server I started getting an error message when compiling the app project (happens when the MakePRI is apparently merging the resources). As much as that pains me, I think I'll have to drop this effort. It seems WinRT is just too picky regarding resources...

6>MakePri : error 0x80073b0f: Processing Resources with error: Duplicate Entry.
6>MakePRI : error 0xdef00532: Conflicting values for resource 'Humanizer.Properties.Resources/TimeSpanHumanize_SingleDay'
6>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets(879,9): error APPX2001: While creating .pri files for portable libraries, sub-task 'GenerateProjectPriFile' failed while processing library 'Humanizer'.
6>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets(879,9): error APPX2001: While creating .pri files for portable libraries, sub-task 'GenerateProjectPriFile' failed while processing library 'System.Reactive.Core'.
6>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets(879,9): error APPX2001: While creating .pri files for portable libraries, sub-task 'GenerateProjectPriFile' failed while processing library 'System.Reactive.Linq'.
6>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets(879,9): error APPX2001: While creating .pri files for portable libraries, sub-task 'GenerateProjectPriFile' failed while processing library 'System.Reactive.PlatformServices'.
6>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\AppxPackage\Microsoft.AppXPackage.Targets(879,9): error APPX2001: While creating .pri files for portable libraries, sub-task 'GenerateProjectPriFile' failed while processing library 'System.Reactive.Windows.Threading'.
========== Build: 5 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

UPDATE: Just found this:

To consume your class library from a Windows Store app, add a reference to it in your Windows Store app project. Visual Studio will transparently extract the resources from your assembly into a .resw file and use it to generate a PRI file from which the Windows Runtime can extract resources. At run time, the Windows Runtime executes the code in your Portable Class Library, but it retrieves your Portable Class Library's resources from the PRI file.

If your Portable Class Library project includes localized resources, you use the hub-and-spoke model to deploy them just as you would for a library in a desktop app. To consume your main resource file and any localized resource files in your Windows Store app, you add a reference to the main assembly. At compile time, Visual Studio extracts the resources from your main resource file and any localized resource files into separate .resw files. It then compiles the .resw files into a single PRI file that the Windows Runtime accesses at run time.

If I remove the satellite DLL folders from the packages folder (packages\Humanizer.1.31.xx\lib\portable-win+net40+sl50+wp8+wpa81), it compiles fine, so it appears MakePRI is considering the satellite DLLs as conflicting content. Did the organization of the resources change between the published version (1.31.0) and what is in master now?

@pedropombeiro
Copy link
Author

The problem seems to be caused by two new languages: zh-CHS and zh-CHT. By removing these folders from the package, there is no longer a Duplicate Entry. error.

@MehdiK
Copy link
Member

MehdiK commented Jan 26, 2015

I think this is now fixed through #374 & it's been released to NuGet. Would you please be able to verify if the warnings have gone away?

@pedropombeiro
Copy link
Author

@MehdiK They are indeed gone!

I still have a minor one though, not sure if you've seen it before:
plex-win8\packages\Humanizer.1.33.0\lib\portable-win+net40+sl50+wp8+wpa81\Humanizer.dll : error CS1684: Warning as Error: Reference to type 'System.IConvertible' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1\mscorlib.dll', but it could not be found

I've seen a similar issue in AutoMapper/AutoMapper#658

MehdiK added a commit that referenced this issue Feb 3, 2015
Fixes the IConvertible warning thrown on Windows Phone reported on #317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants