Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 17959e5

Browse files
author
David Karlaš
authored
Merge pull request #1966 from mono/dotnetcoreRespectStartProgram
[DotNetCore] Fix creation of execution command to respect StartProgram and StartAction arguments
2 parents b7c31fb + 1858834 commit 17959e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectExtension.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,12 @@ protected override ExecutionCommand OnCreateExecutionCommand (ConfigurationSelec
131131

132132
DotNetCoreExecutionCommand CreateDotNetCoreExecutionCommand (ConfigurationSelector configSel, DotNetProjectConfiguration configuration, ProjectRunConfiguration runConfiguration)
133133
{
134-
FilePath outputFileName = GetOutputFileName (configuration);
134+
FilePath outputFileName;
135135
var dotnetCoreRunConfiguration = runConfiguration as DotNetCoreRunConfiguration;
136+
if (dotnetCoreRunConfiguration?.StartAction == AssemblyRunConfiguration.StartActions.Program)
137+
outputFileName = dotnetCoreRunConfiguration.StartProgram;
138+
else
139+
outputFileName = GetOutputFileName (configuration);
136140

137141
return new DotNetCoreExecutionCommand (
138142
string.IsNullOrEmpty (dotnetCoreRunConfiguration?.StartWorkingDirectory) ? Project.BaseDirectory : dotnetCoreRunConfiguration.StartWorkingDirectory,

0 commit comments

Comments
 (0)