diff --git a/.gitignore b/.gitignore
index 7bed92752..a9597138b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@ dlldata.c
# DNX
project.lock.json
artifacts/
+bin/
*_i.c
*_p.c
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 000000000..6a533eab3
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,61 @@
+
+
+
+
+
+ $(MSBuildThisFileDirectory)
+
+ $(NUGET_PACKAGES)
+ $(RepoRoot)/.nuget/packages
+
+ $(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll
+
+ true
+ true
+
+ netcoreapp2.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln
index 2b397c406..3be7078be 100644
--- a/Microsoft.DotNet.Cli.sln
+++ b/Microsoft.DotNet.Cli.sln
@@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
build\RestoreDependency.proj = build\RestoreDependency.proj
build\sdks\sdks.csproj = build\sdks\sdks.csproj
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\Version.props = build\Version.props
build\VersionBadge.props = build\VersionBadge.props
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
index f72d85fc6..6b6514fb3 100644
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
+++ b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
@@ -6,6 +6,7 @@
Exe
$(AssetTargetFallback);portable-net45+win8;dnxcore50
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
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
index 82a5ad25d..287b089bb 100644
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
+++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
@@ -4,6 +4,7 @@
AppWithRedirectsAndConfig
Exe
win7-x64;win7-x86
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
index 94b99d56b..8e5fc172e 100644
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
+++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
@@ -4,6 +4,7 @@
AppWithRedirectsNoConfig
Exe
win7-x64;win7-x86
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config b/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
index d57f09629..bad19bf93 100644
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
+++ b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
@@ -3,6 +3,7 @@
netstandard1.6;net451
Library
$(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/Directory.Build.props b/TestAssets/Directory.Build.props
new file mode 100644
index 000000000..905549edc
--- /dev/null
+++ b/TestAssets/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/TestAssets/TestPackages/NuGet.Config b/TestAssets/TestPackages/NuGet.Config
deleted file mode 100644
index 0750578cb..000000000
--- a/TestAssets/TestPackages/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
index 6dd25f7f6..c15ae1a16 100644
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
+++ b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
@@ -4,6 +4,7 @@
Exe
netcoreapp1.1
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
index 9adf4c6fc..0559ffd92 100755
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
+++ b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
index df284421b..d94296238 100755
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
+++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config
deleted file mode 100644
index dd7ccd7af..000000000
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
index 6995199ee..f8fea864c 100755
--- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
+++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
@@ -7,6 +7,7 @@
AppWithDirectDep
Exe
false
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config
deleted file mode 100644
index dd7ccd7af..000000000
--- a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
index 5afb24921..3a99fed0d 100755
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
+++ b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config
deleted file mode 100644
index 4da396ac8..000000000
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
index 705cf2077..1410deeb4 100755
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
+++ b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
index 33cb2b5a7..3f38586d5 100644
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
+++ b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
@@ -4,6 +4,7 @@
Exe
net451;netcoreapp2.0
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config b/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
index 7f9c16848..6f493b0c3 100755
--- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
+++ b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
index 9c5447b05..4e7b4cd9d 100755
--- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
+++ b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
@@ -8,6 +8,7 @@
Exe
false
$(AssetTargetFallback);dnxcore50;portable-net45+win8
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config b/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
index 79bceb82d..7259a5723 100644
--- a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
+++ b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
@@ -5,6 +5,7 @@
Exe
netcoreapp2.0
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
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config b/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/NuGet.Config b/TestAssets/TestProjects/NuGet.Config
deleted file mode 100644
index b03d4d16c..000000000
--- a/TestAssets/TestProjects/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config b/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
index 3f8176791..c5748e258 100644
--- a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
+++ b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
@@ -4,6 +4,7 @@
Exe
netcoreapp2.0
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/global.json b/TestAssets/TestProjects/global.json
deleted file mode 100644
index 09f20328d..000000000
--- a/TestAssets/TestProjects/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ ".", "../../src" ]
-}
\ No newline at end of file
diff --git a/build.proj b/build.proj
index bac606d59..837cf150e 100644
--- a/build.proj
+++ b/build.proj
@@ -1,6 +1,6 @@
-
+
@@ -20,7 +20,7 @@
DependsOnTargets="MSBuildWorkaroundTarget;
RestoreDotnetCliBuildFramework">
-
@@ -39,7 +39,7 @@
$(ExtraRestoreArgs) --disable-parallel
-
diff --git a/build/BundledTemplates.proj b/build/BundledTemplates.proj
index 014f5bc92..dfc66e111 100644
--- a/build/BundledTemplates.proj
+++ b/build/BundledTemplates.proj
@@ -23,7 +23,7 @@
-
diff --git a/build/InitRepo.props b/build/InitRepo.props
index 3a17534a9..f917b88c2 100644
--- a/build/InitRepo.props
+++ b/build/InitRepo.props
@@ -1,6 +1,6 @@
- $(RepoRoot)/artifacts/obj
+ $(RepoRoot)/bin/obj
$(GeneratedPropsDir)/GitCommitInfo.props
$(GeneratedPropsDir)/HostInfo.props
$(GeneratedPropsDir)/BuildInfo.props
diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets
index c6dd9f7ae..e24b2225b 100644
--- a/build/MSBuildExtensions.targets
+++ b/build/MSBuildExtensions.targets
@@ -75,7 +75,7 @@
NuGetPackagesDir=$(NuGetPackagesDir);
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
- Stage0Directory=$(Stage0Directory)
+ PreviousStageDirectory=$(PreviousStageDirectory)
diff --git a/build/MicroBuild.props b/build/MicroBuild.props
index 1cf77f45b..f55a5eea1 100644
--- a/build/MicroBuild.props
+++ b/build/MicroBuild.props
@@ -1,9 +1,6 @@
-
- $(MSBuildThisFileDirectory)/..
- $(NUGET_PACKAGES)
$(RepoRoot)/.nuget/packages
$(NuGetPackagesDir)/microbuild.core/$(MicroBuildVersion)/build/
diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props
index 42e7d255a..52e072221 100644
--- a/build/OutputDirectories.props
+++ b/build/OutputDirectories.props
@@ -1,10 +1,19 @@
- $(RepoRoot)/artifacts/$(Rid)
- $(BaseOutputDirectory)/stage2
- $(BaseOutputDirectory)/stage2WithBackwardsCompatibleRuntimes
+ $([MSBuild]::Add($(CliOuterBuildStage), '1'))
+ 2
+
+
+ $(RepoRoot)/bin/$(CliBuildStage)/$(Rid)
+ $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))
+
+ $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))
+ $(BaseOutputDirectory)/dotnet
+ $(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes
$(OutputDirectory)/sdk/$(SdkVersion)
- $(BaseOutputDirectory)/stage2symbols
+ $(BaseOutputDirectory)/symbols
$(SdkOutputDirectory)/Roslyn
$(SdkOutputDirectory)/FSharp
$(BaseOutputDirectory)/stage2compilation
@@ -14,10 +23,12 @@
$(BaseOutputDirectory)/AspRT
$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish
- $(RepoRoot)/artifacts/testpackages/
+ $(BaseOutputDirectory)/testpackages/
$(OutputDirectory)/dotnet$(ExeExtension)
$(IntermediateDirectory)/GeneratedMSBuildExtensions
$(IntermediateDirectory)/MSBuildExtensionsLayout
$(MSBuildExtensionsLayoutDirectory)/MSBuildSdkResolver
+
+ $(BaseOutputDirectory)/PreviousStage.props
diff --git a/build/Prepare.targets b/build/Prepare.targets
index 214b1f78d..3b373ecfc 100644
--- a/build/Prepare.targets
+++ b/build/Prepare.targets
@@ -4,7 +4,7 @@
+ DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" />
-
@@ -79,7 +79,7 @@
-
@@ -98,4 +98,38 @@
+
+
+
+
+
+
+
+
+<Project>
+ <PropertyGroup>
+ <PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory>
+ <PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet>
+ <CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage>
+ </PropertyGroup>
+</Project>
+
+
+
+ $([System.IO.File]::ReadAllText($(NextStagePropsPath)))
+
+
+ false
+ true
+
+
+
+
+
diff --git a/build/RestoreDependency.proj b/build/RestoreDependency.proj
index 142f5e929..19f209ce0 100644
--- a/build/RestoreDependency.proj
+++ b/build/RestoreDependency.proj
@@ -33,7 +33,7 @@
-
diff --git a/build/SetupPreviousStage.props b/build/SetupPreviousStage.props
new file mode 100644
index 000000000..4798cf582
--- /dev/null
+++ b/build/SetupPreviousStage.props
@@ -0,0 +1,13 @@
+
+
+ $(RepoRoot)/.dotnet_stage0/$(Architecture)
+ $(PreviousStageDirectory)/dotnet$(ExeExtension)
+
+
+
+
+
+ False
+ True
+
+
diff --git a/build/Signing.proj b/build/Signing.proj
index d3eebb140..c403c324c 100644
--- a/build/Signing.proj
+++ b/build/Signing.proj
@@ -1,9 +1,8 @@
+
-
-
@@ -13,10 +12,6 @@
- $(RepoRoot)/artifacts/$(Rid)
- $(BaseOutputDirectory)/stage2
- $(BaseOutputDirectory)/stage2compilation
- $(BaseOutputDirectory)/packages
$(BaseOutputDirectory)/intermediate/MSBuildExtensionsLayout/MSBuildSdkResolver
-
+
$(InternalCertificateId)
@@ -85,9 +77,6 @@
-
- $(SdkResolverOutputDirectory)
-
$(InternalCertificateId)
@@ -98,9 +87,6 @@
-
- $(PackagesDirectory)
-
$(InternalCertificateId)
@@ -114,9 +100,6 @@
-
- $(PackagesDirectory)
-
$(InternalCertificateId)
@@ -127,9 +110,6 @@
-
- $(PackagesDirectory)
-
$(InternalCertificateId)
diff --git a/build/Stage0.props b/build/Stage0.props
deleted file mode 100644
index e5a6a0b50..000000000
--- a/build/Stage0.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- $(RepoRoot)/.dotnet_stage0/$(Architecture)
- $(RepoRoot)/.dotnet_stage0PJ/$(Architecture)
- $(Stage0Directory)/dotnet$(ExeExtension)
- False
- True
-
-
diff --git a/build/Test.targets b/build/Test.targets
index 4fadf70e4..18880e1e5 100644
--- a/build/Test.targets
+++ b/build/Test.targets
@@ -12,24 +12,21 @@
$(TestOutputDir)/results/
-
-
-
-
-
- @(TestTaskEnvironmentVariables)
-
-
+
+
+
CLIBuildDll=$(CLIBuildDll);
Configuration=$(Configuration);
- EnvironmentVariables=$(RunTestEnvironmentVariables);
+ TestArtifactsDir=$(TestArtifactsDir);
+ TestPackagesDir=$(TestPackagesDir);
+ PreviousStageProps=$(NextStagePropsPath);
TestProject=%(TestProjects.Identity);
TestResultXmlDir=$(TestResultXmlDir);
ToolPath=$(OutputDirectory);
@@ -58,13 +55,15 @@
DependsOnTargets="PrepareTests;
CreateTestAssetPackageNuPkgs;">
+ ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
+ AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)" />
@@ -74,19 +73,21 @@
+ ProjectPath="%(TestPackageProject.ProjectPath)"
+ AdditionalParameters="/p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)"
+ />
+ MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
+ ToolPath="$(PreviousStageDirectory)" />
diff --git a/build/package/Installer.DEB.proj b/build/package/Installer.DEB.proj
index 66300c4df..4b684d161 100644
--- a/build/package/Installer.DEB.proj
+++ b/build/package/Installer.DEB.proj
@@ -64,7 +64,7 @@
Mode="u+x" />
-
-
+
-
-
-
-
-
-
-
diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets
index b041bc344..62421c895 100644
--- a/build/package/Installer.DEB.targets
+++ b/build/package/Installer.DEB.targets
@@ -8,8 +8,7 @@
- dotnet-deb-tool-consumer.csproj
- $(IntermediateDirectory)/$(DotnetDebToolConsumerProjectName)
+ $(MSBuildThisFileDirectory)/dotnet-deb-tool-consumer
$(NuGetPackagesDir)/dotnet-deb-tool/$(DotnetDebToolVersion)/lib/netcoreapp2.0/tool/package_tool
@@ -114,6 +113,9 @@
+
+
+
diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets
index 2a4e131b8..ea98d309a 100644
--- a/build/package/Installer.MSI.targets
+++ b/build/package/Installer.MSI.targets
@@ -199,7 +199,8 @@
+ -DotnetDir '$(PreviousStageDirectory)'
+ -TestDir '$(TestOutputDir)'" />
@@ -34,7 +34,7 @@
-
diff --git a/build/package/dotnet-deb-tool-consumer.csproj b/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
similarity index 74%
rename from build/package/dotnet-deb-tool-consumer.csproj
rename to build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
index a48d3d6f2..03e67c852 100644
--- a/build/package/dotnet-deb-tool-consumer.csproj
+++ b/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
@@ -1,6 +1,4 @@
-
-
netcoreapp2.0
$(CLI_SharedFrameworkVersion)
diff --git a/build/prepare/CheckPrereqs.targets b/build/prepare/CheckPrereqs.targets
index 1e7454410..03d743c35 100644
--- a/build/prepare/CheckPrereqs.targets
+++ b/build/prepare/CheckPrereqs.targets
@@ -8,8 +8,8 @@
DependsOnTargets="CheckUbuntuAptGetDependencies;
CheckCentOsYumDependencies;">
-
-
+
+
-
Library
diff --git a/build/test/RunTest.proj b/build/test/RunTest.proj
index 8b1ec899f..0454d8a6f 100644
--- a/build/test/RunTest.proj
+++ b/build/test/RunTest.proj
@@ -11,7 +11,13 @@
-
+
+
+
+
+
+
-
netstandard1.5
diff --git a/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs b/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
index 18cca3ab3..f0ab3f3a5 100644
--- a/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
+++ b/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
@@ -13,11 +13,13 @@ namespace Microsoft.DotNet.Cli.Build
public string Verbosity { get; set; }
+ public string AdditionalParameters { get; set; }
+
protected override string Args
{
get
{
- return $"{GetVerbosityArg()} {GetMaxCpuCountArg()}";
+ return $"{GetVerbosityArg()} {GetMaxCpuCountArg()} {GetAdditionalParameters()}";
}
}
@@ -40,5 +42,10 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
+
+ private string GetAdditionalParameters()
+ {
+ return AdditionalParameters;
+ }
}
}
diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs
index 88bca5e22..d7d984be3 100644
--- a/build_projects/dotnet-cli-build/DotNetRestore.cs
+++ b/build_projects/dotnet-cli-build/DotNetRestore.cs
@@ -12,13 +12,11 @@ namespace Microsoft.DotNet.Cli.Build
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 AdditionalParameters { get; set; }
-
public string ProjectPath { get; set; }
public string Source { get; set; }
@@ -88,10 +86,5 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
-
- private string GetAdditionalParameters()
- {
- return AdditionalParameters;
- }
}
}
diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
index 5186a2ee0..dd5e0c8e4 100644
--- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
+++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
@@ -1,5 +1,4 @@
-
Build scripts for dotnet-cli
1.0.0
diff --git a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
index 14a4c4a33..ed7002589 100644
--- a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
+++ b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
@@ -1,5 +1,4 @@
-
Build scripts for dotnet-cli
diff --git a/dir.props b/dir.props
index 756fccc32..995f5e985 100644
--- a/dir.props
+++ b/dir.props
@@ -1,46 +1,4 @@
-
-
-
- $(MSBuildThisFileDirectory)
-
- $(NUGET_PACKAGES)
- $(RepoRoot)/.nuget/packages
-
- $(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll
-
- true
- true
-
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/run-build.ps1 b/run-build.ps1
index d3bb1152b..6acbb15ce 100644
--- a/run-build.ps1
+++ b/run-build.ps1
@@ -53,18 +53,6 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
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
@@ -88,14 +76,6 @@ if ($LastExitCode -ne 0)
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
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
diff --git a/run-build.sh b/run-build.sh
index 95154cdf6..0dce787e9 100755
--- a/run-build.sh
+++ b/run-build.sh
@@ -139,11 +139,6 @@ args=($temp)
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
[ -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
# Enable verbose VS Test Console logging
@@ -163,14 +158,6 @@ if [ $EXIT_CODE != 0 ]; then
exit $EXIT_CODE
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)
PATH="$DOTNET_INSTALL_DIR:$PATH"
diff --git a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
index 04b8f25be..0fec393cb 100644
--- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
+++ b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
@@ -1,5 +1,4 @@
-
Archive and compression types.
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj b/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj
index 2b23027fd..8f76e2e04 100644
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj
+++ b/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj
@@ -1,5 +1,4 @@
-
SLN file reader/writer
diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
index fec257bdd..600794faf 100644
--- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
+++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
@@ -1,5 +1,4 @@
-
$(SdkVersion)
diff --git a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
index 25a33c6f8..49f4fceb5 100644
--- a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
+++ b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
@@ -1,5 +1,4 @@
-
$(CliVersionPrefix)
diff --git a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
index a5c6d9d6a..c4c930565 100644
--- a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
+++ b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
@@ -1,5 +1,4 @@
-
Abstractions for making code that uses file system and environment testable.
diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
index ca8867c75..55d357272 100644
--- a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
+++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
@@ -1,5 +1,4 @@
-
$(SdkVersion)
diff --git a/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj b/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj
index 4e9b4a96f..2996edcbb 100644
--- a/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj
+++ b/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj
@@ -1,5 +1,4 @@
-
Microsoft.DotNet.TestFramework Class Library
diff --git a/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs b/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs
index f5ca0aebe..bec0b5729 100644
--- a/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs
+++ b/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs
@@ -15,13 +15,15 @@ namespace Microsoft.DotNet.TestFramework
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; }
- 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)
{
@@ -33,23 +35,16 @@ namespace Microsoft.DotNet.TestFramework
throw new ArgumentException("Argument cannot be null or whitespace", nameof(assetName));
}
- if (dotnetExeFile == null)
+ if (testAssets == null)
{
- throw new ArgumentNullException(nameof(dotnetExeFile));
- }
-
- if (string.IsNullOrWhiteSpace(projectFilePattern))
- {
- throw new ArgumentException("Argument cannot be null or whitespace", nameof(projectFilePattern));
+ throw new ArgumentNullException(nameof(testAssets));
}
Root = root;
AssetName = assetName;
- DotnetExeFile = dotnetExeFile;
-
- ProjectFilePattern = projectFilePattern;
+ _testAssets = testAssets;
}
public TestAssetInstance CreateInstance([CallerMemberName] string callingMethod = "", string identifier = "")
@@ -71,12 +66,7 @@ namespace Microsoft.DotNet.TestFramework
private DirectoryInfo GetTestDestinationDirectory(string callingMethod, string identifier)
{
-#if NET451
- string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
-#else
- string baseDirectory = AppContext.BaseDirectory;
-#endif
- return new DirectoryInfo(Path.Combine(baseDirectory, callingMethod + identifier, AssetName));
+ return _testAssets.CreateTestDirectory(AssetName, callingMethod, identifier);
}
private void ThrowIfTestAssetDoesNotExist()
diff --git a/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs b/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs
index bf75f00c2..4d27d0fe7 100644
--- a/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs
+++ b/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs
@@ -51,7 +51,14 @@ namespace Microsoft.DotNet.TestFramework
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();
diff --git a/src/Microsoft.DotNet.TestFramework/TestAssets.cs b/src/Microsoft.DotNet.TestFramework/TestAssets.cs
index 0e47e3ba9..6d05788fd 100644
--- a/src/Microsoft.DotNet.TestFramework/TestAssets.cs
+++ b/src/Microsoft.DotNet.TestFramework/TestAssets.cs
@@ -17,13 +17,11 @@ namespace Microsoft.DotNet.TestFramework
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, FileInfo dotnetProjectJsonExe)
+ public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, string testWorkingFolder)
{
if (assetsRoot == null)
{
@@ -35,11 +33,6 @@ namespace Microsoft.DotNet.TestFramework
throw new ArgumentNullException(nameof(dotnetCsprojExe));
}
- if (dotnetProjectJsonExe == null)
- {
- throw new ArgumentNullException(nameof(dotnetProjectJsonExe));
- }
-
if (!assetsRoot.Exists)
{
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);
}
- if (!dotnetProjectJsonExe.Exists)
- {
- throw new FileNotFoundException("project.json dotnet executable must exist", dotnetProjectJsonExe.FullName);
- }
-
_root = assetsRoot;
_dotnetCsprojExe = dotnetCsprojExe;
-
- _dotnetProjectJsonExe = dotnetProjectJsonExe;
+ _testWorkingFolder = testWorkingFolder;
}
public TestAssetInfo Get(string name)
@@ -74,24 +61,7 @@ namespace Microsoft.DotNet.TestFramework
return new TestAssetInfo(
assetDirectory,
name,
- _dotnetCsprojExe,
- 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);
+ this);
}
public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "")
@@ -112,7 +82,10 @@ namespace Microsoft.DotNet.TestFramework
#else
string baseDirectory = AppContext.BaseDirectory;
#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);
}
}
}
diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj
index e5f36bff3..4f74cc2bf 100644
--- a/src/dotnet/dotnet.csproj
+++ b/src/dotnet/dotnet.csproj
@@ -1,5 +1,4 @@
-
$(SdkVersion)
$(CliTargetFramework)
diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj
index 39458acff..085b3c94a 100644
--- a/src/redist/redist.csproj
+++ b/src/redist/redist.csproj
@@ -1,6 +1,5 @@
-
-
+
@@ -74,7 +73,7 @@
-
@@ -82,7 +81,7 @@
-
@@ -160,7 +159,7 @@
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
DependencyPackageName=%(BundledSdk.Identity);
DependencyPackageVersion=%(BundledSdk.Version);
- Stage0Directory=$(Stage0Directory)
+ PreviousStageDirectory=$(PreviousStageDirectory)
@@ -179,7 +178,7 @@
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
TemplatePackageName=%(BundledTemplate.Identity);
TemplatePackageVersion=%(BundledTemplate.Version);
- Stage0Directory=$(Stage0Directory)
+ PreviousStageDirectory=$(PreviousStageDirectory)
diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj
index d8fb48246..1ec0f52b5 100644
--- a/src/tool_fsharp/tool_fsc.csproj
+++ b/src/tool_fsharp/tool_fsc.csproj
@@ -1,6 +1,5 @@
-
-
+
$(CliVersionPrefix)
diff --git a/src/tool_msbuild/tool_msbuild.csproj b/src/tool_msbuild/tool_msbuild.csproj
index 7a109b08d..19cf5b7ea 100644
--- a/src/tool_msbuild/tool_msbuild.csproj
+++ b/src/tool_msbuild/tool_msbuild.csproj
@@ -1,5 +1,4 @@
-
$(CliVersionPrefix)
diff --git a/src/tool_nuget/tool_nuget.csproj b/src/tool_nuget/tool_nuget.csproj
index 5a4e4121f..9d00b23cb 100644
--- a/src/tool_nuget/tool_nuget.csproj
+++ b/src/tool_nuget/tool_nuget.csproj
@@ -1,5 +1,4 @@
-
$(CliVersionPrefix)
diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj
index ee6a77522..8049d3f4f 100644
--- a/src/tool_roslyn/tool_roslyn.csproj
+++ b/src/tool_roslyn/tool_roslyn.csproj
@@ -1,6 +1,5 @@
-
-
+
$(CliVersionPrefix)
diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
index a6773725f..3227ead22 100644
--- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
+++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
@@ -24,7 +23,8 @@
-
+
+
diff --git a/test/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj
index 4ad634f31..012295b52 100644
--- a/test/ArgumentsReflector/ArgumentsReflector.csproj
+++ b/test/ArgumentsReflector/ArgumentsReflector.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
diff --git a/test/dir.props b/test/Directory.Build.props
similarity index 83%
rename from test/dir.props
rename to test/Directory.Build.props
index 8d5c8cc42..406c4f8c1 100644
--- a/test/dir.props
+++ b/test/Directory.Build.props
@@ -1,5 +1,5 @@
-
+
false
diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj
index 19586cb7d..5eb588bef 100644
--- a/test/EndToEnd/EndToEnd.csproj
+++ b/test/EndToEnd/EndToEnd.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj
index b3675ea9d..17220aaf1 100644
--- a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj
+++ b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj
@@ -1,6 +1,4 @@
-
-
net46
true
diff --git a/test/Installer/testmsi.ps1 b/test/Installer/testmsi.ps1
index 198999c78..47db57c58 100644
--- a/test/Installer/testmsi.ps1
+++ b/test/Installer/testmsi.ps1
@@ -3,7 +3,8 @@
param(
[string]$InputMsi,
- [string]$DotnetDir
+ [string]$DotnetDir,
+ [string]$TestDir
)
. "$PSScriptRoot\..\..\scripts\common\_common.ps1"
@@ -37,7 +38,7 @@ if(!(Test-Path $inputMsi))
$testName = "Microsoft.DotNet.Cli.Msi.Tests"
$testProj="$PSScriptRoot\$testName\$testName.csproj"
-$testBin="$RepoRoot\artifacts\tests\$testName"
+$testBin="$TestDir\$testName"
pushd "$DotnetDir"
diff --git a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
index 7f0760ef8..7a3b12d4c 100644
--- a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
+++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
index 2642b4ada..63ddee901 100644
--- a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj
index 4b4756512..2511c7eae 100644
--- a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj
+++ b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
index a21bb4731..b60f6abe6 100644
--- a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
+++ b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs
deleted file mode 100644
index 6b05edfe8..000000000
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs
+++ /dev/null
@@ -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}\"";
- }
- }
-}
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs
deleted file mode 100644
index a54d89605..000000000
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs
+++ /dev/null
@@ -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);
- }
- }
-}
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs
index 03ee56d6c..b8f3ca9cc 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs
@@ -238,6 +238,9 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
psi.Environment[item.Key] = item.Value;
#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)
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
index 767129263..c66ed4675 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
@@ -1,6 +1,4 @@
-
-
Microsoft.DotNet.Tools.Tests.Utilities Class Library
netstandard1.5
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
index 2f5e1e830..bf1cc2050 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs
@@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string _stage2Sdk;
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
private string _testPackages;
- private string _pjDotnet;
+ private string _testWorkingFolder;
public static string RepoRoot
{
@@ -58,7 +58,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
{
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 ns = root.Name.Namespace;
@@ -81,38 +81,46 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public string Artifacts => _artifacts;
public string BuiltDotnet => _builtDotnet;
public string NugetPackages => _nugetPackages;
- public string PjDotnet => _pjDotnet;
public string Stage2Sdk => _stage2Sdk;
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
public string TestPackages => _testPackages;
+ public string TestWorkingFolder => _testWorkingFolder;
public RepoDirectoriesProvider(
string artifacts = null,
string builtDotnet = null,
string nugetPackages = null,
string corehostPackages = null,
- string corehostDummyPackages = null,
- string pjDotnet = null)
+ string corehostDummyPackages = 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");
_nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages");
- _pjDotnet = pjDotnet ?? GetPjDotnetPath();
_stage2Sdk = Directory
- .EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk"))
+ .EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk"))
.First(d => !d.Contains("NuGetFallbackFolder"));
_stage2WithBackwardsCompatibleRuntimesDirectory =
- Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes");
- _testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages");
- }
+ Path.Combine(_artifacts, "dotnetWithBackwardsCompatibleRuntimes");
- private string GetPjDotnetPath()
- {
- return new DirectoryInfo(Path.Combine(RepoRoot, ".dotnet_stage0PJ"))
- .GetDirectories().First()
- .GetFiles("dotnet*").First()
- .FullName;
+ _testPackages = Environment.GetEnvironmentVariable("TEST_PACKAGES");
+ if (string.IsNullOrEmpty(_testPackages))
+ {
+ throw new InvalidOperationException("TEST_PACKAGES environment variable not set");
+ }
+
+ _testWorkingFolder = Path.Combine(RepoRoot,
+ "bin",
+ (previousStage + 1).ToString(),
+ BuildRid,
+ "test");
+
}
}
}
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs
index b377b4331..6c2c43346 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs
@@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
s_testAssets = new TestAssets(
new DirectoryInfo(assetsRoot),
new FileInfo(new Muxer().MuxerPath),
- new FileInfo(new RepoDirectoriesProvider().PjDotnet));
+ new RepoDirectoriesProvider().TestWorkingFolder);
}
return s_testAssets;
diff --git a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj
index 032ba7432..575d46870 100644
--- a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj
+++ b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/binding-redirects.Tests/NuGet.Config b/test/binding-redirects.Tests/NuGet.Config
deleted file mode 100644
index 507db39a6..000000000
--- a/test/binding-redirects.Tests/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj
index e979f1d7b..c1a94e084 100644
--- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj
+++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
@@ -7,6 +6,7 @@
true
binding-redirects.Tests
$(AssetTargetFallback);dotnet5.4;portable-net451+win8
+ $(TestOutputDir)/packages
diff --git a/test/crossgen.Tests/crossgen.Tests.csproj b/test/crossgen.Tests/crossgen.Tests.csproj
index ffd348ff1..1849d5995 100644
--- a/test/crossgen.Tests/crossgen.Tests.csproj
+++ b/test/crossgen.Tests/crossgen.Tests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
diff --git a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
index 518559902..cb759125c 100644
--- a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
+++ b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs
index bbe339071..ba37b1e73 100644
--- a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs
+++ b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs
@@ -661,7 +661,7 @@ Commands:
[InlineData("nonexistingframeworkname")]
public void WhenFrameworkSwitchIsNotMatchingAnyOfTargetedFrameworksItPrintsError(string framework)
{
- var setup = Setup();
+ var setup = Setup(framework);
var lib = new ProjDir(setup.LibDir);
var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib"));
diff --git a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
index 744ed0798..2159632fc 100644
--- a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
+++ b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
diff --git a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj
index 3f55e5109..5e9a3b304 100644
--- a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj
+++ b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs
index febd7a9b3..04d28850c 100644
--- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs
+++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs
@@ -131,7 +131,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssets.Get(testAppName)
- .CreateInstance(testAppName)
+ .CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
diff --git a/test/dotnet-build.Tests/dotnet-build.Tests.csproj b/test/dotnet-build.Tests/dotnet-build.Tests.csproj
index 98d275251..3475413bc 100644
--- a/test/dotnet-build.Tests/dotnet-build.Tests.csproj
+++ b/test/dotnet-build.Tests/dotnet-build.Tests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
diff --git a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj
index b1183fbac..598fee5cf 100644
--- a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj
+++ b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-help.Tests/dotnet-help.Tests.csproj b/test/dotnet-help.Tests/dotnet-help.Tests.csproj
index e14909b1d..2200ed754 100644
--- a/test/dotnet-help.Tests/dotnet-help.Tests.csproj
+++ b/test/dotnet-help.Tests/dotnet-help.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj
index e3f183fe1..c8cbdc0bc 100644
--- a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj
+++ b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
index 2a17335f7..e15451f82 100644
--- a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
+++ b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj
index e0c9b8258..6259dcebe 100644
--- a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj
+++ b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs b/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
new file mode 100644
index 000000000..b49c81009
--- /dev/null
+++ b/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs
@@ -0,0 +1,17 @@
+using System.IO;
+
+namespace Microsoft.DotNet.New.Tests
+{
+ public class AspNetNuGetConfiguration
+ {
+ public static void WriteNuGetConfigWithAspNetPrivateFeeds(string path)
+ {
+ string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
+ using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
+ using (Stream output = File.OpenWrite(path))
+ {
+ input.CopyTo(output);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs
index 96bb47c51..8c4d05abe 100644
--- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs
+++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs
@@ -50,8 +50,7 @@ namespace Microsoft.DotNet.New.Tests
if (useNuGetConfigForAspNet)
{
- var configFile = new FileInfo(Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config"));
- File.Copy(configFile.FullName, Path.Combine(rootPath, "NuGet.Config"));
+ AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(Path.Combine(rootPath, "NuGet.Config"));
}
if (skipSpaWebpackSteps)
diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj
index 6fc972c60..133fd9730 100644
--- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj
+++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
@@ -9,6 +7,11 @@
$(AssetTargetFallback);dnxcore50;portable-net45+win8
+
+
+
+
+
diff --git a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj
index 41e6d7ee0..4eb2c0794 100644
--- a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj
+++ b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj
index 74ab88ecb..a33adc3bb 100644
--- a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj
+++ b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj
index cac4ae9c7..31a477569 100644
--- a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj
+++ b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj
index 44dde6ca0..3d884fbd5 100644
--- a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj
+++ b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
index e8d6ae893..4d571f9e4 100644
--- a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
+++ b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
index d1d9c2b56..f92bf8f68 100644
--- a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
+++ b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj
index 8264e6589..e00d11b48 100644
--- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj
+++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
index c58b914c3..1095e98a4 100644
--- a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
+++ b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj
index bbd6e14ae..7ecf5b2a4 100644
--- a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj
+++ b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj
index 136a4d5a7..42c94f8d9 100644
--- a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj
+++ b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-store.Tests/dotnet-store.Tests.csproj b/test/dotnet-store.Tests/dotnet-store.Tests.csproj
index 8ebe9ef7d..11e732e03 100644
--- a/test/dotnet-store.Tests/dotnet-store.Tests.csproj
+++ b/test/dotnet-store.Tests/dotnet-store.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-test.Tests/dotnet-test.Tests.csproj b/test/dotnet-test.Tests/dotnet-test.Tests.csproj
index 5c89ff2f7..a69fe3555 100644
--- a/test/dotnet-test.Tests/dotnet-test.Tests.csproj
+++ b/test/dotnet-test.Tests/dotnet-test.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj
index e63222e9e..2601d659f 100644
--- a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj
+++ b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/test/dotnet.Tests/VersionTest.cs b/test/dotnet.Tests/VersionTest.cs
index 0192f5fd8..3b0e1c92e 100644
--- a/test/dotnet.Tests/VersionTest.cs
+++ b/test/dotnet.Tests/VersionTest.cs
@@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tests
[Fact]
public void VersionCommandDisplaysCorrectVersion()
{
- var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version");
+ var versionFilePath = Path.Combine(AppContext.BaseDirectory, "ExpectedSdkVersion.txt");
var version = GetVersionFromFile(versionFilePath);
CommandResult result = new DotnetCommand()
@@ -31,14 +31,8 @@ namespace Microsoft.DotNet.Tests
{
using (var reader = new StreamReader(File.OpenRead(versionFilePath)))
{
- SkipCommit(reader);
return reader.ReadLine();
}
}
-
- private void SkipCommit(StreamReader reader)
- {
- reader.ReadLine();
- }
}
}
diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj
index f30b3f131..66872e208 100644
--- a/test/dotnet.Tests/dotnet.Tests.csproj
+++ b/test/dotnet.Tests/dotnet.Tests.csproj
@@ -1,5 +1,4 @@
-
$(CliTargetFramework)
@@ -23,11 +22,35 @@
PreserveNewest
PreserveNewest
-
- .version
- PreserveNewest
-
+
+
+
+
+ $(IntermediateOutputPath)ExpectedSdkVersion.txt
+
+ $(SdkVersion)
+
+ $([System.IO.File]::ReadAllText($(ExpectedVersionFileInIntermediateFolder)))
+
+
+ false
+ true
+
+
+
+
+
+
+
+
+
diff --git a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj
index 67c66fb63..6f178d749 100644
--- a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj
+++ b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj
@@ -1,6 +1,4 @@
-
-
$(CliTargetFramework)
$(CLI_SharedFrameworkVersion)
diff --git a/testAsset.props b/testAsset.props
index af559d0b4..b130414b8 100644
--- a/testAsset.props
+++ b/testAsset.props
@@ -1,6 +1,7 @@
+ $(TEST_PACKAGES)
true
diff --git a/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj b/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj
index e29aa4cdb..33051ba8e 100644
--- a/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj
+++ b/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj
@@ -1,6 +1,4 @@
-
-
netcoreapp2.0
$(SharedFrameworkRid)
diff --git a/tools/Signing.Dependencies/Signing.Dependencies.csproj b/tools/Signing.Dependencies/Signing.Dependencies.csproj
index c98ee321a..dc8cd6914 100644
--- a/tools/Signing.Dependencies/Signing.Dependencies.csproj
+++ b/tools/Signing.Dependencies/Signing.Dependencies.csproj
@@ -1,6 +1,4 @@
-
-
netcoreapp1.0