Home: [NuGet Packaging] Add Visual Studio Template for NuGet package creation (it's 2018 guys)

Created on 7 Jan 2018  路  6Comments  路  Source: NuGet/Home

There is STILL no Visual Studio Template for NuGet package creation. There is also no UX in Visual Studio for publishing a NuGet package to Nuget.org.

Everyone expects Microsoft to provide this, and it's been roughly a decade. How long would this take? It would probably significantly increase NuGet adoption, and also help standardize a preferred way of doing this instead of everyone inventing it and doing it manually.

Details about Problem

Product: NuGet packager

NuGet version (x.x.x.xxx): ALL VERSIONS

VS version (if appropriate): ALL VERSIONS

OS version (i.e. win10 v1607 (14393.321)): ALL VERSIONS

Worked before? If so, with which NuGet version: No

Detailed repro steps so we can see the same problem

See above

NotABug Docs

All 6 comments

@AndrewBragdon have you tried Generate NuGet package on build in VS 2017?

https://blog.nuget.org/20170316/NuGet-now-fully-integrated-into-MSBuild.html

@emgarten This is only for .NET Core which doesn't help me unfortunately

@AndrewBragdon you can create a .NET Standard nuget package and edit

<TargetFramework>netstandard2.0</TargetFramework>

to e.g.

<TargetFramework>net461</TargetFramework>

to get all the same benefits that the new .NET Standard and .NET Core projects have.

More details at https://stackoverflow.com/questions/44656655/how-do-i-create-a-nuget-package-with-visual-studio-2017/44657085#44657085

However, the underlying issue probably still is that there is no template yet for an "SDK-based" .NET Framework class library. Some features of .NET Framework class libraries still don't work well in the new project system (I remember some ppl complaining about .edmx designer and correct embedding).

As @dasMulli pointed out there are some gaps for .NET Framework and the SDK based project style.

We already have easily accessible, relevant documentation on how to create NuGet packages of all types.
https://docs.microsoft.com/en-us/nuget/create-packages/creating-a-package

  • The UI for uploading a package to nuget.org is the nuget.org web site, I'm not sure that having this inside VS would be helpful, and it would likely have a negative impact on nuget.org and the number of accidental pushes.
  • You can take look at nugetizer for help creating packages https://github.com/NuGet/NuGet.Build.Packaging In general a project template for a nupkg doesn't make sense, the nupkg is just the project put into a zip, not its own thing in most cases.

As for non-NETCore SDK projects, these can still be packed automatically by creating a custom target to call nuget.exe. Beyond that I don't see additional work being done in this area for old style projects so I am going to close this issue.

Was this page helpful?
0 / 5 - 0 ratings