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

Generator 'RazorSourceGenerator' failed to generate source #3410

Closed
MichaelSimons opened this issue Apr 21, 2023 · 3 comments · Fixed by dotnet/installer#16260
Closed

Generator 'RazorSourceGenerator' failed to generate source #3410

MichaelSimons opened this issue Apr 21, 2023 · 3 comments · Fixed by dotnet/installer#16260
Assignees
Labels
area-product-experience Improvements in the end-user's product experience untriaged

Comments

@MichaelSimons
Copy link
Member

The BlazorWasm test surfaces an issue with the RazorSourceGenerator. It appears that is has bundled an SBRP package with it and is trying to execute code from it.

CSC : warning CS8785: 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 'BadImageFormatException' with message 'Could not load file or assembly 'Microsoft.Extensions.ObjectPool, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Reference assemblies cannot be loaded for execution. (0x80131058)' [/repos/dotnet/test/Microsoft.DotNet.SourceBuild.SmokeTests/bin/Release/net8.0/projects-202304210321071372/WebScenarioTests_BlazorWasm_CSharp/WebScenarioTests_BlazorWasm_CSharp.csproj] [/repos/dotnet/build.proj]

The BlazorWasm WebScenarioTests will need re-enabling once this issue is resolved.

@MichaelSimons
Copy link
Member Author

@NikolaMilosavljevic - I see a source-build patch was introduced for this that references this issue as the backport. I am not finding the actual backport issue/PR to Razor. Can you link that here from traceability? TIA Ideally that is the issue/PR that would be linked to in the patch.

@NikolaMilosavljevic
Copy link
Member

@NikolaMilosavljevic - I see a source-build patch was introduced for this that references this issue as the backport. I am not finding the actual backport issue/PR to Razor. Can you link that here from traceability? TIA Ideally that is the issue/PR that would be linked to in the patch.

Working on razor PR right now - will open the issue as well and link to the main issue in source-build.

@NikolaMilosavljevic
Copy link
Member

Backport PR: dotnet/razor#8657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-product-experience Improvements in the end-user's product experience untriaged
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants