What class library to use to be reference on UWP and ASPNETCORE apps

╄→尐↘猪︶ㄣ 提交于 2019-12-11 07:34:08

问题


I would like to create a class library that can be used on my aspnetcore app and uwp app.

Please correct me if I'm wrong, the way I understand the image below (first image) I can create a .net core class library and have it reference to uwp and aspnetcore.

What I've done is I created, a .NET Core Class Library, Aspnet Core Web App, and UWP.

I tried to reference .Net Core Class Library on my Aspnet Core Web App, no errors. Now, I tried to reference .Net Core Class Library on my UWP and it showed the error below (last image).

Am I better of creating PCL instead as stated here?

PS. Im using VS2015 Update 3


回答1:


The tooling is now available in Visual Studio 2017 release candidate. You can now create a .Net Standard class library from a template and use this to facilitate sharing code (e.g. model objects) between an Asp.Net Core app and a Universal Windows Platform (UWP) app.

.Net Standard class library is considered the successor to the portable class library (PCL).



来源:https://stackoverflow.com/questions/38225130/what-class-library-to-use-to-be-reference-on-uwp-and-aspnetcore-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!