Skip to content

Microsoft.CodeAnalysis in 5.0.100 source-built Razor SDK is newer than Microsoft-built copy #1869

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

Closed
dagood opened this issue Nov 9, 2020 · 7 comments
Labels
area-upstream-fix Needs a change in a contributing repo

Comments

@dagood
Copy link
Member

dagood commented Nov 9, 2020

Microsoft.CodeAnalysis is also shipped with the Microsoft-built SDK:

$ tar tf ~/downloads/dotnet-sdk-5.0.100-linux-x64.tar.gz | grep Microsoft.CodeAnalysis.dll
./sdk/5.0.100/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.CodeAnalysis.dll
./sdk/5.0.100/Roslyn/bincore/Microsoft.CodeAnalysis.dll

I can't see the version of the bincore dll, but the Razor/tools version seems to be 3.7.0 (instead of 3.8.0) 😞

$ exiftool ./sdk/5.0.100/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.CodeAnalysis.dll | grep -i version
ExifTool Version Number         : 12.00
Linker Version                  : 48.0
OS Version                      : 4.0
Image Version                   : 0.0
Subsystem Version               : 4.0
File Version Number             : 3.700.20.37502
Product Version Number          : 0.0.0.0
File Version                    : 3.700.20.37502
Product Version                 : 3.7.0-6.20375.2+34202cc2f3e869fd70a26d8237f4552cf9e192cf
Assembly Version                : 3.7.0.0

Originally posted by @omajid in #1849 (comment)

(In the source-built SDK, Roslyn is 3.8.0 including in Sdks/Microsoft.NET.Sdk.Razor/tools.)

@dagood dagood closed this as completed Nov 9, 2020
@dagood dagood reopened this Nov 9, 2020
@dagood
Copy link
Member Author

dagood commented Nov 9, 2020

Assuming we're building 3.8.0 for some valid reason, this could mean the Microsoft SDK is incoherent. It might be fine for us to replace 3.7.0 with 3.8.0 in this case. But maybe we don't have a valid reason for 3.8.0?

@dagood
Copy link
Member Author

dagood commented Nov 9, 2020

Actually, directly inspecting all Microsoft.CodeAnalysis.dll files present shows that the SDK has incoherent versions:

#> 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

@dagood
Copy link
Member Author

dagood commented Nov 9, 2020

@JunTaoLuo, do you know if it's ok for source-build to use a 3.8.0 version at ./sdk/5.0.100/Sdks/Microsoft.NET.Sdk.Razor/tools/Microsoft.CodeAnalysis.dll rather than 3.7.0? Is the incoherency in Microsoft.NET.Sdk.Razor expected?

Is this something that should be fixed in 5.0 servicing in the Microsoft build to make it more coherent?

@dagood
Copy link
Member Author

dagood commented Nov 9, 2020

@mmitche, maybe you have some broader context over whether that incoherency is expected in the 5.0 SDK, if it's ok for source-build to use 3.8.0 in both cases?

@dagood
Copy link
Member Author

dagood commented Nov 19, 2020

Triage: @JunTaoLuo, @mmitche, any thoughts on this?

@dagood
Copy link
Member Author

dagood commented Nov 23, 2020

Filed dotnet/aspnetcore#28096 to figure out what the next steps are.

@dagood
Copy link
Member Author

dagood commented Nov 24, 2020

In dotnet/aspnetcore#28096 it's confirmed that using 3.8.0 in both places is fine. Closing.

There's a PR proposed for 5.0.1 to update the Microsoft build to use 3.8.0 in both places there, too.

In the future, when we start building multiple SDK bands, we may get incoherent again due to the nature of building an SDK tool inside a Runtime repo like aspnetcore. More details: dotnet/aspnetcore#28096 (comment)

@dagood dagood closed this as completed Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-upstream-fix Needs a change in a contributing repo
Projects
None yet
Development

No branches or pull requests

1 participant