Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a New NuGet Package with DNX #52

Closed
danroth27 opened this issue Apr 16, 2015 · 6 comments
Closed

Create a New NuGet Package with DNX #52

danroth27 opened this issue Apr 16, 2015 · 6 comments

Comments

@danroth27
Copy link
Member

ASP.NET 5->.NET Execution Environment (DNX)->Create a New NuGet Package with DNX

  • Create a new DNX project for your package (link to DNX projects article)
    • Various project.json properties map to package metadata: authors, description, version, etc
    • Package id will match the DNX project name (folder name by default, no way to change it yet)
    • Version can have -*. Set DNX_BUILD_VERSION env var on your build server to specify the replacement for the version wildcard.
    • Pointer to DNX commands article for creating command packages
  • Targeting multiple frameworks
    • Each framework under frameworks maps to a folder under lib in your package that gets built for you by DNX automatically
    • Target framework specific dependencies are handled for you
    • Specify set of frameworks that you can target (.NET 2.0?, PCLs? Silverlight? etc)
  • Building your package
  • Publishing your package
    • Upload to your favorite package feed (nuget.org, myget.org, internal company feed, etc)
    • Note: Uploading to nuget.org requires you to have a description . . .
@markrendle
Copy link
Contributor

Is this actually possible right now (i.e. in beta4)?

@danroth27
Copy link
Member Author

@markrendle Absolutely! You can create the package from the command line using dnu pack or you can set the "Produce outputs on build" option in VS on the project's Build tab.

produce-output-on-build

@neil-119
Copy link

neil-119 commented Jun 8, 2015

When I published a project to Nuget, I got the following error:
Failed to read the package file. Ensure it is a valid NuGet package with a valid manifest.

Turned out the problem was that I had a blank description in project.json. It would be helpful if Visual Studio outputted a warning when "Produce outputs on build" is on but the required meta data is not available.

@Gekctek
Copy link

Gekctek commented Oct 27, 2015

Is there a plan to have the nuget package id configurable (instead of project name) by the initial release of AspNet 5? at all? or are there easy workarounds without changing the project name?

@danroth27
Copy link
Member Author

@Gekctek It's on our backlog (aspnet/dnx#2312), but will probably come after the initial release.

@danroth27
Copy link
Member Author

This topic will be covered as part of the .NET docs now that we are moving to the new .NET CLI. Closing.

trobinson41 pushed a commit to trobinson41/Docs that referenced this issue May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants