mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
- Added check for dependencies, which can be installed from the builder. - Replaced CosmosTask with CosmosBuildDefinition, which is much simpler. - The builder can be opened without any command line arguments. - If the VS path is not specified as a command line argument, it can be selected in a dialog.
28 lines
741 B
C#
28 lines
741 B
C#
using System.IO;
|
|
using Microsoft.VisualStudio.Setup.Configuration;
|
|
|
|
namespace Cosmos.Build.Builder.Services
|
|
{
|
|
internal class FullMSBuildService : IMSBuildService
|
|
{
|
|
private ISetupInstance2 _visualStudioInstance;
|
|
|
|
public FullMSBuildService(ISetupInstance2 visualStudioInstance)
|
|
{
|
|
_visualStudioInstance = visualStudioInstance;
|
|
}
|
|
|
|
public string GetMSBuildExePath()
|
|
{
|
|
var msBuildExePath = Path.Combine(
|
|
_visualStudioInstance.GetInstallationPath(), "MSBuild", "15.0", "Bin", "MSBuild.exe");
|
|
|
|
if (File.Exists(msBuildExePath))
|
|
{
|
|
return msBuildExePath;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|