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,19 +46,13 @@ namespace GodotTools.OpenVisualStudio
|
||||||
|
|
||||||
if (dte == null)
|
if (dte == null)
|
||||||
{
|
{
|
||||||
// Open a new instance
|
dte = TryVisualStudioLaunch("VisualStudio.DTE.18.0") // Visual Studio 18 (2026).
|
||||||
dte = TryVisualStudioLaunch("VisualStudio.DTE.17.0");
|
?? TryVisualStudioLaunch("VisualStudio.DTE.17.0"); // Visual Studio 17 (2022).
|
||||||
|
|
||||||
if (dte == null)
|
if (dte == null)
|
||||||
{
|
{
|
||||||
// Launch of VS 2022 failed, fallback to 2019
|
Console.Error.WriteLine("Could not find a supported Visual Studio version (VS 2026 or VS 2022).");
|
||||||
dte = TryVisualStudioLaunch("VisualStudio.DTE.16.0");
|
return 1;
|
||||||
|
|
||||||
if (dte == null)
|
|
||||||
{
|
|
||||||
Console.Error.WriteLine("Visual Studio not found");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dte.UserControl = true;
|
dte.UserControl = true;
|
||||||
|
|
@ -188,8 +182,8 @@ namespace GodotTools.OpenVisualStudio
|
||||||
if (ppszDisplayName == null)
|
if (ppszDisplayName == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// The digits after the colon are the process ID
|
// The digits after the colon are the process ID.
|
||||||
if (!Regex.IsMatch(ppszDisplayName, "!VisualStudio.DTE.1[6-7].0:[0-9]"))
|
if (!Regex.IsMatch(ppszDisplayName, "!VisualStudio.DTE.1[7-8].0:[0-9]"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pprot.GetObject(moniker[0], out object ppunkObject) == 0)
|
if (pprot.GetObject(moniker[0], out object ppunkObject) == 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue