2

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

modelsolution explorererror

Community
  • 1
  • 1
Boy Pasmo
  • 8,021
  • 13
  • 42
  • 67
  • The tooling is not ready. Generate a NuGet package, add to custom feed and then consume it in UWP project.json. – Lex Li Jul 06 '16 at 13:58
  • Oh I see. Should I wait for the tooling then? Is there a tutorial for that? (The generate NuGet for the UWP to consume?) – Boy Pasmo Jul 06 '16 at 14:07
  • check how urgent you want to try. Public info is that the RTM of the tooling is this fall, but that means it might be as late as November. – Lex Li Jul 06 '16 at 15:33
  • I see. November. Maybe I'll go for PCL. Thanks mate. – Boy Pasmo Jul 06 '16 at 17:02

1 Answers1

2

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.

enter image description here

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

Blake Mumford
  • 17,201
  • 12
  • 49
  • 67
  • Thank you so much for the update. Last question, is this production ready? or should I wait a little more? – Boy Pasmo Feb 15 '17 at 13:07
  • Well, Visual Studio 2017 is RC now. It seems stable enough. I can't really comment on whether it's production ready for your specific needs. That's something you or your team need to decide for yourselves. – Blake Mumford Feb 15 '17 at 13:09