By default the command dotnet publish uses the debug configuration unless it was told to use release using the syntax -c|--configuration {Debug|Release}. An option for the configuration should be added to the command dotnet electronize build. Some more in depth argument parsing should be used to support things like using dotnet electronize build -c Release -r win or dotnet electronize build -r win -c release