App1
ClassLibrary1
Windows 8 class library project to solutionPortableClassLibrary1
portable class library targeting Windows 8 and Windows Phone 7.5 to a solutionHttpClient
nuget package in ClassLibrary1
HttpClient
nuget package in PortableClassLibrary1
ClassLibrary1
and PortableClassLibrary1
You get an error at .appx package stage
Payload contains two or more files with the same destination path 'System.Net.Http.Primitives.dll'.
Source files:
\Projects\App1\PortableClassLibrary1\bin\Debug\System.Net.Http.Primitives.dll
\Projects\App1\packages\Microsoft.Net.Http.2.2.13\lib\win8\System.Net.Http.Primitives.dll
Please note the same error is reproduced if you reference any nuget package featuring both win8 and portable blends of assemblies.
What is expected: Most specific version of a library (win8 one) is packaged into .appx and portable version is ignored
Any ideas on how to cheat appx packager and build this kind of Windows 8 projects?
It looks like the solution described here works: http://cyanbyfuchsia.wordpress.com/2013/05/03/payload-contains-two-or-more-files-with-the-same-destination-path/
Basically, you must set "Copy local" to false in the WinRT project that is referenced from the main app.
In addition to this, you should be getting warnings similar to:
All projects referencing ClassLibrary1.csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.
This is indicating a problem. Basically, the short of it, you should be installing HttpClient.Compression into all projects. MSBuild/AppX packaging doesn't know which binary to deploy between the portable library and store library project (they have different APIs & versions). Installing the package into the application, tells it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With