Merge pull request #7522 from dsplaisted/fix-incremental-build
Rearrange output folders
This commit is contained in:
commit
c266e398cf
134 changed files with 330 additions and 682 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -96,6 +96,7 @@ dlldata.c
|
||||||
# DNX
|
# DNX
|
||||||
project.lock.json
|
project.lock.json
|
||||||
artifacts/
|
artifacts/
|
||||||
|
bin/
|
||||||
|
|
||||||
*_i.c
|
*_i.c
|
||||||
*_p.c
|
*_p.c
|
||||||
|
|
61
Directory.Build.props
Normal file
61
Directory.Build.props
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Projects which don't import dir.props:
|
||||||
|
|
||||||
|
build\RestoreDependency.proj
|
||||||
|
build\Signing.proj
|
||||||
|
build\package\Installer.DEB.proj
|
||||||
|
build\sdks\sdks.csproj
|
||||||
|
build\templates\templates.csproj
|
||||||
|
build\test\RunTest.proj
|
||||||
|
build_projects\Microsoft.DotNet.Cli.Build.SelfTest\InvokeWithStage2.proj
|
||||||
|
build_projects\update-dependencies\update-dependencies.csproj
|
||||||
|
tools\TestAssetsDependencies\TestAssetsDependencies.csproj
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||||
|
|
||||||
|
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
||||||
|
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||||
|
|
||||||
|
<CLIBuildDll>$(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll</CLIBuildDll>
|
||||||
|
|
||||||
|
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||||
|
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
|
||||||
|
|
||||||
|
<CliTargetFramework>netcoreapp2.1</CliTargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="build/InitRepo.props" />
|
||||||
|
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
|
||||||
|
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(HostInfoProps)" />
|
||||||
|
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(BuildInfoProps)" />
|
||||||
|
|
||||||
|
<Import Project="build/BranchInfo.props" />
|
||||||
|
|
||||||
|
<Import Project="build/BundledTools.props" />
|
||||||
|
<Import Project="build/BundledSdks.props" />
|
||||||
|
<Import Project="build/BundledTemplates.props" />
|
||||||
|
<Import Project="build/DependencyVersions.props" />
|
||||||
|
<Import Project="build/Version.props" />
|
||||||
|
<Import Project="build/Branding.props" />
|
||||||
|
|
||||||
|
<Import Project="build/DerivedHostMachineInfo.props" />
|
||||||
|
<Import Project="build/FileExtensions.props" />
|
||||||
|
<Import Project="build/InputDirectories.props" />
|
||||||
|
<Import Project="build/MSBuildExtensions.props" />
|
||||||
|
<Import Project="build/SetupPreviousStage.props" />
|
||||||
|
<Import Project="build/OutputDirectories.props" />
|
||||||
|
<Import Project="build/BuildDefaults.props" />
|
||||||
|
<Import Project="build/VersionBadge.props" />
|
||||||
|
<Import Project="build/BundledRuntimes.props" />
|
||||||
|
<Import Project="build/CrossGen.props" />
|
||||||
|
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
|
||||||
|
|
||||||
|
<Import Project="build/AzureInfo.props" />
|
||||||
|
<Import Project="build/InstallerInfo.props" />
|
||||||
|
<Import Project="build/GenerateResxSource.targets" />
|
||||||
|
</Project>
|
|
@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
|
||||||
build\RestoreDependency.proj = build\RestoreDependency.proj
|
build\RestoreDependency.proj = build\RestoreDependency.proj
|
||||||
build\sdks\sdks.csproj = build\sdks\sdks.csproj
|
build\sdks\sdks.csproj = build\sdks\sdks.csproj
|
||||||
build\Signing.proj = build\Signing.proj
|
build\Signing.proj = build\Signing.proj
|
||||||
build\Stage0.props = build\Stage0.props
|
build\SetupPreviousStage.props = build\SetupPreviousStage.props
|
||||||
build\Test.targets = build\Test.targets
|
build\Test.targets = build\Test.targets
|
||||||
build\Version.props = build\Version.props
|
build\Version.props = build\Version.props
|
||||||
build\VersionBadge.props = build\VersionBadge.props
|
build\VersionBadge.props = build\VersionBadge.props
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50</AssetTargetFallback>
|
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50</AssetTargetFallback>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<AssemblyName>AppWithRedirectsAndConfig</AssemblyName>
|
<AssemblyName>AppWithRedirectsAndConfig</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<AssemblyName>AppWithRedirectsNoConfig</AssemblyName>
|
<AssemblyName>AppWithRedirectsNoConfig</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -3,6 +3,7 @@
|
||||||
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
|
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.1</AssetTargetFallback>
|
<AssetTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.1</AssetTargetFallback>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
3
TestAssets/Directory.Build.props
Normal file
3
TestAssets/Directory.Build.props
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<Project>
|
||||||
|
<!-- Empty Directory.Build.props file to prevent test asset projects from picking up the repo's Directory.Build.props' -->
|
||||||
|
</Project>
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="testpackages" value="../../artifacts/testpackages/packages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages/packages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -7,6 +7,7 @@
|
||||||
<AssemblyName>AppWithDirectDep</AssemblyName>
|
<AssemblyName>AppWithDirectDep</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages/packages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
|
||||||
<clear />
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>net451;netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>net451;netcoreapp2.1</TargetFrameworks>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -8,6 +8,7 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
<AssetTargetFallback>$(AssetTargetFallback);dnxcore50;portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>$(AssetTargetFallback);dnxcore50;portable-net45+win8</AssetTargetFallback>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -5,6 +5,7 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="Local" value="Packages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -4,6 +4,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"projects": [ ".", "../../src" ]
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="Directory.Build.props" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.cs" Exclude="build_projects/**/obj/**/*.cs" />
|
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.cs" Exclude="build_projects/**/obj/**/*.cs" />
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
DependsOnTargets="MSBuildWorkaroundTarget;
|
DependsOnTargets="MSBuildWorkaroundTarget;
|
||||||
RestoreDotnetCliBuildFramework">
|
RestoreDotnetCliBuildFramework">
|
||||||
|
|
||||||
<Exec Command="$(DotnetStage0) publish --no-restore -o $(DotnetCliBuildDirectory)/bin --framework $(CliTargetFramework) /p:GeneratePropsFile=$(GeneratePropsFile)"
|
<Exec Command="$(PreviousStageDotnet) publish --no-restore -o $(DotnetCliBuildDirectory)/bin --framework $(CliTargetFramework) /p:GeneratePropsFile=$(GeneratePropsFile)"
|
||||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
|
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Exec Command="$(DotnetStage0) restore $(ExtraRestoreArgs)"
|
<Exec Command="$(PreviousStageDotnet) restore $(ExtraRestoreArgs)"
|
||||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<Target Name="EnsureTemplateRestored"
|
<Target Name="EnsureTemplateRestored"
|
||||||
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).nuspec')">
|
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).nuspec')">
|
||||||
<DotNetRestore ToolPath="$(Stage0Directory)"
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||||
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
||||||
AdditionalParameters="/p:TemplatePackageName=$(TemplatePackageName) /p:TemplatePackageVersion=$(TemplatePackageVersion)" />
|
AdditionalParameters="/p:TemplatePackageName=$(TemplatePackageName) /p:TemplatePackageVersion=$(TemplatePackageVersion)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir>
|
<GeneratedPropsDir>$(RepoRoot)/bin/obj</GeneratedPropsDir>
|
||||||
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
|
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
|
||||||
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
|
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
|
||||||
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
|
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
NuGetPackagesDir=$(NuGetPackagesDir);
|
NuGetPackagesDir=$(NuGetPackagesDir);
|
||||||
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
|
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
|
||||||
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
|
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
|
||||||
Stage0Directory=$(Stage0Directory)
|
PreviousStageDirectory=$(PreviousStageDirectory)
|
||||||
</Properties>
|
</Properties>
|
||||||
</ExtensionRestore>
|
</ExtensionRestore>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="DependencyVersions.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RepoRoot>$(MSBuildThisFileDirectory)/..</RepoRoot>
|
|
||||||
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
|
||||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||||
|
|
||||||
<MicroBuildPropsAndTargetsPath>$(NuGetPackagesDir)/microbuild.core/$(MicroBuildVersion)/build/</MicroBuildPropsAndTargetsPath>
|
<MicroBuildPropsAndTargetsPath>$(NuGetPackagesDir)/microbuild.core/$(MicroBuildVersion)/build/</MicroBuildPropsAndTargetsPath>
|
||||||
|
|
|
@ -1,23 +1,34 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BaseOutputDirectory>$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
|
<CliBuildStage Condition="'$(CliBuildStage)' == '' And '$(CliOuterBuildStage)' != ''">$([MSBuild]::Add($(CliOuterBuildStage), '1'))</CliBuildStage>
|
||||||
<OutputDirectory>$(BaseOutputDirectory)/stage2</OutputDirectory>
|
<CliBuildStage Condition="'$(CliBuildStage)' == ''">2</CliBuildStage>
|
||||||
<Stage2WithBackwardsCompatibleRuntimesOutputDirectory>$(BaseOutputDirectory)/stage2WithBackwardsCompatibleRuntimes</Stage2WithBackwardsCompatibleRuntimesOutputDirectory>
|
|
||||||
|
<!-- BaseOutputDirectory is the root output path for this stage and RID
|
||||||
|
BaseOutputPath is the project-specific output folder that each project builds into.
|
||||||
|
This is not confusing at all. -->
|
||||||
|
<BaseOutputDirectory>$(RepoRoot)/bin/$(CliBuildStage)/$(Rid)</BaseOutputDirectory>
|
||||||
|
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))</BaseOutputPath>
|
||||||
|
|
||||||
|
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))</BaseIntermediateOutputPath>
|
||||||
|
<OutputDirectory>$(BaseOutputDirectory)/dotnet</OutputDirectory>
|
||||||
|
<Stage2WithBackwardsCompatibleRuntimesOutputDirectory>$(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes</Stage2WithBackwardsCompatibleRuntimesOutputDirectory>
|
||||||
<SdkOutputDirectory>$(OutputDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
|
<SdkOutputDirectory>$(OutputDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
|
||||||
<SymbolsDirectory>$(BaseOutputDirectory)/stage2symbols</SymbolsDirectory>
|
<SymbolsDirectory>$(BaseOutputDirectory)/symbols</SymbolsDirectory>
|
||||||
<RoslynDirectory>$(SdkOutputDirectory)/Roslyn</RoslynDirectory>
|
<RoslynDirectory>$(SdkOutputDirectory)/Roslyn</RoslynDirectory>
|
||||||
<FSharpDirectory>$(SdkOutputDirectory)/FSharp</FSharpDirectory>
|
<FSharpDirectory>$(SdkOutputDirectory)/FSharp</FSharpDirectory>
|
||||||
<CompilationDirectory>$(BaseOutputDirectory)/stage2compilation</CompilationDirectory>
|
<CompilationDirectory>$(BaseOutputDirectory)/compilation</CompilationDirectory>
|
||||||
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
||||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
||||||
<!-- The 'AspNetRuntimePackageStorePublishDirectory' needs to be very short due to path length constraints on Win8.1 -->
|
<!-- The 'AspNetRuntimePackageStorePublishDirectory' needs to be very short due to path length constraints on Win8.1 -->
|
||||||
<AspNetRuntimePackageStorePublishDirectory>$(BaseOutputDirectory)/AspRT</AspNetRuntimePackageStorePublishDirectory>
|
<AspNetRuntimePackageStorePublishDirectory>$(BaseOutputDirectory)/AspRT</AspNetRuntimePackageStorePublishDirectory>
|
||||||
<BackwardsCompatibleSharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish</BackwardsCompatibleSharedFrameworksPublishDirectory>
|
<BackwardsCompatibleSharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish</BackwardsCompatibleSharedFrameworksPublishDirectory>
|
||||||
<TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir>
|
<TestOutputDir>$(BaseOutputDirectory)/test/</TestOutputDir>
|
||||||
<DotnetInOutputDirectory>$(OutputDirectory)/dotnet$(ExeExtension)</DotnetInOutputDirectory>
|
<DotnetInOutputDirectory>$(OutputDirectory)/dotnet$(ExeExtension)</DotnetInOutputDirectory>
|
||||||
<GeneratedMSBuildExtensionsDirectory>$(IntermediateDirectory)/GeneratedMSBuildExtensions</GeneratedMSBuildExtensionsDirectory>
|
<GeneratedMSBuildExtensionsDirectory>$(IntermediateDirectory)/GeneratedMSBuildExtensions</GeneratedMSBuildExtensionsDirectory>
|
||||||
<MSBuildExtensionsLayoutDirectory>$(IntermediateDirectory)/MSBuildExtensionsLayout</MSBuildExtensionsLayoutDirectory>
|
<MSBuildExtensionsLayoutDirectory>$(IntermediateDirectory)/MSBuildExtensionsLayout</MSBuildExtensionsLayoutDirectory>
|
||||||
<SdkResolverOutputDirectory>$(MSBuildExtensionsLayoutDirectory)/MSBuildSdkResolver</SdkResolverOutputDirectory>
|
<SdkResolverOutputDirectory>$(MSBuildExtensionsLayoutDirectory)/MSBuildSdkResolver</SdkResolverOutputDirectory>
|
||||||
|
|
||||||
|
<NextStagePropsPath>$(BaseOutputDirectory)/PreviousStage.props</NextStagePropsPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Import Project="prepare/CheckPrereqs.targets" />
|
<Import Project="prepare/CheckPrereqs.targets" />
|
||||||
|
|
||||||
<Target Name="Prepare"
|
<Target Name="Prepare"
|
||||||
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages" />
|
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" />
|
||||||
|
|
||||||
<Target Name="Init"
|
<Target Name="Init"
|
||||||
DependsOnTargets="PrintBuildInfo;
|
DependsOnTargets="PrintBuildInfo;
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
<CallTarget Targets="CleanSrcLockFiles" />
|
<CallTarget Targets="CleanSrcLockFiles" />
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(Stage0Directory)"
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||||
ProjectPath=""%(RestoreSrcPackagesInput.FullPath)"" />
|
ProjectPath=""%(RestoreSrcPackagesInput.FullPath)"" />
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
<CallTarget Targets="CleanToolsLockFiles" />
|
<CallTarget Targets="CleanToolsLockFiles" />
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(Stage0Directory)"
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||||
ProjectPath=""%(RestoreToolsPackagesInput.FullPath)""
|
ProjectPath=""%(RestoreToolsPackagesInput.FullPath)""
|
||||||
AdditionalParameters="/p:UsePortableLinuxSharedFramework=$(UsePortableLinuxSharedFramework)" />
|
AdditionalParameters="/p:UsePortableLinuxSharedFramework=$(UsePortableLinuxSharedFramework)" />
|
||||||
|
|
||||||
|
@ -98,4 +98,38 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="IsolateArtifactsFromDirectoryBuildFiles">
|
||||||
|
<Copy SourceFiles="$(RepoRoot)TestAssets\Directory.Build.props"
|
||||||
|
DestinationFolder ="$(RepoRoot)bin"
|
||||||
|
SkipUnchangedFiles="true" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="CreatePropsForNextStage">
|
||||||
|
<PropertyGroup>
|
||||||
|
|
||||||
|
<NextStagePropsContent>
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory>
|
||||||
|
<PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet>
|
||||||
|
<CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
|
</NextStagePropsContent>
|
||||||
|
|
||||||
|
<ExistingNextStagePropsContent Condition=" Exists('$(NextStagePropsPath)') ">
|
||||||
|
$([System.IO.File]::ReadAllText($(NextStagePropsPath)))
|
||||||
|
</ExistingNextStagePropsContent>
|
||||||
|
|
||||||
|
<ShouldOverwriteNextStagePropsFile>false</ShouldOverwriteNextStagePropsFile>
|
||||||
|
<ShouldOverwriteNextStagePropsFile
|
||||||
|
Condition=" '$(ExistingNextStagePropsContent.Trim())' != '$(NextStagePropsContent.Trim())' ">true</ShouldOverwriteNextStagePropsFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<WriteLinesToFile File="$(NextStagePropsPath)"
|
||||||
|
Lines="$(NextStagePropsContent)"
|
||||||
|
Condition=" '$(ShouldOverwriteNextStagePropsFile)' == 'true' "
|
||||||
|
Overwrite="true" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<Target Name="EnsureDependencyRestored"
|
<Target Name="EnsureDependencyRestored"
|
||||||
Condition="!Exists('$(DependencyNuPkgPath)/$(DependencyPackageName.ToLower()).nuspec')">
|
Condition="!Exists('$(DependencyNuPkgPath)/$(DependencyPackageName.ToLower()).nuspec')">
|
||||||
<DotNetRestore ToolPath="$(Stage0Directory)"
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||||
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
|
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
|
||||||
AdditionalParameters="/p:DependencyPackageName=$(DependencyPackageName) /p:DependencyPackageVersion=$(DependencyPackageVersion)" />
|
AdditionalParameters="/p:DependencyPackageName=$(DependencyPackageName) /p:DependencyPackageVersion=$(DependencyPackageVersion)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
13
build/SetupPreviousStage.props
Normal file
13
build/SetupPreviousStage.props
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup Condition="'$(PreviousStageProps)' == ''">
|
||||||
|
<PreviousStageDirectory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</PreviousStageDirectory>
|
||||||
|
<PreviousStageDotnet>$(PreviousStageDirectory)/dotnet$(ExeExtension)</PreviousStageDotnet>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="$(PreviousStageProps)" Condition="'$(PreviousStageProps)' != ''" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||||
|
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -1,9 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\dir.props" />
|
||||||
<Import Project="MicroBuild.props" />
|
<Import Project="MicroBuild.props" />
|
||||||
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props" />
|
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props" />
|
||||||
<Import Project="InitRepo.props" />
|
|
||||||
<Import Project="$(BuildInfoProps)" />
|
|
||||||
|
|
||||||
<!-- This will be overridden if we're building with MicroBuild. -->
|
<!-- This will be overridden if we're building with MicroBuild. -->
|
||||||
<Target Name="SignFiles">
|
<Target Name="SignFiles">
|
||||||
|
@ -13,10 +12,6 @@
|
||||||
<Target Name="SetSigningProperties">
|
<Target Name="SetSigningProperties">
|
||||||
<Error Condition="'$(Rid)' == ''" Text="Missing required property 'Rid'." />
|
<Error Condition="'$(Rid)' == ''" Text="Missing required property 'Rid'." />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BaseOutputDirectory Condition="'$(BaseOutputDirectory)' == ''">$(RepoRoot)/artifacts/$(Rid)</BaseOutputDirectory>
|
|
||||||
<OutputDirectory Condition="'$(OutputDirectory)' == ''">$(BaseOutputDirectory)/stage2</OutputDirectory>
|
|
||||||
<CompilationDirectory Condition="'$(CompilationDirectory)' == ''">$(BaseOutputDirectory)/stage2compilation</CompilationDirectory>
|
|
||||||
<PackagesDirectory Condition="'$(PackagesDirectory)' == ''">$(BaseOutputDirectory)/packages</PackagesDirectory>
|
|
||||||
<SdkResolverOutputDirectory>$(BaseOutputDirectory)/intermediate/MSBuildExtensionsLayout/MSBuildSdkResolver</SdkResolverOutputDirectory>
|
<SdkResolverOutputDirectory>$(BaseOutputDirectory)/intermediate/MSBuildExtensionsLayout/MSBuildSdkResolver</SdkResolverOutputDirectory>
|
||||||
|
|
||||||
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
|
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
|
||||||
|
@ -62,12 +57,9 @@
|
||||||
<Target Name="SignNuPkgContents" DependsOnTargets="GetSignNuPkgContentsFiles;SignFiles" />
|
<Target Name="SignNuPkgContents" DependsOnTargets="GetSignNuPkgContentsFiles;SignFiles" />
|
||||||
|
|
||||||
<Target Name="GetSignNuPkgContentsFiles">
|
<Target Name="GetSignNuPkgContentsFiles">
|
||||||
<PropertyGroup>
|
|
||||||
<OutDir>$(RepoRoot)/src/Microsoft.DotNet.Cli.Utils</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- NuPkg contents -->
|
<!-- NuPkg contents -->
|
||||||
<FilesToSign Include="$(OutDir)/bin/**/Microsoft.DotNet.Cli.Utils.dll">
|
<FilesToSign Include="$(BaseOutputDirectory)/bin/Microsoft.DotNet.Cli.Utils/**/Microsoft.DotNet.Cli.Utils.dll">
|
||||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||||
</FilesToSign>
|
</FilesToSign>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -76,9 +68,6 @@
|
||||||
<Target Name="SignSdkResolverContents" DependsOnTargets="GetSignSdkResolverContentsFiles;SignFiles" />
|
<Target Name="SignSdkResolverContents" DependsOnTargets="GetSignSdkResolverContentsFiles;SignFiles" />
|
||||||
|
|
||||||
<Target Name="GetSignSdkResolverContentsFiles">
|
<Target Name="GetSignSdkResolverContentsFiles">
|
||||||
<PropertyGroup>
|
|
||||||
<OutDir>$(SdkResolverOutputDirectory)</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FilesToSign Include="$(SdkResolverOutputDirectory)/Microsoft.DotNet.MSBuildSdkResolver.dll">
|
<FilesToSign Include="$(SdkResolverOutputDirectory)/Microsoft.DotNet.MSBuildSdkResolver.dll">
|
||||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||||
|
@ -89,9 +78,6 @@
|
||||||
<Target Name="SignMsiAndCab" DependsOnTargets="GetSignMsiAndCabFiles;SignFiles" />
|
<Target Name="SignMsiAndCab" DependsOnTargets="GetSignMsiAndCabFiles;SignFiles" />
|
||||||
|
|
||||||
<Target Name="GetSignMsiAndCabFiles">
|
<Target Name="GetSignMsiAndCabFiles">
|
||||||
<PropertyGroup>
|
|
||||||
<OutDir>$(PackagesDirectory)</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FilesToSign Include="$(PackagesDirectory)/**/*.msi">
|
<FilesToSign Include="$(PackagesDirectory)/**/*.msi">
|
||||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||||
|
@ -105,9 +91,6 @@
|
||||||
<Target Name="SignEngine" DependsOnTargets="GetSignEngineFiles;SignFiles" />
|
<Target Name="SignEngine" DependsOnTargets="GetSignEngineFiles;SignFiles" />
|
||||||
|
|
||||||
<Target Name="GetSignEngineFiles">
|
<Target Name="GetSignEngineFiles">
|
||||||
<PropertyGroup>
|
|
||||||
<OutDir>$(PackagesDirectory)</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FilesToSign Include="$(PackagesDirectory)/**/*engine.exe">
|
<FilesToSign Include="$(PackagesDirectory)/**/*engine.exe">
|
||||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||||
|
@ -118,9 +101,6 @@
|
||||||
<Target Name="SignCliBundle" DependsOnTargets="GetSignCliBundleFiles;SignFiles" />
|
<Target Name="SignCliBundle" DependsOnTargets="GetSignCliBundleFiles;SignFiles" />
|
||||||
|
|
||||||
<Target Name="GetSignCliBundleFiles">
|
<Target Name="GetSignCliBundleFiles">
|
||||||
<PropertyGroup>
|
|
||||||
<OutDir>$(PackagesDirectory)</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FilesToSign Include="$(PackagesDirectory)/**/*.exe">
|
<FilesToSign Include="$(PackagesDirectory)/**/*.exe">
|
||||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<Stage0Directory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</Stage0Directory>
|
|
||||||
<Stage0PjDirectory>$(RepoRoot)/.dotnet_stage0PJ/$(Architecture)</Stage0PjDirectory>
|
|
||||||
<DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
|
|
||||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
|
||||||
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
|
@ -12,24 +12,21 @@
|
||||||
<TestResultXmlDir>$(TestOutputDir)/results/</TestResultXmlDir>
|
<TestResultXmlDir>$(TestOutputDir)/results/</TestResultXmlDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<TestTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RunTestEnvironmentVariables>@(TestTaskEnvironmentVariables)</RunTestEnvironmentVariables>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="Test"
|
<Target Name="Test"
|
||||||
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' "
|
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' "
|
||||||
DependsOnTargets="TestsForBuildItself;BuildTests;">
|
DependsOnTargets="TestsForBuildItself;BuildTests;">
|
||||||
|
|
||||||
|
<!-- Make ure the test packages directory exists so that it's not an error to have it as a package source -->
|
||||||
|
<MakeDir Directories="$(TestPackagesDir)" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectsToTest Include="build/test/RunTest.proj">
|
<ProjectsToTest Include="build/test/RunTest.proj">
|
||||||
<Properties>
|
<Properties>
|
||||||
CLIBuildDll=$(CLIBuildDll);
|
CLIBuildDll=$(CLIBuildDll);
|
||||||
Configuration=$(Configuration);
|
Configuration=$(Configuration);
|
||||||
EnvironmentVariables=$(RunTestEnvironmentVariables);
|
TestArtifactsDir=$(TestArtifactsDir);
|
||||||
|
TestPackagesDir=$(TestPackagesDir);
|
||||||
|
PreviousStageProps=$(NextStagePropsPath);
|
||||||
TestProject=%(TestProjects.Identity);
|
TestProject=%(TestProjects.Identity);
|
||||||
TestResultXmlDir=$(TestResultXmlDir);
|
TestResultXmlDir=$(TestResultXmlDir);
|
||||||
ToolPath=$(OutputDirectory);
|
ToolPath=$(OutputDirectory);
|
||||||
|
@ -58,13 +55,15 @@
|
||||||
DependsOnTargets="PrepareTests;
|
DependsOnTargets="PrepareTests;
|
||||||
CreateTestAssetPackageNuPkgs;">
|
CreateTestAssetPackageNuPkgs;">
|
||||||
<DotNetRestore ToolPath="$(OutputDirectory)"
|
<DotNetRestore ToolPath="$(OutputDirectory)"
|
||||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln"" />
|
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
||||||
|
AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="BuildTests"
|
<Target Name="BuildTests"
|
||||||
DependsOnTargets="RestoreTests;">
|
DependsOnTargets="RestoreTests;">
|
||||||
<DotNetBuild ToolPath="$(OutputDirectory)"
|
<DotNetBuild ToolPath="$(OutputDirectory)"
|
||||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
||||||
|
AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)"
|
||||||
MaxCpuCount="1" />
|
MaxCpuCount="1" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -74,24 +73,26 @@
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(OutputDirectory)"
|
<DotNetRestore ToolPath="$(OutputDirectory)"
|
||||||
WorkingDirectory="$([System.IO.Directory]::GetParent('%(TestPackageProject.ProjectPath)'))"
|
WorkingDirectory="$([System.IO.Directory]::GetParent('%(TestPackageProject.ProjectPath)'))"
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)" />
|
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||||
|
AdditionalParameters="/p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
||||||
<DotNetPack Output="$(TestPackagesDir)"
|
<DotNetPack Output="$(TestPackagesDir)"
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||||
ToolPath="$(OutputDirectory)"
|
ToolPath="$(OutputDirectory)"
|
||||||
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
||||||
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
|
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="TestsForBuildItself">
|
<Target Name="TestsForBuildItself">
|
||||||
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/test/MsBuildScript.Tests/runtests.target"
|
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/test/MsBuildScript.Tests/runtests.target"
|
||||||
ToolPath="$(Stage0Directory)" />
|
ToolPath="$(PreviousStageDirectory)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="EnsureStageSeparation">
|
<Target Name="EnsureStageSeparation">
|
||||||
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:OutputDirectory="$(OutputDirectory)""
|
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:OutputDirectory="$(OutputDirectory)""
|
||||||
ToolPath="$(Stage0Directory)" />
|
ToolPath="$(PreviousStageDirectory)" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
Mode="u+x" />
|
Mode="u+x" />
|
||||||
|
|
||||||
<!-- Build SDK Deb package -->
|
<!-- Build SDK Deb package -->
|
||||||
<DotNetDebTool ToolPath="$(Stage0Directory)"
|
<DotNetDebTool ToolPath="$(PreviousStageDirectory)"
|
||||||
InputDirectory="$(LayoutDirectory)"
|
InputDirectory="$(LayoutDirectory)"
|
||||||
OutputDirectory="$(DotNetDebToolOutputDirectory)"
|
OutputDirectory="$(DotNetDebToolOutputDirectory)"
|
||||||
PackageName="$(SdkDebianPackageName)"
|
PackageName="$(SdkDebianPackageName)"
|
||||||
|
@ -156,22 +156,12 @@
|
||||||
<MakeDir Directories="$(DotNetDebToolOutputDirectory)" />
|
<MakeDir Directories="$(DotNetDebToolOutputDirectory)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="PrepareDotnetDebTool"
|
<Target Name="PrepareDotnetDebTool">
|
||||||
DependsOnTargets="WriteDotnetDebToolProject">
|
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(Stage0Directory)"
|
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||||
WorkingDirectory="$(DotnetDebToolDir)" />
|
WorkingDirectory="$(DotnetDebToolDir)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="WriteDotnetDebToolProject"
|
|
||||||
Inputs="$(MSBuildThisFileDirectory)/$(DotnetDebToolConsumerProjectName)"
|
|
||||||
Outputs="$(DotnetDebToolDir)/$(DotnetDebToolConsumerProjectName)">
|
|
||||||
|
|
||||||
<Copy SourceFiles="$(MSBuildThisFileDirectory)/$(DotnetDebToolConsumerProjectName)"
|
|
||||||
DestinationFiles="$(DotnetDebToolDir)/$(DotnetDebToolConsumerProjectName)" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="TestDebuild">
|
<Target Name="TestDebuild">
|
||||||
<Message Text="Don't remove this" />
|
<Message Text="Don't remove this" />
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
<!-- dotnet deb-tool -->
|
<!-- dotnet deb-tool -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DotnetDebToolConsumerProjectName>dotnet-deb-tool-consumer.csproj</DotnetDebToolConsumerProjectName>
|
<DotnetDebToolDir>$(MSBuildThisFileDirectory)/dotnet-deb-tool-consumer</DotnetDebToolDir>
|
||||||
<DotnetDebToolDir>$(IntermediateDirectory)/$(DotnetDebToolConsumerProjectName)</DotnetDebToolDir>
|
|
||||||
<PackageTool>$(NuGetPackagesDir)/dotnet-deb-tool/$(DotnetDebToolVersion)/lib/netcoreapp2.0/tool/package_tool</PackageTool>
|
<PackageTool>$(NuGetPackagesDir)/dotnet-deb-tool/$(DotnetDebToolVersion)/lib/netcoreapp2.0/tool/package_tool</PackageTool>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -111,6 +110,9 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TestSdkDebTaskEnvironmentVariables Include="PATH=$(DebianInstalledDirectory)$(PathListSeparator)$(PATH)" />
|
<TestSdkDebTaskEnvironmentVariables Include="PATH=$(DebianInstalledDirectory)$(PathListSeparator)$(PATH)" />
|
||||||
|
<TestSdkDebTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
||||||
|
<TestSdkDebTaskEnvironmentVariables Include="TEST_PACKAGES=$(TestPackagesDir)" />
|
||||||
|
<TestSdkDebTaskEnvironmentVariables Include="PreviousStageProps=$(NextStagePropsPath)" />
|
||||||
|
|
||||||
<!-- Consumed By Publish -->
|
<!-- Consumed By Publish -->
|
||||||
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
||||||
|
|
|
@ -199,7 +199,8 @@
|
||||||
|
|
||||||
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
||||||
-InputMsi '$(SdkInstallerFile)'
|
-InputMsi '$(SdkInstallerFile)'
|
||||||
-DotnetDir '$(Stage0Directory)'" />
|
-DotnetDir '$(PreviousStageDirectory)'
|
||||||
|
-TestDir '$(TestOutputDir)'" />
|
||||||
|
|
||||||
<WriteLinesToFile
|
<WriteLinesToFile
|
||||||
File="$(SdkMsiTestedSentinel)"
|
File="$(SdkMsiTestedSentinel)"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<DotNetPack NoBuild="True"
|
<DotNetPack NoBuild="True"
|
||||||
Output="$(PackagesDirectory)"
|
Output="$(PackagesDirectory)"
|
||||||
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
||||||
ToolPath="$(Stage0Directory)"
|
ToolPath="$(PreviousStageDirectory)"
|
||||||
VersionSuffix="$(VersionSuffix)"
|
VersionSuffix="$(VersionSuffix)"
|
||||||
Configuration="$(Configuration)" />
|
Configuration="$(Configuration)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
<MakeDir Directories="$(PackagingBuildBasePath)" />
|
<MakeDir Directories="$(PackagingBuildBasePath)" />
|
||||||
|
|
||||||
<DotNetBuild ToolPath="$(Stage0Directory)"
|
<DotNetBuild ToolPath="$(PreviousStageDirectory)"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj" />
|
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
|
@ -8,8 +8,8 @@
|
||||||
DependsOnTargets="CheckUbuntuAptGetDependencies;
|
DependsOnTargets="CheckUbuntuAptGetDependencies;
|
||||||
CheckCentOsYumDependencies;">
|
CheckCentOsYumDependencies;">
|
||||||
|
|
||||||
<Message Text="Using Stage0 version:" />
|
<Message Text="Using previous stage version:" />
|
||||||
<Exec Command="$(DotnetStage0) --version" />
|
<Exec Command="$(PreviousStageDotnet) --version" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="CheckUbuntuAptGetDependencies"
|
<Target Name="CheckUbuntuAptGetDependencies"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||||
<Import Project="..\DependencyVersions.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
|
|
|
@ -11,7 +11,13 @@
|
||||||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDllPath)" />
|
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDllPath)" />
|
||||||
|
|
||||||
<Target Name="RunTest">
|
<Target Name="RunTest">
|
||||||
<DotNetTest EnvironmentVariables="$(EnvironmentVariables)"
|
<ItemGroup>
|
||||||
|
<EnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
||||||
|
<EnvironmentVariables Include="TEST_PACKAGES=$(TestPackagesDir)" />
|
||||||
|
<EnvironmentVariables Include="PreviousStageProps=$(PreviousStageProps)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<DotNetTest EnvironmentVariables="@(EnvironmentVariables)"
|
||||||
ToolPath="$(ToolPath)"
|
ToolPath="$(ToolPath)"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
NoBuild="True"
|
NoBuild="True"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard1.5</TargetFramework>
|
<TargetFramework>netstandard1.5</TargetFramework>
|
||||||
|
|
|
@ -13,11 +13,13 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public string Verbosity { get; set; }
|
public string Verbosity { get; set; }
|
||||||
|
|
||||||
|
public string AdditionalParameters { get; set; }
|
||||||
|
|
||||||
protected override string Args
|
protected override string Args
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return $"{GetVerbosityArg()} {GetMaxCpuCountArg()}";
|
return $"{GetVerbosityArg()} {GetMaxCpuCountArg()} {GetAdditionalParameters()}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,5 +42,10 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetAdditionalParameters()
|
||||||
|
{
|
||||||
|
return AdditionalParameters;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,11 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override string Args
|
protected override string Args
|
||||||
{
|
{
|
||||||
get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
|
get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {AdditionalParameters}"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ConfigFile { get; set; }
|
public string ConfigFile { get; set; }
|
||||||
|
|
||||||
public string AdditionalParameters { get; set; }
|
|
||||||
|
|
||||||
public string ProjectPath { get; set; }
|
public string ProjectPath { get; set; }
|
||||||
|
|
||||||
public string Source { get; set; }
|
public string Source { get; set; }
|
||||||
|
@ -88,10 +86,5 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetAdditionalParameters()
|
|
||||||
{
|
|
||||||
return AdditionalParameters;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Build scripts for dotnet-cli</Description>
|
<Description>Build scripts for dotnet-cli</Description>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Build scripts for dotnet-cli</Description>
|
<Description>Build scripts for dotnet-cli</Description>
|
||||||
|
|
48
dir.props
48
dir.props
|
@ -1,46 +1,4 @@
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project>
|
||||||
|
<!-- Projects which don't import the common targets can import this dir.props file in order to get the common repo build logic -->
|
||||||
<PropertyGroup>
|
<Import Project="Directory.Build.props" />
|
||||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
|
||||||
|
|
||||||
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
|
||||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
|
||||||
|
|
||||||
<CLIBuildDll>$(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll</CLIBuildDll>
|
|
||||||
|
|
||||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
|
||||||
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
|
|
||||||
|
|
||||||
<CliTargetFramework>netcoreapp2.1</CliTargetFramework>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Import Project="build/InitRepo.props" />
|
|
||||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
|
|
||||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(HostInfoProps)" />
|
|
||||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(BuildInfoProps)" />
|
|
||||||
|
|
||||||
<Import Project="build/BranchInfo.props" />
|
|
||||||
|
|
||||||
<Import Project="build/BundledTools.props" />
|
|
||||||
<Import Project="build/BundledSdks.props" />
|
|
||||||
<Import Project="build/BundledTemplates.props" />
|
|
||||||
<Import Project="build/DependencyVersions.props" />
|
|
||||||
<Import Project="build/Version.props" />
|
|
||||||
<Import Project="build/Branding.props" />
|
|
||||||
|
|
||||||
<Import Project="build/DerivedHostMachineInfo.props" />
|
|
||||||
<Import Project="build/FileExtensions.props" />
|
|
||||||
<Import Project="build/InputDirectories.props" />
|
|
||||||
<Import Project="build/MSBuildExtensions.props" />
|
|
||||||
<Import Project="build/OutputDirectories.props" />
|
|
||||||
<Import Project="build/BuildDefaults.props" />
|
|
||||||
<Import Project="build/Stage0.props" />
|
|
||||||
<Import Project="build/VersionBadge.props" />
|
|
||||||
<Import Project="build/BundledRuntimes.props" />
|
|
||||||
<Import Project="build/CrossGen.props" />
|
|
||||||
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
|
|
||||||
|
|
||||||
<Import Project="build/AzureInfo.props" />
|
|
||||||
<Import Project="build/InstallerInfo.props" />
|
|
||||||
<Import Project="build/GenerateResxSource.targets" />
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -53,18 +53,6 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
||||||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# We also need to pull down a project.json based CLI that is used by some tests
|
|
||||||
# so create another directory for that.
|
|
||||||
if (!$env:DOTNET_INSTALL_DIR_PJ)
|
|
||||||
{
|
|
||||||
$env:DOTNET_INSTALL_DIR_PJ="$RepoRoot\.dotnet_stage0PJ\$Architecture"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(Test-Path $env:DOTNET_INSTALL_DIR_PJ))
|
|
||||||
{
|
|
||||||
mkdir $env:DOTNET_INSTALL_DIR_PJ | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Disable first run since we want to control all package sources
|
# Disable first run since we want to control all package sources
|
||||||
|
@ -88,14 +76,6 @@ if ($LastExitCode -ne 0)
|
||||||
exit $LastExitCode
|
exit $LastExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
|
|
||||||
Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
|
|
||||||
if ($LastExitCode -ne 0)
|
|
||||||
{
|
|
||||||
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
|
|
||||||
exit $LastExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
# Put the stage0 on the path
|
# Put the stage0 on the path
|
||||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||||
|
|
||||||
|
|
13
run-build.sh
13
run-build.sh
|
@ -139,11 +139,6 @@ args=($temp)
|
||||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
|
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
|
||||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||||
|
|
||||||
# We also need to pull down a project.json based CLI that is used by some tests
|
|
||||||
# so create another directory for that.
|
|
||||||
[ -z "$DOTNET_INSTALL_DIR_PJ" ] && export DOTNET_INSTALL_DIR_PJ=$REPOROOT/.dotnet_stage0PJ/$ARCHITECTURE
|
|
||||||
[ -d "$DOTNET_INSTALL_DIR_PJ" ] || mkdir -p $DOTNET_INSTALL_DIR_PJ
|
|
||||||
|
|
||||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
|
|
||||||
# Enable verbose VS Test Console logging
|
# Enable verbose VS Test Console logging
|
||||||
|
@ -163,14 +158,6 @@ if [ $EXIT_CODE != 0 ]; then
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install a project.json based CLI for use by tests
|
|
||||||
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR_PJ" --architecture "$ARCHITECTURE" --version "1.0.0-preview2-1-003177")
|
|
||||||
EXIT_CODE=$?
|
|
||||||
if [ $EXIT_CODE != 0 ]; then
|
|
||||||
echo "run-build: Error: installing project-json based cli failed with exit code $EXIT_CODE." >&2
|
|
||||||
exit $EXIT_CODE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Put stage 0 on the PATH (for this shell only)
|
# Put stage 0 on the PATH (for this shell only)
|
||||||
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Archive and compression types.</Description>
|
<Description>Archive and compression types.</Description>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>SLN file reader/writer</Description>
|
<Description>SLN file reader/writer</Description>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>$(SdkVersion)</Version>
|
<Version>$(SdkVersion)</Version>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Abstractions for making code that uses file system and environment testable.</Description>
|
<Description>Abstractions for making code that uses file system and environment testable.</Description>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>$(SdkVersion)</Version>
|
<Version>$(SdkVersion)</Version>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Microsoft.DotNet.TestFramework Class Library</Description>
|
<Description>Microsoft.DotNet.TestFramework Class Library</Description>
|
||||||
|
|
|
@ -15,13 +15,15 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
|
|
||||||
public string AssetName { get; private set; }
|
public string AssetName { get; private set; }
|
||||||
|
|
||||||
public FileInfo DotnetExeFile { get; private set; }
|
public FileInfo DotnetExeFile => _testAssets.DotnetCsprojExe;
|
||||||
|
|
||||||
public string ProjectFilePattern { get; private set; }
|
public string ProjectFilePattern => "*.csproj";
|
||||||
|
|
||||||
public DirectoryInfo Root { get; private set; }
|
public DirectoryInfo Root { get; private set; }
|
||||||
|
|
||||||
internal TestAssetInfo(DirectoryInfo root, string assetName, FileInfo dotnetExeFile, string projectFilePattern)
|
private TestAssets _testAssets { get; }
|
||||||
|
|
||||||
|
internal TestAssetInfo(DirectoryInfo root, string assetName, TestAssets testAssets)
|
||||||
{
|
{
|
||||||
if (root == null)
|
if (root == null)
|
||||||
{
|
{
|
||||||
|
@ -33,23 +35,16 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
throw new ArgumentException("Argument cannot be null or whitespace", nameof(assetName));
|
throw new ArgumentException("Argument cannot be null or whitespace", nameof(assetName));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dotnetExeFile == null)
|
if (testAssets == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(dotnetExeFile));
|
throw new ArgumentNullException(nameof(testAssets));
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(projectFilePattern))
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Argument cannot be null or whitespace", nameof(projectFilePattern));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Root = root;
|
Root = root;
|
||||||
|
|
||||||
AssetName = assetName;
|
AssetName = assetName;
|
||||||
|
|
||||||
DotnetExeFile = dotnetExeFile;
|
_testAssets = testAssets;
|
||||||
|
|
||||||
ProjectFilePattern = projectFilePattern;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestAssetInstance CreateInstance([CallerMemberName] string callingMethod = "", string identifier = "")
|
public TestAssetInstance CreateInstance([CallerMemberName] string callingMethod = "", string identifier = "")
|
||||||
|
@ -71,12 +66,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
|
|
||||||
private DirectoryInfo GetTestDestinationDirectory(string callingMethod, string identifier)
|
private DirectoryInfo GetTestDestinationDirectory(string callingMethod, string identifier)
|
||||||
{
|
{
|
||||||
#if NET451
|
return _testAssets.CreateTestDirectory(AssetName, callingMethod, identifier);
|
||||||
string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
|
||||||
#else
|
|
||||||
string baseDirectory = AppContext.BaseDirectory;
|
|
||||||
#endif
|
|
||||||
return new DirectoryInfo(Path.Combine(baseDirectory, callingMethod + identifier, AssetName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThrowIfTestAssetDoesNotExist()
|
private void ThrowIfTestAssetDoesNotExist()
|
||||||
|
|
|
@ -51,7 +51,14 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
|
|
||||||
if (Root.Exists)
|
if (Root.Exists)
|
||||||
{
|
{
|
||||||
Root.Delete(recursive: true);
|
try
|
||||||
|
{
|
||||||
|
Root.Delete(recursive: true);
|
||||||
|
}
|
||||||
|
catch (IOException ex)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Unable to delete directory: " + Root.FullName, ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Root.Create();
|
Root.Create();
|
||||||
|
|
|
@ -17,13 +17,11 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
|
|
||||||
private FileInfo _dotnetCsprojExe;
|
private FileInfo _dotnetCsprojExe;
|
||||||
|
|
||||||
private FileInfo _dotnetProjectJsonExe;
|
private string _testWorkingFolder;
|
||||||
|
|
||||||
private const string ProjectJsonSearchPattern = "project.json";
|
public FileInfo DotnetCsprojExe => _dotnetCsprojExe;
|
||||||
|
|
||||||
private const string CsprojSearchPattern = "*.csproj";
|
public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, string testWorkingFolder)
|
||||||
|
|
||||||
public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo dotnetProjectJsonExe)
|
|
||||||
{
|
{
|
||||||
if (assetsRoot == null)
|
if (assetsRoot == null)
|
||||||
{
|
{
|
||||||
|
@ -35,11 +33,6 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
throw new ArgumentNullException(nameof(dotnetCsprojExe));
|
throw new ArgumentNullException(nameof(dotnetCsprojExe));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dotnetProjectJsonExe == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(dotnetProjectJsonExe));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!assetsRoot.Exists)
|
if (!assetsRoot.Exists)
|
||||||
{
|
{
|
||||||
throw new DirectoryNotFoundException($"Directory not found at '{assetsRoot}'");
|
throw new DirectoryNotFoundException($"Directory not found at '{assetsRoot}'");
|
||||||
|
@ -50,16 +43,10 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
throw new FileNotFoundException("Csproj dotnet executable must exist", dotnetCsprojExe.FullName);
|
throw new FileNotFoundException("Csproj dotnet executable must exist", dotnetCsprojExe.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dotnetProjectJsonExe.Exists)
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException("project.json dotnet executable must exist", dotnetProjectJsonExe.FullName);
|
|
||||||
}
|
|
||||||
|
|
||||||
_root = assetsRoot;
|
_root = assetsRoot;
|
||||||
|
|
||||||
_dotnetCsprojExe = dotnetCsprojExe;
|
_dotnetCsprojExe = dotnetCsprojExe;
|
||||||
|
_testWorkingFolder = testWorkingFolder;
|
||||||
_dotnetProjectJsonExe = dotnetProjectJsonExe;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestAssetInfo Get(string name)
|
public TestAssetInfo Get(string name)
|
||||||
|
@ -74,24 +61,7 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
return new TestAssetInfo(
|
return new TestAssetInfo(
|
||||||
assetDirectory,
|
assetDirectory,
|
||||||
name,
|
name,
|
||||||
_dotnetCsprojExe,
|
this);
|
||||||
CsprojSearchPattern);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TestAssetInfo GetProjectJson(string name)
|
|
||||||
{
|
|
||||||
return GetProjectJson(TestAssetKinds.TestProjects, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TestAssetInfo GetProjectJson(string kind, string name)
|
|
||||||
{
|
|
||||||
var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name));
|
|
||||||
|
|
||||||
return new TestAssetInfo(
|
|
||||||
assetDirectory,
|
|
||||||
name,
|
|
||||||
_dotnetProjectJsonExe,
|
|
||||||
ProjectJsonSearchPattern);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "")
|
public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "")
|
||||||
|
@ -112,7 +82,10 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
#else
|
#else
|
||||||
string baseDirectory = AppContext.BaseDirectory;
|
string baseDirectory = AppContext.BaseDirectory;
|
||||||
#endif
|
#endif
|
||||||
return Path.Combine(baseDirectory, callingMethod + identifier, testProjectName);
|
// Find the name of the assembly the test comes from based on the the base directory and how the output path has been constructed
|
||||||
|
string testAssemblyName = new DirectoryInfo(baseDirectory).Parent.Parent.Name;
|
||||||
|
|
||||||
|
return Path.Combine(_testWorkingFolder, testAssemblyName, callingMethod + identifier, testProjectName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>$(SdkVersion)</Version>
|
<Version>$(SdkVersion)</Version>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
|
||||||
<Import Project="$(RepoRoot)/build/compile/LzmaArchive.targets" />
|
<Import Project="$(RepoRoot)/build/compile/LzmaArchive.targets" />
|
||||||
<Import Project="$(RepoRoot)/build/MSBuildExtensions.targets" />
|
<Import Project="$(RepoRoot)/build/MSBuildExtensions.targets" />
|
||||||
|
|
||||||
|
@ -74,7 +73,7 @@
|
||||||
<Target Name="PublishRoslyn"
|
<Target Name="PublishRoslyn"
|
||||||
BeforeTargets="Publish">
|
BeforeTargets="Publish">
|
||||||
|
|
||||||
<DotNetPublish ToolPath="$(Stage0Directory)"
|
<DotNetPublish ToolPath="$(PreviousStageDirectory)"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -82,7 +81,7 @@
|
||||||
<Target Name="PublishFSharp"
|
<Target Name="PublishFSharp"
|
||||||
BeforeTargets="Publish">
|
BeforeTargets="Publish">
|
||||||
|
|
||||||
<DotNetPublish ToolPath="$(Stage0Directory)"
|
<DotNetPublish ToolPath="$(PreviousStageDirectory)"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
ProjectPath="$(SrcDirectory)/tool_fsharp/tool_fsc.csproj" />
|
ProjectPath="$(SrcDirectory)/tool_fsharp/tool_fsc.csproj" />
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -160,7 +159,7 @@
|
||||||
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
|
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
|
||||||
DependencyPackageName=%(BundledSdk.Identity);
|
DependencyPackageName=%(BundledSdk.Identity);
|
||||||
DependencyPackageVersion=%(BundledSdk.Version);
|
DependencyPackageVersion=%(BundledSdk.Version);
|
||||||
Stage0Directory=$(Stage0Directory)
|
PreviousStageDirectory=$(PreviousStageDirectory)
|
||||||
</Properties>
|
</Properties>
|
||||||
</SdksToBundle>
|
</SdksToBundle>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -179,7 +178,7 @@
|
||||||
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
|
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
|
||||||
TemplatePackageName=%(BundledTemplate.Identity);
|
TemplatePackageName=%(BundledTemplate.Identity);
|
||||||
TemplatePackageVersion=%(BundledTemplate.Version);
|
TemplatePackageVersion=%(BundledTemplate.Version);
|
||||||
Stage0Directory=$(Stage0Directory)
|
PreviousStageDirectory=$(PreviousStageDirectory)
|
||||||
</Properties>
|
</Properties>
|
||||||
</TemplatesToBundle>
|
</TemplatesToBundle>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
@ -24,7 +23,8 @@
|
||||||
<Target Name="PrecompileScript"
|
<Target Name="PrecompileScript"
|
||||||
BeforeTargets="Build"
|
BeforeTargets="Build"
|
||||||
Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||||
<Exec Command="$(DotnetInOutputDirectory) publish ../ArgumentsReflector/ArgumentsReflector.csproj --output $(MSBuildThisFileDirectory)/$(OutputPath)" />
|
|
||||||
|
<Exec Command="$(PreviousStageDotnet) publish ../ArgumentsReflector/ArgumentsReflector.csproj --output $(OutputPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\dir.props" />
|
<Import Project="..\Directory.Build.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
|
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net46</TargetFramework>
|
<TargetFramework>net46</TargetFramework>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[string]$InputMsi,
|
[string]$InputMsi,
|
||||||
[string]$DotnetDir
|
[string]$DotnetDir,
|
||||||
|
[string]$TestDir
|
||||||
)
|
)
|
||||||
|
|
||||||
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
|
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
|
||||||
|
@ -37,7 +38,7 @@ if(!(Test-Path $inputMsi))
|
||||||
|
|
||||||
$testName = "Microsoft.DotNet.Cli.Msi.Tests"
|
$testName = "Microsoft.DotNet.Cli.Msi.Tests"
|
||||||
$testProj="$PSScriptRoot\$testName\$testName.csproj"
|
$testProj="$PSScriptRoot\$testName\$testName.csproj"
|
||||||
$testBin="$RepoRoot\artifacts\tests\$testName"
|
$testBin="$TestDir\$testName"
|
||||||
|
|
||||||
pushd "$DotnetDir"
|
pushd "$DotnetDir"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- https://github.com/dotnet/cli/issues/6672: Re-enable net461 as a TFM for tests. -->
|
<!-- https://github.com/dotnet/cli/issues/6672: Re-enable net461 as a TFM for tests. -->
|
||||||
<TargetFrameworks>$(CliTargetFramework)</TargetFrameworks>
|
<TargetFrameworks>$(CliTargetFramework)</TargetFrameworks>
|
||||||
|
|
|
@ -1,183 +0,0 @@
|
||||||
// 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.IO;
|
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
|
||||||
using NuGet.Frameworks;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
||||||
{
|
|
||||||
public sealed class BuildPJCommand : TestCommand
|
|
||||||
{
|
|
||||||
|
|
||||||
private bool _captureOutput;
|
|
||||||
|
|
||||||
private string _configuration;
|
|
||||||
|
|
||||||
private NuGetFramework _framework;
|
|
||||||
|
|
||||||
private string _runtime;
|
|
||||||
|
|
||||||
private bool _noDependencies;
|
|
||||||
|
|
||||||
private DirectoryInfo _outputPath;
|
|
||||||
|
|
||||||
private FileInfo _projectFile;
|
|
||||||
|
|
||||||
private DirectoryInfo _workingDirectory;
|
|
||||||
|
|
||||||
public BuildPJCommand()
|
|
||||||
: base(new RepoDirectoriesProvider().PjDotnet)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override CommandResult Execute(string args = "")
|
|
||||||
{
|
|
||||||
args = $"build {GetNoDependencies()} {GetProjectFile()} {GetOutputPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {args}";
|
|
||||||
|
|
||||||
if (_workingDirectory != null)
|
|
||||||
{
|
|
||||||
this.WithWorkingDirectory(_workingDirectory.FullName);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_captureOutput)
|
|
||||||
{
|
|
||||||
return base.ExecuteWithCapturedOutput(args);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return base.Execute(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
|
||||||
{
|
|
||||||
WithCapturedOutput();
|
|
||||||
|
|
||||||
return Execute(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithCapturedOutput()
|
|
||||||
{
|
|
||||||
_captureOutput = true;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithConfiguration(string configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithFramework(NuGetFramework framework)
|
|
||||||
{
|
|
||||||
_framework = framework;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithRuntime(string runtime)
|
|
||||||
{
|
|
||||||
_runtime = runtime;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithNoDependencies()
|
|
||||||
{
|
|
||||||
_noDependencies = true;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithOutputPath(DirectoryInfo outputPath)
|
|
||||||
{
|
|
||||||
_outputPath = outputPath;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithProjectDirectory(DirectoryInfo projectDirectory)
|
|
||||||
{
|
|
||||||
_workingDirectory = projectDirectory;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithProjectFile(FileInfo projectFile)
|
|
||||||
{
|
|
||||||
_projectFile = projectFile;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BuildPJCommand WithWorkingDirectory(DirectoryInfo workingDirectory)
|
|
||||||
{
|
|
||||||
_workingDirectory = workingDirectory;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetConfiguration()
|
|
||||||
{
|
|
||||||
if (_configuration == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"--configuration {_configuration}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetFramework()
|
|
||||||
{
|
|
||||||
if (_framework == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"--framework {_framework.GetShortFolderName()}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetRuntime()
|
|
||||||
{
|
|
||||||
if (_runtime == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"--runtime {_runtime}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetNoDependencies()
|
|
||||||
{
|
|
||||||
if (!_noDependencies)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "--no-dependencies";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetOutputPath()
|
|
||||||
{
|
|
||||||
if (_outputPath == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"\"{_outputPath.FullName}\"";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetProjectFile()
|
|
||||||
{
|
|
||||||
if (_projectFile == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"\"{_projectFile.FullName}\"";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
// 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 Microsoft.DotNet.Cli.Utils;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
||||||
{
|
|
||||||
public sealed class RestoreProjectJsonCommand : TestCommand
|
|
||||||
{
|
|
||||||
public RestoreProjectJsonCommand()
|
|
||||||
: base(new RepoDirectoriesProvider().PjDotnet)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override CommandResult Execute(string args="")
|
|
||||||
{
|
|
||||||
args = $"restore {args}";
|
|
||||||
|
|
||||||
return base.Execute(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
|
||||||
{
|
|
||||||
args = $"restore {args}";
|
|
||||||
return base.ExecuteWithCapturedOutput(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -238,6 +238,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
psi.Environment[item.Key] = item.Value;
|
psi.Environment[item.Key] = item.Value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flow the TEST_PACKAGES environment variable to the child process
|
||||||
|
psi.Environment["TEST_PACKAGES"] = System.Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddWorkingDirectoryTo(ProcessStartInfo psi)
|
private void AddWorkingDirectoryTo(ProcessStartInfo psi)
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Microsoft.DotNet.Tools.Tests.Utilities Class Library</Description>
|
<Description>Microsoft.DotNet.Tools.Tests.Utilities Class Library</Description>
|
||||||
<TargetFramework>netstandard1.5</TargetFramework>
|
<TargetFramework>netstandard1.5</TargetFramework>
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
private string _stage2Sdk;
|
private string _stage2Sdk;
|
||||||
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
|
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||||
private string _testPackages;
|
private string _testPackages;
|
||||||
private string _pjDotnet;
|
private string _testWorkingFolder;
|
||||||
|
|
||||||
public static string RepoRoot
|
public static string RepoRoot
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(s_buildRid))
|
if (string.IsNullOrEmpty(s_buildRid))
|
||||||
{
|
{
|
||||||
var buildInfoPath = Path.Combine(RepoRoot, "artifacts", "obj", "BuildInfo.props");
|
var buildInfoPath = Path.Combine(RepoRoot, "bin", "obj", "BuildInfo.props");
|
||||||
var root = XDocument.Load(buildInfoPath).Root;
|
var root = XDocument.Load(buildInfoPath).Root;
|
||||||
var ns = root.Name.Namespace;
|
var ns = root.Name.Namespace;
|
||||||
|
|
||||||
|
@ -86,38 +86,46 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public string Artifacts => _artifacts;
|
public string Artifacts => _artifacts;
|
||||||
public string BuiltDotnet => _builtDotnet;
|
public string BuiltDotnet => _builtDotnet;
|
||||||
public string NugetPackages => _nugetPackages;
|
public string NugetPackages => _nugetPackages;
|
||||||
public string PjDotnet => _pjDotnet;
|
|
||||||
public string Stage2Sdk => _stage2Sdk;
|
public string Stage2Sdk => _stage2Sdk;
|
||||||
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
|
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
|
||||||
public string TestPackages => _testPackages;
|
public string TestPackages => _testPackages;
|
||||||
|
public string TestWorkingFolder => _testWorkingFolder;
|
||||||
|
|
||||||
public RepoDirectoriesProvider(
|
public RepoDirectoriesProvider(
|
||||||
string artifacts = null,
|
string artifacts = null,
|
||||||
string builtDotnet = null,
|
string builtDotnet = null,
|
||||||
string nugetPackages = null,
|
string nugetPackages = null,
|
||||||
string corehostPackages = null,
|
string corehostPackages = null,
|
||||||
string corehostDummyPackages = null,
|
string corehostDummyPackages = null)
|
||||||
string pjDotnet = null)
|
|
||||||
{
|
{
|
||||||
_artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", BuildRid);
|
// Ideally this wouldn't be hardcoded, so that you could use stage n to build stage n + 1, and then use stage n + 1 to run tests
|
||||||
|
int previousStage = 2;
|
||||||
|
|
||||||
|
_artifacts = artifacts ?? Path.Combine(RepoRoot,
|
||||||
|
"bin",
|
||||||
|
previousStage.ToString(),
|
||||||
|
BuildRid);
|
||||||
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
|
_builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish");
|
||||||
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
|
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
|
||||||
_pjDotnet = pjDotnet ?? GetPjDotnetPath();
|
|
||||||
_stage2Sdk = Directory
|
_stage2Sdk = Directory
|
||||||
.EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk"))
|
.EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk"))
|
||||||
.First(d => !d.Contains("NuGetFallbackFolder"));
|
.First(d => !d.Contains("NuGetFallbackFolder"));
|
||||||
|
|
||||||
_stage2WithBackwardsCompatibleRuntimesDirectory =
|
_stage2WithBackwardsCompatibleRuntimesDirectory =
|
||||||
Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes");
|
Path.Combine(_artifacts, "dotnetWithBackwardsCompatibleRuntimes");
|
||||||
_testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetPjDotnetPath()
|
_testPackages = Environment.GetEnvironmentVariable("TEST_PACKAGES");
|
||||||
{
|
if (string.IsNullOrEmpty(_testPackages))
|
||||||
return new DirectoryInfo(Path.Combine(RepoRoot, ".dotnet_stage0PJ"))
|
{
|
||||||
.GetDirectories().First()
|
throw new InvalidOperationException("TEST_PACKAGES environment variable not set");
|
||||||
.GetFiles("dotnet*").First()
|
}
|
||||||
.FullName;
|
|
||||||
|
_testWorkingFolder = Path.Combine(RepoRoot,
|
||||||
|
"bin",
|
||||||
|
(previousStage + 1).ToString(),
|
||||||
|
BuildRid,
|
||||||
|
"test");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
s_testAssets = new TestAssets(
|
s_testAssets = new TestAssets(
|
||||||
new DirectoryInfo(assetsRoot),
|
new DirectoryInfo(assetsRoot),
|
||||||
new FileInfo(new Muxer().MuxerPath),
|
new FileInfo(new Muxer().MuxerPath),
|
||||||
new FileInfo(new RepoDirectoriesProvider().PjDotnet));
|
new RepoDirectoriesProvider().TestWorkingFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_testAssets;
|
return s_testAssets;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="test-packages" value="../../artifacts/testpackages" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
@ -7,6 +6,7 @@
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<AssemblyName>binding-redirects.Tests</AssemblyName>
|
<AssemblyName>binding-redirects.Tests</AssemblyName>
|
||||||
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
|
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
|
||||||
|
<RestoreAdditionalProjectSources>$(TestOutputDir)/packages</RestoreAdditionalProjectSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue