0
votes

I work in a small team of developers, we use a self-hosted NuGet server to share DLL's. After upgrading to Visual Studio 2017 the first issue I came across is that the new built-in version of Nuget only allows .NET Standard projects to be packed/distributed through NuGet.

Due to the code base is fairly large porting all our current Classic Class Libraries to .NET Standard libraries is not a quick task.

My current solution is to have Visual Studio 2015 also installed and use an older version NuGet on the command line.

Am I missing something here?

Thanks in advanced

1

1 Answers

1
votes

The VS templates for .net framework are still based on the "classic csproj" model, which does not use the SDK that brings in NuGet capabilities.

However, you can use the new csproj tooling, there's just no template in VS 2017 (yet?). Just create a .NET Standard project and edit the .csproj file from

<TargetFramework>netstandard1.4</TargetFramework>

to

<TargetFramework>net461</TargetFramework>

and all new NuGet tooling should light up. Replace 461 with the version of .net framework you want to use, just be aware that if you use net35 or lower, you need to build/pack via VS and msbuid and cannot use the dotnet command line tools.