I am manually pushing nuget packages to Azure Devops feed by running nuget.exe push
command. When I build my project, the AssemblyName.1.0.0.nupkg
file is created and I am pushing it as:
nuget.exe push -Source URL -ApiKey key ..\AssemblyName.1.0.0.nupkg
This works fine and the package is published successfully (as package version 1.0.0). However, I am not able to publish a prerelease package like 1.0.0-beta.
What I tried?
AssemblyInfo.cs
:[assembly: AssemblyInformationalVersion("1.0.0-beta")]
When I build the project, it still generates AssemblyName.1.0.0.nupkg
but not AssemblyName.1.0.0-beta.nupkg
.
csproj
:<PropertyGroup>
<PackageVersion>1.0.0-beta</PackageVersion>
</PropertyGroup>
Still it generates only AssemblyName.1.0.0.nupkg
.
What I want?
Could you let me know how to publish a prerelease nuget package like 1.0.0-beta
please?
EDIT:
The project's target framework is .NET Framework 4.5
.
在项目文件中使用 <Version> 元素,它应该可以工作!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.