SourceLink will not set InformationalVersion from PackageVersion
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 370
Description
The guidance says
> If you're using Source Link, this version will be set on build with the NuGet package version plus a source control version.
This is not true, i.e. if you don't set `InformationalVersion` it will end up as `1.0.0+[sha1]` even if you set `PackageVersion` to `4.3.2`. Perhaps the sentence should read: "If you're using Source Link, a source control version will be appended on build."
This also means this guidance is misleading:
> ❌ AVOID setting the assembly informational version yourself.
> > Allow SourceLink to automatically generate the version containing NuGet and source control metadata.
It should perhaps instead read:
> ✔️ DO set the `InformationalVersion` to the same value as `PackageVersion`.
> > Allow SourceLink to automatically append the source control version.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: ffa1275e-9f51-c83e-7cbd-9dfc8abb6dea
* Version Independent ID: 899c196e-4aad-515f-2d04-525719244c69
* Content: [Versioning and .NET libraries](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning#assembly-informational-version)
* Content Source: [docs/standard/library-guidance/versioning.md](https://github.com/dotnet/docs/blob/master/docs/standard/library-guidance/versioning.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @JamesNK
* Microsoft Alias: **jamesnk**
Contributor guide
Assessment
This issue has not been assessed yet.