mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #112961 from Repiteo/dotnet/vs2026-support
C#: Ensure mono editor supports Visual Studio 2026
This commit is contained in:
commit
d089d0e1e2
1 changed files with 6 additions and 12 deletions
|
|
@ -46,20 +46,14 @@ namespace GodotTools.OpenVisualStudio
|
|||
|
||||
if (dte == null)
|
||||
{
|
||||
// Open a new instance
|
||||
dte = TryVisualStudioLaunch("VisualStudio.DTE.17.0");
|
||||
dte = TryVisualStudioLaunch("VisualStudio.DTE.18.0") // Visual Studio 18 (2026).
|
||||
?? TryVisualStudioLaunch("VisualStudio.DTE.17.0"); // Visual Studio 17 (2022).
|
||||
|
||||
if (dte == null)
|
||||
{
|
||||
// Launch of VS 2022 failed, fallback to 2019
|
||||
dte = TryVisualStudioLaunch("VisualStudio.DTE.16.0");
|
||||
|
||||
if (dte == null)
|
||||
{
|
||||
Console.Error.WriteLine("Visual Studio not found");
|
||||
Console.Error.WriteLine("Could not find a supported Visual Studio version (VS 2026 or VS 2022).");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
dte.UserControl = true;
|
||||
|
||||
|
|
@ -188,8 +182,8 @@ namespace GodotTools.OpenVisualStudio
|
|||
if (ppszDisplayName == null)
|
||||
continue;
|
||||
|
||||
// The digits after the colon are the process ID
|
||||
if (!Regex.IsMatch(ppszDisplayName, "!VisualStudio.DTE.1[6-7].0:[0-9]"))
|
||||
// The digits after the colon are the process ID.
|
||||
if (!Regex.IsMatch(ppszDisplayName, "!VisualStudio.DTE.1[7-8].0:[0-9]"))
|
||||
continue;
|
||||
|
||||
if (pprot.GetObject(moniker[0], out object ppunkObject) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue