Skip to content

Commit

Permalink
Fix MSBuild not continuing until Visual Studio closed (#348)
Browse files Browse the repository at this point in the history
Setting `UseShellExecute` to `true` seems to fix the scenario when SlnGen is run as a task but MSBuild does not continue after the task completes since it monitors child processes.

Fixes #342
  • Loading branch information
jeffkl authored Apr 14, 2022
1 parent 53e0ac5 commit b375dad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="2.2.0" />
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.4.255" />
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.VisualStudio.SlnGen/VisualStudioLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static bool TryLaunch(ProgramArguments arguments, VisualStudioInstance vi
{
FileName = devEnvFullPath,
Arguments = commandLineBuilder.ToString(),
UseShellExecute = false,
UseShellExecute = true,
},
};

Expand Down

0 comments on commit b375dad

Please sign in to comment.