Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions ElectronNET.CLI/Commands/InitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ private static void EditLaunchSettings(string currentDirectory)

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);
Expand Down
12 changes: 7 additions & 5 deletions ElectronNET.WebApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
}
},
"profiles": {
"Electron.NET App": {
"commandName": "Executable",
"executablePath": "electronize",
"commandLineArgs": "start",
"workingDirectory": "."
},

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