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.
Just hit this myself, it's pretty frustrating because people can easily break it and not notice it at all. This completely overrides the ability to create pre-release packages that are properly versioned.
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)