Reputation: 973
I'm running Visual Studio 2015 on Windows 10.
File -> New Project -> Blank App (Universal Windows 8.1)
This creates a solution with 3 projects: a Windows 8.1 project, a Windows Phone 8.1 project and a Shared project.
If I try to install the Unity nuget package I get following error
Package Manager Console Host Version 3.1.1.0
Type 'get-help NuGet' to see all available NuGet commands.
PM> Install-Package Unity -Version 3.5.1404
Attempting to gather dependencies information for package 'Unity.3.5.1404' with respect to project 'App3\App3.WindowsPhone', targeting 'WindowsPhoneApp,Version=v8.1'
Attempting to resolve dependencies for package 'Unity.3.5.1404' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Unity.3.5.1404'
Resolved actions to install package 'Unity.3.5.1404'
Install failed. Rolling back...
Package 'Unity 3.5.1404' does not exist in project 'App3.WindowsPhone'
Install-Package : Could not install package 'Unity 3.5.1404'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with
that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Unity -Version 3.5.1404
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM>
Unity installs without error into the Windows 8.1 project.
How do I resolve this issue?
UPDATE: 16/9/2015 I get same behaviour on my work PC running Windows 10 and Visual Studio 2013.
UPDATE: 17/09/2015 Set nuget to show pre-release packages then install Unity 3.5.1405-prerelease.
Upvotes: 0
Views: 482
Reputation: 973
I can install unity into both projects by the following nuget command:
Install-Package Unity -Pre
This installs version 3.5.1405-prerelease. According to nuget page for Unity both WindowsPhone and WindowsPhone8 are listed in the tags section.
Upvotes: 0
Reputation: 47937
The Unity NuGet package version 3.5.1404 does not support Universal Windows Projects.
It does support Windows Phone Silverlight projects.
If you create a Windows Phone Silverlight project you can install the Unity NuGet package into it.
Upvotes: 0