Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembly InformationalVersion now includes GUID suffix #37142

Closed
snakefoot opened this issue Nov 25, 2023 · 4 comments
Closed

Assembly InformationalVersion now includes GUID suffix #37142

snakefoot opened this issue Nov 25, 2023 · 4 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@snakefoot
Copy link

snakefoot commented Nov 25, 2023

Description

Have library-project with the following setting:

<InformationalVersion>2.0.0.2</InformationalVersion>

New Azure DevOps has updated to VisualStudio 2022 v17.8 (With NET8 support), then the following value is returned: 2.0.0.2+0fb16b11f9936e0374948c64e8c3b18db25b6fbf

Before when resolving the InformationalVersion from AssemblyInformationalVersionAttribute, then would have the expected value: 2.0.0.2

Reproduction Steps

Create library-project with the following setting:

<InformationalVersion>2.0.0.2</InformationalVersion>

Expected behavior

InformationalVersion from AssemblyInformationalVersionAttribute should return the specified value. Ex 2.0.0.2

Actual behavior

InformationalVersion from AssemblyInformationalVersionAttribute adds GUID-suffix to the value. Ex 2.0.0.2+0fb16b11f9936e0374948c64e8c3b18db25b6fbf

The GUID-suffix seems to change on every new build.

Regression?

It worked as expected before Azure DevOps was updated to VisualStudio 2022 v17.8 (With NET8 support)

Task         : Visual Studio build
Description  : Build with MSBuild and set the Visual Studio version property
Version      : 1.231.0

Known Workarounds

Rollback to older version:

Task         : Visual Studio build
Description  : Build with MSBuild and set the Visual Studio version property
Version      : 1.229.0

Configuration

Agent name: 'Hosted Agent'
Agent machine name: 'fv-az516-895'
Current agent version: '3.230.0'
Operating System
Microsoft Windows Server 2022
10.0.20348
Datacenter
Runner Image
Image: windows-2022
Version: 20231115.2.0

Task         : Visual Studio build
Description  : Build with MSBuild and set the Visual Studio version property
Version      : 1.231.0

Other information

No response

@ghost ghost added the untriaged Request triage from a team member label Nov 25, 2023
@snakefoot snakefoot changed the title InformationalVersion now includes GUID InformationalVersion now includes GUID suffix Nov 25, 2023
@snakefoot snakefoot changed the title InformationalVersion now includes GUID suffix Assembly InformationalVersion now includes GUID suffix Nov 25, 2023
@DL444
Copy link
Contributor

DL444 commented Nov 25, 2023

See dotnet/runtime#95134. It's not a GUID. It's the current Git commit hash used for Source Link.

@snakefoot
Copy link
Author

snakefoot commented Nov 25, 2023

I guess a git-commit-hash suffix makes sense, if project has requested it using something like:

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

Or specifying /p:ContinuousIntegrationBuild=true /p:EmbedUntrackedSources=true. But in this case the library-test-project doesn't request any Git-Repo-Commit-Hash-Identification.

But I will try adding <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> and see what happens.

@snakefoot
Copy link
Author

snakefoot commented Nov 25, 2023

I can confirm that <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> fixes the behavior.

@baronfel
Copy link
Member

I'm going to close this as we've made and documented this as a breaking change in .NET 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants