microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

C# DevKit 1.3.x issue with [MSBuild]::StableStringHash #987

Closed JanKrivanek closed 6 months ago

JanKrivanek commented 7 months ago

Remedy

Upgrade to C# Dev Kit 1.4.x (any) and above

Issue Description

Fail to load the project successfully with errors about "[MSBuild]::StableStringHash..." image

[error] (C:\Users\v-wakang\BlazorServer\BlazorServer.csproj): The expression "[MSBuild]::StableStringHash(BlazorServer.csproj)" cannot be evaluated. Could not load type 'Microsoft.NET.StringTools.FowlerNollVo1aHash' from assembly 'Microsoft.NET.StringTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
[error] Failed to load project 'C:\Users\v-wakang\BlazorServer\BlazorServer.csproj'. One or more errors occurred. (The expression "[MSBuild]::StableStringHash(BlazorServer.csproj)" cannot be evaluated. Could not load type 'Microsoft.NET.StringTools.FowlerNollVo1aHash' from assembly 'Microsoft.NET.StringTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.  C:\Program Files\dotnet\sdk\9.0.100-preview.2.24120.18\Microsoft.Common.CurrentVersion.targets)

Reason

Issue is caused by incompatible version of MSBuild binaries being loaded byt the C# Dev Kit prerelease version 1.3.10. More details: https://github.com/dotnet/msbuild/issues/9765 The issue was fixed in the C# Dev Kit 1.4.2 and above.

arunchndr commented 7 months ago

@JanKrivanek would you work with @lifengl to do the needful to update the msbuild?

JanKrivanek commented 7 months ago

No action expected here. This issue is just for documentation purposes (as discussed with @webreidi) - in case there would still be users on 1.3 versions, searching the web for advise on this problem.

github-actions[bot] commented 6 months ago

This issue has been marked as stale after 14 days of inactivity. @[ @JanKrivanek, @lifengl @], could you please take a look?

JanKrivanek commented 6 months ago

Closing this - as it was created only for documentation purposes - and will serve such even in closed state.