question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set version metadata?

See original GitHub issue
  1. I want to use the VersionPrefix property inside my csproj to define my package’s semver 2.0 (3-part) version.
  2. I want to attach a 4th part and build metadata on the command line.

In other words, I want to have the version be, e.g. “1.2.3.4+f0c432”

Where 1.2.3 is stored in the csproj and .4 comes from the CI environment and +40c432 is the commit hash.

The problem I’ve run into is that using --version-suffix automatically makes it a pre-release version, which I don’t want.

Even if I ignore the 4th number (build number), I can’t even do this:

dotnet build MyProj  --version-suffix "+f0c432"

Because:

/usr/local/share/dotnet/sdk/2.2.107/NuGet.targets(114,5): error : '1.2.3-+f0c432' is not a valid version string

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rmacfiecommented, Jun 14, 2020

@TheBoneJarmer you can set the exact version with dotnet pack -p:Version="[EXACT_FULL_VERSION]"

0reactions
PureKromecommented, Dec 1, 2021

what’s annoying here @jasonkarns is that the -p: / /p: is not, like, part of the nuget pack command, but just a “catchall” saying “just pass in anything else to the low level msbuild command”. Sure, that’s what all of this is doing.

But the version stuff should be a more “1st class” citizen of the dotnet pack command, IMO.

I’ll go and open a new issue to see if the team could consider adding this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you keep your metadata under version control?
Another solution is to export all metadata tables in text format (like XML), and then version those text files. But then you have...
Read more >
Configure the instance metadata options
Instance metadata options allow you to configure new or existing instances to do the following: Require the use of IMDSv2 when requesting instance...
Read more >
Diagnose Version Metadata (Data Management)—ArcGIS Pro
Only the geodatabase administrator can run the Diagnose Version Metadata tool. This tool is usually run at the direction of Esri Technical Support....
Read more >
for managing versioning of document sets i have to add ...
I wanted to make a Document management system for my self with using document set because each document No related to 2 or...
Read more >
1.15. Metadata versioning
Users can select the type of metadata which needs to be created. Metadata Version type governs how the importer should treat the given...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found