浏览代码

Merge pull request #97198 from raulsntos/dotnet/open-visual-studio-with-dotnet-cli

C#: Use dotnet CLI to launch `OpenVisualStudio.dll`
Rémi Verschelde 11 月之前
父节点
当前提交
2f078e501c

+ 0 - 1
modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/GodotTools.OpenVisualStudio.csproj

@@ -5,7 +5,6 @@
     <TargetFramework>net6.0-windows</TargetFramework>
     <LangVersion>10</LangVersion>
     <Nullable>enable</Nullable>
-    <RuntimeIdentifier>win-x86</RuntimeIdentifier>
     <SelfContained>False</SelfContained>
     <RollForward>LatestMajor</RollForward>
   </PropertyGroup>

+ 2 - 1
modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs

@@ -259,11 +259,12 @@ namespace GodotTools
 
                     var args = new List<string>
                     {
+                        Path.Combine(GodotSharpDirs.DataEditorToolsDir, "GodotTools.OpenVisualStudio.dll"),
                         GodotSharpDirs.ProjectSlnPath,
                         line >= 0 ? $"{scriptPath};{line + 1};{col + 1}" : scriptPath
                     };
 
-                    string command = Path.Combine(GodotSharpDirs.DataEditorToolsDir, "GodotTools.OpenVisualStudio.exe");
+                    string command = DotNetFinder.FindDotNetExe() ?? "dotnet";
 
                     try
                     {