The analyzer assembly references version '4.6.0.0' of the compiler, which is newer than the currently running version '4.5.0.0'
See original GitHub issueI’m working on a non-public project. I can provide a repro and/or binlog via Teams.
Having moved to the latest .NET SDK from:
{
"sdk": {
"version": "8.0.100-alpha.1.23061.8"
},
"tools": {
"dotnet": "8.0.100-alpha.1.23061.8"
}
}
…to
{
"sdk": {
"version": "8.0.100-preview.2.23115.11"
},
"tools": {
"dotnet": "8.0.100-preview.2.23115.11"
}
}
I’m no longer able to build:
Build FAILED.
CSC : error CS9057: The analyzer assembly 'D:\Dev\test\.dotnet\sdk\8.0.100-preview.2.23115.11\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CodeStyle.dll' references version '4.6.0.0' of the comp
iler, which is newer than the currently running version '4.5.0.0'. [D:\Dev\test\src\Analyzers\Roslyn4.0\Analyzers.Roslyn4.0.csproj]
CSC : error CS9057: The analyzer assembly 'D:\Dev\test\.dotnet\sdk\8.0.100-preview.2.23115.11\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll' references version '4.6.0.0' of t
he compiler, which is newer than the currently running version '4.5.0.0'. [D:\Dev\test\src\Analyzers\Roslyn4.0\Analyzers.Roslyn4.0.csproj]
0 Warning(s)
2 Error(s)
Welp? 😃
Issue Analytics
- State:
- Created 7 months ago
- Reactions:9
- Comments:16 (15 by maintainers)
Top Results From Across the Web
How to fix "The analyzer assembly references version '4.7. ...
Razor.SourceGenerators.dll' references version '4.7.0.0' of the compiler, which is newer than the currently running version '4.6.0.0'.".
Read more >Troubleshoot .NET Framework targeting errors
Reference a project or assembly that targets a different version of .NET. You can create applications that reference projects or assemblies that ...
Read more >Build Issues when building with .net SDK > 7.0.203 - YouTrack
NET.Sdk.Razor.SourceGenerators.dll' references version '4.6.0.0' of the compiler, which is newer than the currently running version '4.5.
Read more >Assembly Has a Higher Version Than Referenced .NET Error
This error indicates that there is a version mismatch between what is referenced by the assembly (<Y.Y.Y.Y>) and what the project is pointed ......
Read more >Dotnet MSBuild fails in docker when source generated file ...
1/analyzers/dotnet/cs/MyGenerator.dll' references version '4.5.0.0' of the compiler, which is newer than the currently running version '4.3.0.0' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d consider that super niche scenario though that we do not support. It might mean some IDE features are broken.
I hit this trying to build an older branch of the .NET SDK because the global.json from arcade was pinning to an older assembly version. Anyone else who hits this with a dev sdk should try to update their
engfolder to matchmainif using a newer preview SDK.