Unable to compile UWP project when referencing NETStandard project v1.4
See original GitHub issueSteps to reproduce
1. Create NETStandard project and make sure to target NETStandard1.4
2. Make sure to add myget.org so that NETStandard.Libarary restored correctly (project.json shows "NETStandard.Library": "1.0.0-rc2-23910")
3. Compile the project and make sure there is no error
4. Create UWP project and make sure to target 10.0.10586
5. Reference the assembly that you created in step 1
6. Compile the UWP project and you will get following errors:
Failed to resolve conflicts for UAP,Version=v10.0.
Failed to resolve conflicts for UAP,Version=v10.0.
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Targets': Microsoft.NETCore.Targets (>= 1.0.0) (via package/Microsoft.NETCore 5.0.0), Microsoft.NETCore.Targets (>= 1.0.1-rc2-24008) (via package/Microsoft.NETCore.Platforms 1.0.1-rc2-24008)
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Targets': Microsoft.NETCore.Targets (>= 1.0.0) (via package/Microsoft.NETCore 5.0.0), Microsoft.NETCore.Targets (>= 1.0.1-rc2-24008) (via package/Microsoft.NETCore.Platforms 1.0.1-rc2-24008)
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Targets.UniversalWindowsPlatform': Microsoft.NETCore.Targets.UniversalWindowsPlatform (>= 5.0.0) (via package/Microsoft.NETCore.Targets 1.0.0)
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Platforms': Microsoft.NETCore.Platforms (>= 1.0.1-rc2-24008) (via package/NETStandard.Library 1.0.0-rc2-23910), Microsoft.NETCore.Platforms (>= 1.0.0) (via package/Microsoft.NETCore.Targets 1.0.0)
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Platforms': Microsoft.NETCore.Platforms (>= 1.0.0) (via package/Microsoft.NETCore.Targets 1.0.0), Microsoft.NETCore.Platforms (>= 1.0.1-rc2-24008) (via package/NETStandard.Library 1.0.0-rc2-23910)
Unable to satisfy conflicting requests for 'Microsoft.NETCore.Targets.UniversalWindowsPlatform': Microsoft.NETCore.Targets.UniversalWindowsPlatform (>= 5.0.0) (via package/Microsoft.NETCore.Targets 1.0.0)
NuGet package restore failed.
Expected behavior
Should not have conflict and compile correctly
Actual behavior
Unable to compile UWP project with NETStandard assembly
Environment data
C:\Program Files (x86)\Microsoft Visual Studio 14.0>dotnet --version .NET Command Line Tools (1.0.0-beta-001598)
Product Information: Version: 1.0.0-beta-001598 Commit Sha: 7582649f88
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows Runtime Id: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Unable to compile UWP Class library after upgrading ...
Net Standard 1.4, but I upgraded it to .Net Standard 2.0 and also updated UWP class library to target SDK 16299 but on...
Read more >Nuget Error While Referencing .NET Standard Library ...
NET Framework console application that references the above .NET Standard library, and is described as the following project file: <Project Sdk="Microsoft.
Read more >NET Standard
Referencing .NET Framework libraries doesn't work for all projects, such as libraries that use Windows Presentation Foundation (WPF) APIs. For ...
Read more >Unable to create new project (fresh install fail)
Game\project.json… Verbose: Unable to resolve 'Microsoft.NETCore.Portable.Compatibility (>= 1.0.1)' for '.NETStandard,Version=v1.4'.
Read more >Time Tortoise: Upgrading to .NET Standard
NET Standard v1.4, you'll be able to consume that library from a .NET Core project, a UWP project, or any of the other...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
RC2 should not be used for targeting UWP. There was a long list of bugs that didn’t meet the bar for fixing in RC2 so we fixed them in RC3.
To use the RC3 packages make sure you pull them from the https://dotnet.myget.org/F/dotnet-core/api/v3/index.json feed.
@ericstj I am running into the same issue with RC2:
My UWP app is dependent upon Microsoft.NETCore.UniversalWindowsPlatform, 5.1.0, but I get same build result with version 5.0.0.
For the .NET Core class library, I have tried with frameworks netstandard 1.0, 1.3 and 1.4 with the same result. For 1.5, it claims that uap10.0 is not compatible with netstandard1.5.
If I change Microsoft.NETCore.UniversalWindowsPlatform version to the release candidate proposed above (5.2.0-rc3-24015-00), the dependency cannot be resolved at all. Is there another Universal Windows Platform release candidate for RC2?