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

Visual Studio 2022 Lost Support for .NET 7 & 8 in 4.3 #91638

Closed
dxdesjardins opened this issue May 6, 2024 · 1 comment · Fixed by #91670
Closed

Visual Studio 2022 Lost Support for .NET 7 & 8 in 4.3 #91638

dxdesjardins opened this issue May 6, 2024 · 1 comment · Fixed by #91670

Comments

@dxdesjardins
Copy link

dxdesjardins commented May 6, 2024

Tested versions

Reproducible in 4.3 Dev 6 Mono when launching Visual Studio 2022 through the editor interface.
Not reproducible in 4.3 Dev 6 when launching Visual Studio Code through the editor interface.
Not reproducible in 4.2.1 and 4.2.2.

System information

Windows 11, Godot 4.3 Dev 6 Mono

Issue description

When attempting to open a script in Visual Studio 2022 via the interface editor in 4.3 Dev 6, you are only able to launch if you have .NET 6. If you have .NET 7 or 8, but not 6, you are unable to launch Visual Studio 2022.

You are able to launch Visual Studio Code with only .NET 7 and 8. This is only an issue with Visual Studio 2022.

I appear to have found the location of the issue. The generated file "Godot_v4.3-dev6_mono_win64\GodotSharp\Tools\GodotTools.OpenVisualStudio.runtimeconfig.json" contains the following:

{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

This file appears to be forcing users of Visual Studio to use .net 6. If you manually edit the "6" to your version of .NET ("8" for example), it will fix the issue for me.

Steps to reproduce

Attempt to open a script using visual studio without .NET 6.

Minimal reproduction project (MRP)

Download 4.3 Dev 6, create any script, and attempt to open it with Visual Studio 2022.

@dxdesjardins dxdesjardins changed the title Visual Studio 2022 Lost Support for .NET 7 & 8 on 4.3 Dev 6 Visual Studio 2022 Lost Support for .NET 7 & 8 in 4.3 May 6, 2024
@dxdesjardins
Copy link
Author

I cant find where to implement this, but if you made the below edit using "rollForward", it should fix the issue.

{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
"rollForward": "Major",
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

@raulsntos raulsntos added this to the 4.3 milestone May 7, 2024
ev1313 pushed a commit to ev1313/godot that referenced this issue May 8, 2024
huwpascoe pushed a commit to huwpascoe/godot that referenced this issue May 10, 2024
dimitry- pushed a commit to AndroidWasm/godot that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants