Microsoft.Css.Parser.dll has a product version that includes no commit hash metadata in the MSFT build, but source-build appends the VMR commit hash:
- MSFT:
1.0.0-20230414.1
- SB:
1.0.0-20230414.1+0f576f0a937886996ec6b606fbe9a0c37b5884b3
The source-build project cssparser.proj passes /p:VersionSuffix=$(CssParserReleaseVersionSuffix) but does not set IncludeSourceRevisionInInformationalVersion=false or explicitly set InformationalVersion. Because SourceLink is active in the VMR build environment, the SDK's AddSourceRevisionToInformationalVersion target appends +<VMR commit hash> to the InformationalVersion. The MSFT build of this package either has SourceLink disabled or IncludeSourceRevisionInInformationalVersion set to false, so no hash is appended.
Affected DLLs
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.Css.Parser.dll
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.StaticWebAssets/tasks/netx.y/Microsoft.Css.Parser.dll
Proposed Solution
Add /p:IncludeSourceRevisionInInformationalVersion=false to cssparser.proj to prevent the SDK from appending the VMR commit hash to InformationalVersion. This matches the MSFT build behavior where no hash is present.
Microsoft.Css.Parser.dllhas a product version that includes no commit hash metadata in the MSFT build, but source-build appends the VMR commit hash:1.0.0-20230414.11.0.0-20230414.1+0f576f0a937886996ec6b606fbe9a0c37b5884b3The source-build project
cssparser.projpasses/p:VersionSuffix=$(CssParserReleaseVersionSuffix)but does not setIncludeSourceRevisionInInformationalVersion=falseor explicitly setInformationalVersion. Because SourceLink is active in the VMR build environment, the SDK'sAddSourceRevisionToInformationalVersiontarget appends+<VMR commit hash>to the InformationalVersion. The MSFT build of this package either has SourceLink disabled orIncludeSourceRevisionInInformationalVersionset tofalse, so no hash is appended.Affected DLLs
sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.Css.Parser.dllsdk/x.y.z/Sdks/Microsoft.NET.Sdk.StaticWebAssets/tasks/netx.y/Microsoft.Css.Parser.dllProposed Solution
Add
/p:IncludeSourceRevisionInInformationalVersion=falsetocssparser.projto prevent the SDK from appending the VMR commit hash to InformationalVersion. This matches the MSFT build behavior where no hash is present.