Now that we have the official migration from project.json back to .csproj , how do you actually generate the output of the NuGet package?
project.json
.csproj
I donβt know if this is the only thing, but itβs hard for me to understand the official pages of the documentation . The only mention of invoking msbuild from the command line, but this does not work for me, and furthermore, I hoped more that you could just specify this step directly in the .csproj file.
msbuild
A complete example of how to do this using .csproj files will be considered.
Update: Finally, I got MSBuild to output the package by running it from the command line. The trick filled the PropertyGroup all the package metadata, as described on the pages of the document. However, I still prefer to run the package as part of the normal build process.
PropertyGroup
Update: Find a much better resource for understanding .csproj new format . NET Blog Page .
I am packaging a .NET Core NuGet package with MSBuild in Visual Studio 2017 RC using the following steps:
New -> Project -> C# -> .NET Core -> Console App (.NET Core)
Save the file to the PropertyGroup node with the following package information:
<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp1.0</TargetFramework> <PackageId>TestNetCorePackage</PackageId> <PackageVersion>1.0.0</PackageVersion> <Authors>Weiwei</Authors> <Description>Test .NET Core package</Description> <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> <PackageReleaseNotes>First release</PackageReleaseNotes> <Copyright>Copyright 2016 (c) Contoso Corporation. All rights reserved.</Copyright> <PackageTags>Net Core</PackageTags> </PropertyGroup>
Open the Developer Command Prompt for VS 2017 RC and enter the command cd *your project file path* to go to the path to the project file.
cd *your project file path*
Type msbuild ProjectName.csproj /t:pack , which is the command to package the .NET Core package. It will be created in the bin \ debug folder in your project path.
msbuild ProjectName.csproj /t:pack
Source: https://habr.com/ru/post/1263632/More articles:Index return tuple and .max () value? - pythonHow to open GitKraken after installation on Windows 10? - windows-10Immediate rejection in Rx - rx-javaThe term "nugget" is not recognized - visual-studioHow to run target MSBuild package in Visual Studio 2017 - c #Set response status in ASP.NET middleware - asp.netMatplotlib Colormap with two parameters - matplotlibChanging the static response of a file in the ASP.NET core - c #Input button InputToolbar not working - iosHow to add a 2D matrix or color wheel to matplotlib? - pythonAll Articles