0

Imagine Jane is on Ubuntu and uses VSCode with .NET Core 2.0 SDK to create and push a NuGet package targeting netstandard2.0 to a repo.

Imagine I have a .NET 4.6.1 full framework project - its a Windows Service executable.

Since .NET Standard 2.0 is the common spec in the above and I'm using Visual Studio 2017 Update 3 and latest SDKs and stuff, I reference Jane's .nupkg.

I build and XCOPY my /bin/release to a server VM with just the .NET 4.6.1 Framework installed.

Will it run, or do I need to install anything else on the server?

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
  • It should. But it is better to also install the .NET 2.0 / 3.5 feature on Windows. – Erwin Sep 04 '17 at 11:48
  • 1
    What Jane has created is *not* a .NET Core 2.0 DLL -- she's written a .NET Standard library. The metadata in that is specifically targeting "anything implementing .NET Standard 2.0", and that will be usable on .NET 4.6.1. Note that it is also quite possible to build a .NET Core 2.0 assembly specifically, and that will *not* load on .NET 4.6.1 (the platform-specific assembly references will not match up). – Jeroen Mostert Sep 04 '17 at 12:35
  • Note that the bulk of the work will be done by VS when you build your .NET 4.6.1 executable -- it will resolve the `netstandard` reference by pulling in a ton of assemblies to handle the redirection to the various platform assemblies. The framework itself doesn't have to do much to support this. – Jeroen Mostert Sep 04 '17 at 12:48
  • @Jeroen Do you want to copy paste into a formal answer and collect your prize :-) ? – Luke Puplett Sep 04 '17 at 15:26

0 Answers0