WiP
This commit is contained in:
parent
19ed5a558b
commit
c25abfb7c7
5 changed files with 78 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
<UsingTask TaskName="Crossgen" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetBuildPJ" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetMSBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetNew" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPack" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPublish" AssemblyFile="$(CLIBuildDll)" />
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<Project DefaultTargets="RunValidation">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$(RepoRoot)/build/Microsoft.DotNet.Cli.tasks" />
|
||||
|
||||
<Target Name="RunValidation">
|
||||
<Message Text="================================"/>
|
||||
<DotNetMSBuild Arguments='$(MSBuildThisFileDirectory)/InvokeWithStage2.proj /p:ToolPath="$(Stage2Dir)" /v:diag'
|
||||
ToolPath="$(Stage2Dir)" />
|
||||
<Message Text="================================"/>
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,25 @@
|
|||
<Project DefaultTargets="RunValidation">
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildExtensionsPathInToolPath>false</MSBuildExtensionsPathInToolPath>
|
||||
<MSBuildExtensionsPathInToolPath Condition="$(MSBuildExtensionsPath.StartsWith('$(ToolPath)'))">true</MSBuildExtensionsPathInToolPath>
|
||||
<CscToolExeInToolPath>false</CscToolExeInToolPath>
|
||||
<CscToolExeInToolPath Condition="$(CscToolExe.StartsWith('$(ToolPath)'))">true</CscToolExeInToolPath>
|
||||
<MSBuildSDKsPathInToolPath>false</MSBuildSDKsPathInToolPath>
|
||||
<MSBuildSDKsPathInToolPath Condition="$(MSBuildSDKsPath.StartsWith('$(ToolPath)'))">true</MSBuildSDKsPathInToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="RunValidation">
|
||||
<Error Condition=" '$(ToolPath)' == '' "
|
||||
Text="ToolPath not set" />
|
||||
|
||||
<Error Condition=" '$(MSBuildExtensionsPathInToolPath)' == 'false' "
|
||||
Text="MSBuildExtensionsPath '$(MSBuildExtensionsPath)' not in ToolPath '$(ToolPath)'" />
|
||||
|
||||
<Error Condition=" '$(CscToolExeInToolPath)' == 'false' "
|
||||
Text="CscToolExe '$(CscToolExe)' not in ToolPath '$(ToolPath)'" />
|
||||
|
||||
<Error Condition=" '$(MSBuildSDKsPathInToolPath)' == 'false' "
|
||||
Text="MSBuildSDKsPath '$(MSBuildSDKsPath)' not in ToolPath '$(ToolPath)'" />
|
||||
</Target>
|
||||
</Project>
|
30
build_projects/dotnet-cli-build/DotNetMSBuild.cs
Normal file
30
build_projects/dotnet-cli-build/DotNetMSBuild.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetMSBuild : DotNetTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
get { return "msbuild"; }
|
||||
}
|
||||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetArguments()}"; }
|
||||
}
|
||||
|
||||
public string Arguments { get; set; }
|
||||
|
||||
private string GetArguments()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Arguments))
|
||||
{
|
||||
return $"{Arguments}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
|
@ -13,10 +14,20 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public DotNetTool()
|
||||
{
|
||||
Log.LogMessage(MessageImportance.High, "STARTING ");
|
||||
EnvironmentVariables = new EnvironmentFilter()
|
||||
.GetEnvironmentVariableNamesToRemove()
|
||||
.Select(e => $"{e}=")
|
||||
.ToArray();
|
||||
|
||||
Log.LogMessage(MessageImportance.High, "OVERRIDING ");
|
||||
|
||||
foreach (var ev in EnvironmentVariables)
|
||||
{
|
||||
Log.LogMessage(MessageImportance.High, $"{ev}");
|
||||
}
|
||||
|
||||
throw new Exception($"{EnvironmentVariables.Count()}");
|
||||
}
|
||||
|
||||
protected abstract string Command { get; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue