dotnet / dotnet/project-system
Generate nuget package on build package version field not working as expected.
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
In a netstandard2.0 library project, I have the project set to generate a nuget package on build. I noticed that the "Package version" textbox updates the <Version> tag in the project, instead of the <PackageVersion>. This is the tag which is used to version a nuget package, regardless of what is inside the <Version> tag.
Since the textbox is labeled "Package version" I would expect it to update the <PackageVersion> tag in the project file.
For example lets say a project has
<PackageVersion>1.0.5</PackageVersion>.
Now if I go to the project properties and edit the Package version to 1.0.6, a new tag is added to the project; <Version>1.0.6</Version> and the nuget package builds as version 1.0.5. This is not the behavior I would expect to see.
_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/154724/generate-nuget-package-on-build-package-version-fi.html
VSTS ticketId: 528659_
_These are the original issue comments:_
(no comments)
_These are the original issue solutions:_
(no solutions)
Contributor guide
Assessment
This issue has not been assessed yet.