Microsoft.CodeAnalysis incoherency in 5.0.100 SDK between 3.8.0 and Microsoft.NET.Sdk.Razor's 3.7.0
See original GitHub issueDescribe the bug
The 5.0.100 .NET SDK contains an incoherency between the “base” Roslyn version and the copy that’s redistributed by Microsoft.NET.Sdk.Razor
:
sdk/5.0.100/Roslyn/bincore/Microsoft.CodeAnalysis.dll
: version 3.8.0sdk/5.0.100/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.CodeAnalysis.dll
: version 3.7.0.
Is this something that needs to be fixed in the official build for 5.0.1 / 5.0.101 SDK? Or is this somehow intentional?
Source-build only builds one version of Roslyn: 3.8.0. Is it ok for source-build to put 3.8.0 in both places?
This started as https://github.com/dotnet/source-build/issues/1869. We need a response to make sure this doesn’t block 5.0.100 source-build.
@Pilchie /cc @JunTaoLuo @mmitche @dleeapho
To Reproduce
Download the 5.0.100 .NET SDK and examine these two DLLs with your favorite assembly version workflow. Or, follow these shell commands on Linux with PowerShell installed:
#> wget https://download.visualstudio.microsoft.com/download/pr/820db713-c9a5-466e-b72a-16f2f5ed00e2/628aa2a75f6aa270e77f4a83b3742fb8/dotnet-sdk-5.0.100-linux-x64.tar.gz
...
#> tar -xf dotnet-sdk-5.0.100-linux-x64.tar.gz
...
#> find . -iname 'Microsoft.CodeAnalysis.dll' -exec pwsh -c 'echo {}; [System.Reflection.AssemblyName]::GetAssemblyName("{}").Version.ToString()' \;
./sdk/5.0.100/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.CodeAnalysis.dll
3.7.0.0
./sdk/5.0.100/Roslyn/bincore/Microsoft.CodeAnalysis.dll
3.8.0.0
Further technical details
- ASP.NET Core version: 5.0.0
- .NET SDK version: 5.0.100
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >Microsoft.CodeAnalysis problem
Hello, I am receiving these suspisious waringns. Can someone help ? 1>CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.
Read more >.NET Core SDK 6.0.200: Could not load file or assembly ' ...
Describe the bug. Build fails with error: ##[error]CSC(0,0): Error CS8032: An instance of analyzer Microsoft.NET.Sdk.Razor.SourceGenerators.
Read more >Version conflict detected for Microsoft.CodeAnalysis. ...
I want to add the FluentValidation Nuget package in my asp.net core app through Nuget Package Manager.While adding I get this error: Severity ......
Read more >Microsoft.CodeAnalysis.Common 4.7.0
Version Downloads Last updated
4.7.0 2,627 2 days ago
4.7.0‑2.final 14,959 2 months ago
4.7.0‑1.final 32,267 3 months ago
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
Yup, we should be safe to update the versions here. Razor requires referencing two different versions of Roslyn
In the AspNetCore-Tooling repo, these used two different version numbers. When we migrated to the AspNetCore repo, these numbers got squished together. @mmitche / @dotnet/aspnet-build could you help me with the gesture required to automate version updates for the package? At least for the first bit, we should be using the newest all the time.
Yup, that’s my plan. It’s the least spooky thing to do