Comments (9)
@blairconrad build metadata gets built into appears in the version in the nuspec inside the package. It does not appear in the filename. This is standard .NET SDK (dotnet pack
) behaviour.
from minver.
Reason being: build metadata really is just metadata. It's not part of the version. If it was included in the filename, you wouldn't be able to use the filesystem as a package source, since you'd have duplicate packages.
from minver.
Thanks for the explanation.
Ironically, this lack of metadata in the filename is exactly what's keeping me from using the filesystem as a package source. I want to subscribe to 2 different nupkgs, each of which were built as one-commit-past-develop
. The nupkgs' filenames collide now. I can manually rename the nupkgs after they are produced, but I didn't expect to have to.
As a side note, I'd've expected diagnostic-level output to output its calculated AssemblyVersion
, FileVersion
, PackageVersion
, and Version
(and I guess PackageFilenameVersion
or whatever, since it's distinct.)
from minver.
GitVersion had been putting part of the branch name in the generated filenames, and I realized that we'd lose that when switching to MinVer, but I had (erroneously) thought that the metadata would allow me to work around that.
from minver.
Ironically, this lack of metadata in the filename is exactly what's keeping me from using the filesystem as a package source. I want to subscribe to 2 different nupkgs, each of which were built as one-commit-past-develop. The nupkgs' filenames collide now. I can manually rename the nupkgs after they are produced, but I didn't expect to have to.
Can you describe more about this use case? I assume they were built on different branches?
As a side note, I'd've expected diagnostic-level output to output its calculated AssemblyVersion, FileVersion, PackageVersion, and Version (and I guess PackageFilenameVersion or whatever, since it's distinct.)
👍 sounds reasonable. Raised #147.
from minver.
Can you describe more about this use case? I assume they were built on different branches?
Sure. It's niche.
I'm benchmarking. BenchmarkDotNet lets me run benchmarks against various nuget versions. Sometimes I want to benchmark and compare a couple of changes, maybe each of them implemented by one commit off "develop". (Each on their own branch, as you say.)
I used to be able to build pack
on each branch, and out would pop a uniquely-named nupkg, which I'd subscribe to. Now, with the only potential differentiator in the filename being the number of commits since last tag, I'm getting collisions.
from minver.
OK. FWIW, I think I'm going to release another beta which will expose the pre-release part of the version as something like MinVerPreRelease
, which means you can override the versioning and stitch it together yourself, e.g.
<Target Name="MyTarget" AfterTargets="MinVer" Condition="'$(BRANCH)' != ''">
<PropertyGroup>
<PackageVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)-$(MinVerPrerelease).$(BRANCH)+$(MinVerBuildMetadata)</PackageVersion>
<Version>$(PackageVersion)</Version>
</PropertyGroup>
</Target>
I may even consider adding some kind of new input variable which allows you to inject a pre-release prefix and/or suffix into MinVer itself. 💭
from minver.
@blairconrad I guess this question is answered, but keep an eye on the new beta for things that might help your use case.
from minver.
Indeed. Thanks for your time!
from minver.
Related Issues (20)
- Tags are ignore when using tag prefixes in repository with mupltiple projects HOT 3
- Fails on `osx-arm64` HOT 9
- .NET 6 binaries HOT 2
- 4.1.0 release
- Error when git not installed HOT 5
- Produce an MSBuild error when Git is not present in PATH HOT 2
- Remove redundant MSB3073 error when a MinVer MSBuild error is produced HOT 1
- MinVer in WPF projects HOT 6
- 4.2.0 release
- Allow tags with the format v1.0 or v1.1 HOT 4
- 4.3.0 release
- Tags ignored with actions/checkout@v3 HOT 2
- Do not include MinVerBuildMetadata in PackageVersion HOT 5
- Allow for disabling the pre-release additions by a property value HOT 4
- disable MinVerAutoIncrement HOT 5
- 5.0.0 release
- MinVerBuildMetadata included in .Net 8 SDK build but not .Net 6 SDK HOT 5
- Is it time to revisit the MSBuild task idea? HOT 2
- Auto increment patch part not working HOT 2
- Allow a fourth "Revision" version part to be used. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minver.