Skip to content

Commit 4b22efb

Browse files
authored
Workaround issue related to crossgen and specific .NET 9 runtimes (#77825)
Helps resolve dotnet/vscode-csharp#8034 Related to https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2419950 This arg appears to be triggering a crossgen related issue in some .NET 9 runtimes (specifically, 9.0.0 and upcoming 9.0.4), resulting in a BadImageFormatException being thrown loading the language server. Until we get to the bottom of the issue, we should remove this arg so that the server can function with these existing runtimes.
2 parents 6cf36cf + 6595387 commit 4b22efb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<Target Name="SetCrossgen2ExtraArgs" BeforeTargets="ResolveReadyToRunCompilers" Condition="'$(PublishReadyToRun)' == 'true'">
6666
<PropertyGroup>
6767
<!-- Define extra crossgen2 args. This must be done in a target as TargetName isn't available in evaluation -->
68-
<PublishReadyToRunCrossgen2ExtraArgs>$(PublishReadyToRunCrossgen2ExtraArgs);--opt-cross-module:*;--non-local-generics-module:"$(TargetName)"</PublishReadyToRunCrossgen2ExtraArgs>
68+
<PublishReadyToRunCrossgen2ExtraArgs>$(PublishReadyToRunCrossgen2ExtraArgs);--non-local-generics-module:"$(TargetName)"</PublishReadyToRunCrossgen2ExtraArgs>
6969
</PropertyGroup>
7070
</Target>
7171

0 commit comments

Comments
 (0)