You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error in the .csproj file in the new pre-release version of the extension.
Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
'.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator.<>c.b__6_19(HostOutputProductionContext context, ValueTuple2 pair) at Microsoft.CodeAnalysis.UserFunctionExtensions.<>c__DisplayClass3_02.b__0(TInput1 input1, TInput2 input2, CancellationToken token) in /_/src/Compilers/Core/Portable/SourceGeneration/UserFunction.cs:line 103
(CS8785)
Steps to Reproduce
Go to a .csproj file and the error is shown at the top.
Expected Behavior
No error
Actual Behavior
Error
Logs
C# log
Post the output from Output-->C# here
C# LSP Trace Logs
Post the output from Output-->C# LSP Trace Logs here. Requires the `C#` output window log level to be set to `Trace`
Environment information
VSCode version: 1.100.0-insider C# Extension: 2.74.24 Using OmniSharp: false
Marked high-priority since this is showing fairly frequently in internal dogfooding as well. So a lot of pseudo upvotes that dont necessarily show here.
Type: Bug
Issue Description
There is an error in the
.csproj
file in the newpre-release
version of the extension.Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
'.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.Razor.Utilities.Shared, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator.<>c.b__6_19(HostOutputProductionContext context, ValueTuple
2 pair) at Microsoft.CodeAnalysis.UserFunctionExtensions.<>c__DisplayClass3_0
2.b__0(TInput1 input1, TInput2 input2, CancellationToken token) in /_/src/Compilers/Core/Portable/SourceGeneration/UserFunction.cs:line 103(CS8785)
Steps to Reproduce
Go to a
.csproj
file and the error is shown at the top.Expected Behavior
No error
Actual Behavior
Error
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.100.0-insider
C# Extension: 2.74.24
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 9.0.202 Commit: 3a53853c30 Workload version: 9.0.200-manifests.21502d11 MSBuild version: 17.13.13+1c2026462Runtime Environment:
OS Name: Mac OS X
OS Version: 15.4
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.202/
.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.3
Architecture: arm64
Commit: 831d23e561
.NET SDKs installed:
8.0.404 [/usr/local/share/dotnet/sdk]
8.0.407 [/usr/local/share/dotnet/sdk]
9.0.202 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.74.24
VS Code version: Code - Insiders 1.100.0-insider (1b000ef82b3c3082833f6b04e050bc0e4e12ae3b, 2025-04-18T05:31:28.011Z)
OS version: Darwin arm64 24.4.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: