Merge pull request #409 from konstantingross/feature/Add_missing_config_parameter_#407

Add missing config parameter fixes #407
This commit is contained in:
Gregor Biswanger
2020-05-21 20:40:28 +02:00
committed by GitHub
3 changed files with 10 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ namespace ElectronNET.API
/// </list>
/// Your application should then always use <see cref="ShouldUseDarkColorsAsync"/> to determine what CSS to apply.
/// </summary>
/// <param name="themeSource">The new ThemeSource.</param>
/// <param name="themeSourceMode">The new ThemeSource.</param>
public void SetThemeSource(ThemeSourceMode themeSourceMode)
{
var themeSource = themeSourceMode.GetDescription();

View File

@@ -27,6 +27,7 @@ namespace ElectronNET.CLI.Commands
private string _manifest = "manifest";
private string _clearCache = "clear-cache";
private string _paramPublishReadyToRun = "PublishReadyToRun";
private string _paramDotNetConfig = "dotnet-configuration";
public Task<bool> ExecuteAsync()
{
@@ -73,9 +74,15 @@ namespace ElectronNET.CLI.Commands
publishReadyToRun += "true";
}
string configuration = "Release";
if (parser.Arguments.ContainsKey(_paramDotNetConfig))
{
configuration = parser.Arguments[_paramDotNetConfig][0];
}
if (parser != null && !parser.Arguments.ContainsKey("watch"))
{
resultCode = ProcessHelper.CmdExecute($"dotnet publish -r {platformInfo.NetCorePublishRid} --output \"{tempBinPath}\" {publishReadyToRun} --no-self-contained", aspCoreProjectPath);
resultCode = ProcessHelper.CmdExecute($"dotnet publish -r {platformInfo.NetCorePublishRid} -c {configuration} --output \"{tempBinPath}\" {publishReadyToRun} --no-self-contained", aspCoreProjectPath);
}
if (resultCode != 0)

View File

@@ -2,7 +2,7 @@
"profiles": {
"ElectronNET.CLI": {
"commandName": "Project",
"commandLineArgs": "start /project-path \"C:\\Users\\Rizvi\\source\\repos\\Electron.NET\\ElectronNET.WebApp\" /watch"
"commandLineArgs": "start /project-path \"$(SolutionDir)\\ElectronNET.WebApp\" /watch"
}
}
}