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.
34 lines
1,009 B
C#
34 lines
1,009 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
using Cosmos.Build.Builder.Services;
|
|
|
|
namespace Cosmos.Build.Builder.BuildTasks
|
|
{
|
|
internal class BuildTask : MSBuildTargetBuildTaskBase
|
|
{
|
|
private const string BuildTargetName = "Build";
|
|
|
|
public override string Name => $"Build - {Path.GetFileName(ProjectFilePath)}";
|
|
|
|
public override string ProjectFilePath { get; }
|
|
|
|
public override IEnumerable<string> Targets { get { yield return BuildTargetName; } }
|
|
|
|
protected override IReadOnlyDictionary<string, string> Properties => _properties;
|
|
|
|
private Dictionary<string, string> _properties;
|
|
|
|
public BuildTask(
|
|
IMSBuildService msBuildService,
|
|
string projectFilePath,
|
|
string outputPath)
|
|
: base(msBuildService)
|
|
{
|
|
ProjectFilePath = projectFilePath;
|
|
|
|
_properties = new Dictionary<string, string>();
|
|
_properties.Add("OutputPath", outputPath);
|
|
}
|
|
}
|
|
}
|