Calls electronize from the Path instead of via dotnet

This commit is contained in:
grbd
2019-05-08 19:31:29 +01:00
parent 597df77508
commit 4235aa4677
2 changed files with 14 additions and 11 deletions

View File

@@ -100,15 +100,16 @@ namespace ElectronNET.CLI.Commands
string launchSettingText = File.ReadAllText(launchSettingFile);
if (launchSettingText.Contains("electronize start") == false)
if (launchSettingText.Contains("\"executablePath\": \"electronize\"") == false)
{
StringBuilder debugProfileBuilder = new StringBuilder();
debugProfileBuilder.AppendLine("profiles\": {");
debugProfileBuilder.AppendLine("\"Electron.NET App\": {");
debugProfileBuilder.AppendLine("\"commandName\": \"Executable\",");
debugProfileBuilder.AppendLine("\"executablePath\": \"C:\\\\Program Files\\\\dotnet\\\\dotnet.exe\",");
debugProfileBuilder.AppendLine("\"commandLineArgs\": \"electronize start\"");
debugProfileBuilder.AppendLine("},");
debugProfileBuilder.AppendLine(" \"Electron.NET App\": {");
debugProfileBuilder.AppendLine(" \"commandName\": \"Executable\",");
debugProfileBuilder.AppendLine(" \"executablePath\": \"electronize\",");
debugProfileBuilder.AppendLine(" \"commandLineArgs\": \"start\",");
debugProfileBuilder.AppendLine(" \"workingDirectory\": \".\"");
debugProfileBuilder.AppendLine(" },");
launchSettingText = launchSettingText.Replace("profiles\": {", debugProfileBuilder.ToString());
File.WriteAllText(launchSettingFile, launchSettingText);

View File

@@ -8,6 +8,13 @@
}
},
"profiles": {
"Electron.NET App": {
"commandName": "Executable",
"executablePath": "electronize",
"commandLineArgs": "start",
"workingDirectory": "."
},
"IIS Express": {
"commandName": "IISExpress",
"environmentVariables": {
@@ -22,10 +29,5 @@
},
"applicationUrl": "http://localhost:50395/"
},
"Electron.NET App": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\dotnet\\dotnet.exe",
"commandLineArgs": "electronize start"
}
}
}