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

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

Closed
v-Judy opened this issue Feb 21, 2024 · 4 comments · Fixed by #9768
Closed
Assignees
Labels
bug needs-triage Have yet to determine what bucket this goes in.

Comments

@v-Judy
Copy link

v-Judy commented Feb 21, 2024

Issue Description

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

Steps to Reproduce

  1. Install the latest 9.0.100-preview.2 SDK from https://github.com/dotnet/installer
  2. Install the latest version of VSCodev1.86.2 and C# Dev Kitv1.3.10.
  3. Create a new console project and open it using VSCode.
  4. Wait for the project load completely

Expected Behavior

After the project load completely, the terminal without any errors or warnings.

Actual Behavior

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)

Analysis

  1. This issue reproduces on Windows/Linux/Mac OS.
  2. This issue does not repro on the sdk 9.0.100-preview.2.24116.21.
  3. There is a known closed issue #9538 on sdk 8.0.200, it fixed by #9572

Versions & Configurations

dotnet --info:

.NET SDK:
Version:           9.0.100-preview.2.24120.16
Commit:            1415dfd3e2
Workload version:  9.0.100-manifests.01ad020e
MSBuild version:   17.10.0-preview-24120-03+53c4f4986

Runtime Environment:
OS Name:     Mac OS X
OS Version:  14.0
OS Platform: Darwin
RID:         osx-x64
Base Path:   /usr/local/share/dotnet/sdk/9.0.100-preview.2.24120.16/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      9.0.0-preview.2.24120.8
  Architecture: x64
  Commit:       2756c94062

.NET SDKs installed:
  9.0.100-preview.2.24120.16 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.0-preview.2.24120.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.0-preview.2.24120.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
@v-Judy v-Judy added bug needs-triage Have yet to determine what bucket this goes in. labels Feb 21, 2024
@ladipro
Copy link
Member

ladipro commented Feb 21, 2024

The latest release version of CDK is 1.3.10 and it contains CPS at commit 38bd321c which has changes up to Jan 10th.

@JanKrivanek it looks like #9721 was merged before CDK shipped the assembly load context fix. Should we revert?

@JanKrivanek
Copy link
Member

JanKrivanek commented Feb 21, 2024

Yeah - too early :-/
Let's revert and wait for the fix to be backported to 1.3.x (or 1.3.x to age out)

@JanKrivanek
Copy link
Member

@v-Judy can you confirm the issue is not present with the same setup with C# DevKit 1.4.2?
We're going to temporarily revert the change and reintroduce once 1.3.x gets out of support, but want to be double sure that that's enough.
Thanks

@v-Judy
Copy link
Author

v-Judy commented Feb 22, 2024

@v-Judy can you confirm the issue is not present with the same setup with C# DevKit 1.4.2?

This issue does not repro on the same setup with C# DevKit 1.4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-triage Have yet to determine what bucket this goes in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants