Janusz-kun
Janusz-kun

Reputation: 89

Adding Prism reference in Xamarin PCL project breaks build on Windows Phone 8.1 and UWP

I'm using some of core Prism classes in PCL Project for Multi-platform app. Everything Is fine (I chcecked only on Android as I don't have a Mac) until I add Windows Phone 8.1 or Universal Windows 10 Project and configure them like Xamarin website tells. What I receive is:

Cannot resolve Assembly or Windows Metadata file 'Prism.dll'

Type universe cannot resolve assembly: Prism, Version=6.1.0.0, 
Culture=neutral, PublicKeyToken=91a96d2a154366d8.       

When I remove all Prism related thing from PCL the projects build, so I'm considering copying prism project into my solution. Or maybe should I reference Prism as a dll instead of nuget or what?

I always thought that nuget takes the job of picking the dll with proper target.

Edit: Xamarin.Froms ver: 2.0.0.6490 (in all projects now) VS 2015.

Upvotes: 2

Views: 449

Answers (1)

user5420778
user5420778

Reputation:

You can't use the current NuGet packages if using UWP because NuGet will add the wrong assemblies to your Xamarin.Forms project. NuGet doesn't know you are using a Xamarin.Forms app and adds the wrong assemblies. You need to add the references manually.

See this issue: https://github.com/PrismLibrary/Prism/issues/376

Upvotes: 2

Related Questions