Set spectre.console version properties#1574
Conversation
|
@NikolaMilosavljevic - Have your reached out to spectre-console? Why not upstream a fix so they set the AssemblyVersion? |
I have not reached out yet. They do indirectly set the |
I understand why we can't use |
In Spectre.console repo build, since Of course, MSFT build consumes the package from nuget.org, produced by spectre.console repo build. That's why we get the assembly with version In source-build, since we do not have |
|
/backport to release/10.0 |
|
Started backporting to |
Fixes: dotnet/source-build#5466
Spectre.console repo produces assembly with
AssemblyVersionset to0.0.0.0. When building in this repo,MinVerpackage will be used for automatic versioning. It sets various version properties according to https://github.com/adamralph/minver?tab=readme-ov-file#version-numbersSince
AssemblyVersiongets set byMinVertarget/task, SDK'sGetAssemblyVersiontarget gets skipped.When building in SBRP repo, or in VMR, we build
Spectre.Consolewith a custom command line as specified in https://github.com/dotnet/source-build-reference-packages/blob/main/src/externalPackages/projects/spectre-console.projWe did not want to include additional dependent packages, like
MinVerso we had setUseBuildTimeToolstofalsewhich excludes additional external package dependencies: https://github.com/spectreconsole/spectre.console/blob/e097281ca8a50268b1022453fe6efd9112123a28/src/Directory.Build.props#L53-L54The fix is to explicitly set
AssemblyVersion. Since setting this property would cause the build to skipGetAssemblyVersiontarget, we are also settingFileVersionandInformationalVersionproperties that would have been set inGetAssemblyVersiontarget.