简体   繁体   中英

Netcore library compatibility with universal windows app and others

I've developed a net core library app and posted on nuget for personal use.

Then later I created a universal windows app and tried to install this net core library via nuget then I get the following error.

Package restore failed. Rolling back package changes. 

My net core library app dependencies are netcore app version 1.1

The good thing about netcore app is that I can compile, unit test and update on mac which I use frequently but then I've to develop windows app as well down the road.

For maximum portability, your class library should target .NET Standard , not .NET Core.

Targeting .NET Core means that your class library will be able to run on .NET Core only, and not on the .NET Framework, Mono, etc.

Check out the compatibility chart in the .NET Core documentation. It says that if you target any version of .NET Standard up to 1.4, that will allow you to target the Universal Windows Platform version 10 onwards.

If you need to target earlier versions or other frameworks, you can do so by multi-targeting your .NET Standard class library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM