dotnet / dotnet/project-system
Not possible to set VersionPrefix for dotnet Standard/Core projects via UI
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
The "dotnet pack" command line tool allows an optional parameter to specify VersionSuffix which is great for creating pre-release packages for Nuget. This setting however only works if the project file has a VersionPrefix element, and not a Version element as Version always overrides any VersionPrefix.
The issue I have is that there is no way to set the VersionPrefix property via the UI (Project Properties -> Package -> PackageVersion). Manually updating the project file to have a VersionPrefix rather than a Version element works fine, and displays correctly in the Project Properties form, however subsequent edits to the field via the UI results in an unmodified VersionPrefix element, and a newly created Version element which then stops the "dotnet pack" command from applying the VersionSuffix.
Please not that this is a copy of the following issue:
https://developercommunity.visualstudio.com/content/problem/63124/not-possible-to-set-versionprefix-for-dotnet-stand.html
That isssue is reported as closed, but the fix mentioned is totally unrelated to the problem above.
_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/179117/not-possible-to-set-versionprefix-for-dotnet-stand-2.html
VSTS ticketId: 549205_
_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.