diff --git a/.gitignore b/.gitignore
index 9e7b8ba71..042865880 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,9 @@
### Repo-specific things ###
+# NuGet v3 restore drops these even though we don't use MSBuild :(
+*.nuget.targets
+*.nuget.props
+
# Debian and python stuff
*.dsc
*.tar.gz
diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln
index 3197e2214..a1e26f983 100644
--- a/Microsoft.DotNet.Cli.sln
+++ b/Microsoft.DotNet.Cli.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli", "src\Microsoft.DotNet.Cli\Microsoft.DotNet.Cli.xproj", "{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}"
EndProject
@@ -75,14 +75,18 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Test
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{713CBFBB-5392-438D-B766-A9A585EF1BB8}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibrary", "test\TestProjects\TestLibrary\TestLibrary.xproj", "{947DD232-8D9B-4B78-9C6A-94F807D2DD58}"
-EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "test\TestProjects\TestApp\TestApp.xproj", "{58808BBC-371E-47D6-A3D0-4902145EDA4E}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithArgs", "test\TestProjects\TestAppWithArgs\TestAppWithArgs.xproj", "{DA8E0E9E-A6D6-4583-864C-8F40465E3A48}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithContents", "test\TestProjects\TestAppWithContents\TestAppWithContents.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Compiler.Tests", "test\Microsoft.DotNet.Tools.Compiler.Tests\Microsoft.DotNet.Tools.Compiler.Tests.xproj", "{833FFEE1-7EED-4F51-8DFD-946D48893D6E}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Publish.Tests", "test\Microsoft.DotNet.Tools.Publish.Tests\Microsoft.DotNet.Tools.Publish.Tests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibrary", "test\TestProjects\TestLibrary\TestLibrary.xproj", "{947DD232-8D9B-4B78-9C6A-94F807D2DD58}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -559,22 +563,6 @@ Global
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|x64.ActiveCfg = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|x64.Build.0 = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|x64.Build.0 = Debug|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|Any CPU.Build.0 = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|x64.ActiveCfg = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|x64.Build.0 = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{58808BBC-371E-47D6-A3D0-4902145EDA4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58808BBC-371E-47D6-A3D0-4902145EDA4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58808BBC-371E-47D6-A3D0-4902145EDA4E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -623,6 +611,54 @@ Global
{0138CB8F-4AA9-4029-A21E-C07C30F425BA}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{0138CB8F-4AA9-4029-A21E-C07C30F425BA}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{0138CB8F-4AA9-4029-A21E-C07C30F425BA}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Debug|x64.Build.0 = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Release|x64.ActiveCfg = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.Release|x64.Build.0 = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Debug|x64.Build.0 = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Release|x64.ActiveCfg = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.Release|x64.Build.0 = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {386D412C-003C-47B1-8258-0E35865CB7C4}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Debug|x64.Build.0 = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|Any CPU.Build.0 = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|x64.ActiveCfg = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.Release|x64.Build.0 = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -658,9 +694,11 @@ Global
{65741CB1-8AEE-4C66-8198-10A7EA0E4258} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{713CBFBB-5392-438D-B766-A9A585EF1BB8} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
- {947DD232-8D9B-4B78-9C6A-94F807D2DD58} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
{58808BBC-371E-47D6-A3D0-4902145EDA4E} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
{DA8E0E9E-A6D6-4583-864C-8F40465E3A48} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
{0138CB8F-4AA9-4029-A21E-C07C30F425BA} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
+ {833FFEE1-7EED-4F51-8DFD-946D48893D6E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {386D412C-003C-47B1-8258-0E35865CB7C4} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {947DD232-8D9B-4B78-9C6A-94F807D2DD58} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
EndGlobalSection
EndGlobal
diff --git a/NuGet.Config b/NuGet.Config
index dbf1cbb15..737fbbd0d 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -17,4 +17,8 @@
+
+
+
+
diff --git a/packaging/windows/Dotnet.Cli.Msi.Tests/Dotnet.Cli.Msi.Tests.nuget.props b/packaging/windows/WiXTools/WiXTools.nuget.props
similarity index 84%
rename from packaging/windows/Dotnet.Cli.Msi.Tests/Dotnet.Cli.Msi.Tests.nuget.props
rename to packaging/windows/WiXTools/WiXTools.nuget.props
index e3e9841b3..6b6fc0d3b 100644
--- a/packaging/windows/Dotnet.Cli.Msi.Tests/Dotnet.Cli.Msi.Tests.nuget.props
+++ b/packaging/windows/WiXTools/WiXTools.nuget.props
@@ -1,7 +1,7 @@
- C:\Users\sridhper\.nuget\packages\
+ $(UserProfile)\AppData\Local\Temp
diff --git a/scripts/build/build.ps1 b/scripts/build/build.ps1
index e6f5969fd..8bae51f8d 100644
--- a/scripts/build/build.ps1
+++ b/scripts/build/build.ps1
@@ -15,6 +15,18 @@ $ErrorActionPreference="Stop"
. "$RepoRoot\scripts\build\generate-version.ps1"
+if ($env:CI_BUILD -eq "1") {
+ $env:NUGET_PACKAGES = (Join-Path $RepoRoot "artifacts\home\.nuget\packages")
+} else {
+ $env:NUGET_PACKAGES = (Join-Path $env:USERPROFILE ".nuget\packages")
+}
+
+$env:DOTNET_PACKAGES = $env:NUGET_PACKAGES
+$env:DNX_PACKAGES = $env:NUGET_PACKAGES
+if(!(Test-Path $env:NUGET_PACKAGES)) {
+ mkdir $env:NUGET_PACKAGES | Out-Null
+}
+
header "Building dotnet tools version $($env:DOTNET_CLI_VERSION) - $Configuration"
header "Checking Pre-Reqs"
diff --git a/scripts/build/build.sh b/scripts/build/build.sh
index 405484366..3c29df8e9 100755
--- a/scripts/build/build.sh
+++ b/scripts/build/build.sh
@@ -19,6 +19,11 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source "$DIR/../common/_common.sh"
source "$REPOROOT/scripts/build/generate-version.sh"
+## Temporarily redirect to the NuGet package installation location
+export NUGET_PACKAGES=~/.nuget/packages
+export DOTNET_PACKAGES=$NUGET_PACKAGES
+export DNX_PACKAGES=$NUGET_PACKAGES
+
header "Building dotnet tools version $DOTNET_CLI_VERSION - $CONFIGURATION"
header "Checking Pre-Reqs"
diff --git a/scripts/build/build_appdeps.cmd b/scripts/build/build_appdeps.cmd
index f0d8f190a..0af6a67c7 100644
--- a/scripts/build/build_appdeps.cmd
+++ b/scripts/build/build_appdeps.cmd
@@ -1,4 +1,5 @@
-@echo off
+REM TEMPORARILY disable @echo off to debug CI.
+REM @echo off
REM This file encapsulates the temporary steps to build the dotnet-compile-native command successfully
REM The AppDepSDK package is a temporary artifact until we have CoreRT assemblies published to Nuget
@@ -13,19 +14,19 @@ set __OutputPath=%CD%\bin
popd
-rmdir /S /Q %AppDepsProjectDir%\packages
-
pushd %__AppDepsProjectDir%
-dotnet restore --packages %AppDepsProjectDir%\packages
-set __AppDepSDK=%AppDepsProjectDir%\packages\toolchain*\
+rmdir /S /Q packages
+dotnet restore --packages %__AppDepsProjectDir%\packages
+set __AppDepSDK=%__AppDepsProjectDir%\packages\toolchain*\
popd
mkdir %__OutputPath%\appdepsdk
cd %__AppDepSDK%
FOR /D %%a IN (*) DO (
CD %%a
+ TREE
GOTO :Copy
)
:Copy
-xcopy /S/E/H/Y * %__OutputPath%\appdepsdk
\ No newline at end of file
+xcopy /S/E/H/Y * %__OutputPath%\appdepsdk
diff --git a/scripts/build/build_appdeps.sh b/scripts/build/build_appdeps.sh
index d69845d87..a4b7d8d18 100755
--- a/scripts/build/build_appdeps.sh
+++ b/scripts/build/build_appdeps.sh
@@ -30,4 +30,4 @@ APPDEP_SDK=$APPDEPS_PROJECT_DIR/packages/toolchain*/*/
popd
mkdir -p $OUTPUT_DIR/appdepsdk
-cp -a $APPDEP_SDK/. $OUTPUT_DIR/appdepsdk
\ No newline at end of file
+cp -a $APPDEP_SDK/. $OUTPUT_DIR/appdepsdk
diff --git a/scripts/build/restore-packages.ps1 b/scripts/build/restore-packages.ps1
index 66500ad8e..9a42e3bc5 100644
--- a/scripts/build/restore-packages.ps1
+++ b/scripts/build/restore-packages.ps1
@@ -18,12 +18,12 @@ else {
# Restore packages
header "Restoring packages"
-& "$DnxRoot\dnu" restore "$RepoRoot\src" --quiet --runtime "$Rid" "$NoCacheArg" --parallel
-& "$DnxRoot\dnu" restore "$RepoRoot\test" --quiet --runtime "$Rid" "$NoCacheArg" --parallel
-& "$DnxRoot\dnu" restore "$RepoRoot\tools" --quiet --runtime "$Rid" "$NoCacheArg" --parallel
+& "$DnxRoot\dnu" restore "$RepoRoot\src" --quiet --runtime "$Rid" "$NoCacheArg"
+& "$DnxRoot\dnu" restore "$RepoRoot\test" --quiet --runtime "$Rid" "$NoCacheArg"
+& "$DnxRoot\dnu" restore "$RepoRoot\tools" --quiet --runtime "$Rid" "$NoCacheArg"
$oldErrorAction=$ErrorActionPreference
$ErrorActionPreference="SilentlyContinue"
-& "$DnxRoot\dnu" restore "$RepoRoot\testapp" --quiet --runtime "$Rid" "$NoCacheArg" --parallel 2>&1 | Out-Null
+& "$DnxRoot\dnu" restore "$RepoRoot\testapp" --quiet --runtime "$Rid" "$NoCacheArg" 2>&1 | Out-Null
$ErrorActionPreference=$oldErrorAction
diff --git a/scripts/build/restore-packages.sh b/scripts/build/restore-packages.sh
index 6eba8638c..2e8c7616f 100755
--- a/scripts/build/restore-packages.sh
+++ b/scripts/build/restore-packages.sh
@@ -18,9 +18,9 @@ source "$DIR/../common/_common.sh"
header "Restoring packages"
-$DNX_ROOT/dnu restore "$REPOROOT/src" --quiet "$NOCACHE" --parallel
-$DNX_ROOT/dnu restore "$REPOROOT/test" --quiet "$NOCACHE" --parallel
-$DNX_ROOT/dnu restore "$REPOROOT/tools" --quiet "$NOCACHE" --parallel
+$DNX_ROOT/dnu restore "$REPOROOT/src" --quiet "$NOCACHE"
+$DNX_ROOT/dnu restore "$REPOROOT/test" --quiet "$NOCACHE"
+$DNX_ROOT/dnu restore "$REPOROOT/tools" --quiet "$NOCACHE"
set +e
-$DNX_ROOT/dnu restore "$REPOROOT/testapp" --quiet "$NOCACHE" --parallel >/dev/null 2>&1
+$DNX_ROOT/dnu restore "$REPOROOT/testapp" --quiet "$NOCACHE" >/dev/null 2>&1
set -e
diff --git a/scripts/ci_build.cmd b/scripts/ci_build.cmd
index bf7c82d2d..96e691152 100644
--- a/scripts/ci_build.cmd
+++ b/scripts/ci_build.cmd
@@ -3,6 +3,8 @@
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
+set CI_BUILD=1
+
CALL %~dp0..\build.cmd -NoCache %*
exit /b %errorlevel%
diff --git a/scripts/compile/compile-stage.ps1 b/scripts/compile/compile-stage.ps1
index 195951316..fb6699c5e 100644
--- a/scripts/compile/compile-stage.ps1
+++ b/scripts/compile/compile-stage.ps1
@@ -93,19 +93,9 @@ if (-not (Test-Path "$OutputDir\bin\csc.ni.exe")) {
_cmd "$RepoRoot\scripts\crossgen\crossgen_roslyn.cmd ""$OutputDir"""
}
-# Copy dnx into stage OutputDir
-if (-not (Test-Path "$OutputDir\bin\dnx\")) {
- cp -rec "$DnxRoot\" "$OutputDir\bin\dnx\"
-}
-
-# Copy in the dotnet-dnx script
-if (-not (Test-Path "$OutputDir\bin\dotnet-dnx.cmd")) {
- cp "$RepoRoot\scripts\dotnet-dnx.cmd" "$OutputDir\bin\dotnet-dnx.cmd"
-}
-
# Copy in AppDeps
if (-not (Test-Path "$OutputDir\bin\appdepsdk\")) {
$env:PATH = "$OutputDir\bin;$StartPath"
- header "Acquiring Native App Dependencies"
- _cmd "$RepoRoot\scripts\build\build_appdeps.cmd ""$OutputDir"""
+ header "Acquiring Native App Dependencies"
+ _cmd "$RepoRoot\scripts\build\build_appdeps.cmd ""$OutputDir"""
}
diff --git a/scripts/compile/compile-stage.sh b/scripts/compile/compile-stage.sh
index 41f56ea99..7d0271414 100755
--- a/scripts/compile/compile-stage.sh
+++ b/scripts/compile/compile-stage.sh
@@ -105,17 +105,6 @@ fi
# Make OUTPUT_DIR Folder Accessible
chmod -R a+r $OUTPUT_DIR
-# Copy DNX in to OUTPUT_DIR
-if [ ! -d $OUTPUT_DIR/bin/dnx ]; then
- cp -R $DNX_ROOT $OUTPUT_DIR/bin/dnx
-fi
-
-# Copy and CHMOD the dotnet-dnx script
-if [ ! -f $OUTPUT_DIR/bin/dotnet-dnx ]; then
- cp $REPOROOT/scripts/dotnet-dnx.sh $OUTPUT_DIR/bin/dotnet-dnx
- chmod a+x $OUTPUT_DIR/bin/dotnet-dnx
-fi
-
# No compile native support in centos yet
# https://github.com/dotnet/cli/issues/453
if [ "$OSNAME" != "centos" ]; then
diff --git a/scripts/compile/compile.sh b/scripts/compile/compile.sh
index bb66a4170..ab3d93f04 100755
--- a/scripts/compile/compile.sh
+++ b/scripts/compile/compile.sh
@@ -20,4 +20,4 @@ $REPOROOT/scripts/compile/compile-corehost.sh
$REPOROOT/scripts/compile/compile-stage-1.sh
-$REPOROOT/scripts/compile/compile-stage-2.sh
\ No newline at end of file
+$REPOROOT/scripts/compile/compile-stage-2.sh
diff --git a/scripts/crossgen/crossgen_roslyn.cmd b/scripts/crossgen/crossgen_roslyn.cmd
index 7a22fac45..62715fc19 100644
--- a/scripts/crossgen/crossgen_roslyn.cmd
+++ b/scripts/crossgen/crossgen_roslyn.cmd
@@ -9,7 +9,7 @@ set BIN_DIR=%CD%\bin
popd
REM Replace with a robust method for finding the right crossgen.exe
-set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23704\tools\crossgen.exe
+set CROSSGEN_UTIL=%NUGET_PACKAGES%\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23704\tools\crossgen.exe
REM Crossgen currently requires itself to be next to mscorlib
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul
diff --git a/scripts/crossgen/crossgen_roslyn.sh b/scripts/crossgen/crossgen_roslyn.sh
index 08cfd27bb..7942e0f67 100755
--- a/scripts/crossgen/crossgen_roslyn.sh
+++ b/scripts/crossgen/crossgen_roslyn.sh
@@ -23,7 +23,7 @@ else
fi
# Replace with a robust method for finding the right crossgen.exe
-CROSSGEN_UTIL=$HOME/.dnx/packages/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23704/tools/crossgen
+CROSSGEN_UTIL=$NUGET_PACKAGES/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23704/tools/crossgen
cd $BIN_DIR
diff --git a/scripts/dotnet-dnx.cmd b/scripts/dotnet-dnx.cmd
deleted file mode 100644
index f46689d77..000000000
--- a/scripts/dotnet-dnx.cmd
+++ /dev/null
@@ -1,12 +0,0 @@
-@Echo OFF
-
-REM Copyright (c) .NET Foundation and contributors. All rights reserved.
-REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-SETLOCAL
-SET ERRORLEVEL=
-
-"%~dp0dnx\dnx" "%~dp0dnx\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll" %*
-
-exit /b %ERRORLEVEL%
-ENDLOCAL
diff --git a/scripts/dotnet-dnx.sh b/scripts/dotnet-dnx.sh
deleted file mode 100644
index 1c408f18c..000000000
--- a/scripts/dotnet-dnx.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-#
-# 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.
-#
-
-# dotnet-restore script to be copied across to the final package
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-# work around restore timeouts on Mono
-[ -z "$MONO_THREADS_PER_CPU" ] && export MONO_THREADS_PER_CPU=50
-
-exec "$DIR/dnx/dnx" "$DIR/dnx/lib/Microsoft.Dnx.Tooling/Microsoft.Dnx.Tooling.dll" "$@"
diff --git a/scripts/obtain/install-tools.ps1 b/scripts/obtain/install-tools.ps1
index 8a01def34..faea84bf4 100644
--- a/scripts/obtain/install-tools.ps1
+++ b/scripts/obtain/install-tools.ps1
@@ -20,4 +20,4 @@ $env:PATH = "$env:DOTNET_INSTALL_DIR\cli\bin;$env:PATH"
# Download dnx to copy to stage2
header "Downloading DNX $DnxVersion"
-_ "$RepoRoot\scripts\obtain\install-dnx.ps1"
\ No newline at end of file
+_ "$RepoRoot\scripts\obtain\install-dnx.ps1"
diff --git a/scripts/test/package-command-test.ps1 b/scripts/test/package-command-test.ps1
index 53c71313d..914c02b0a 100644
--- a/scripts/test/package-command-test.ps1
+++ b/scripts/test/package-command-test.ps1
@@ -32,7 +32,7 @@ foreach {
#restore test projects
pushd "$RepoRoot\test\PackagedCommands\Consumers"
-dotnet restore -s "$TestPackagesPath" --no-cache --ignore-failed-sources --parallel
+dotnet restore -s "$TestPackagesPath"
if (!$?) {
error "Command failed: dotnet restore"
Exit 1
diff --git a/scripts/test/package-command-test.sh b/scripts/test/package-command-test.sh
index 3d65d6f53..75fab53ab 100755
--- a/scripts/test/package-command-test.sh
+++ b/scripts/test/package-command-test.sh
@@ -36,7 +36,7 @@ done
# restore test projects
pushd "$REPOROOT/test/PackagedCommands/Consumers"
-dotnet restore -s "$TestPackagesPath" --no-cache --ignore-failed-sources --parallel
+dotnet restore -s "$TestPackagesPath"
popd
#compile tests with direct dependencies
@@ -50,7 +50,7 @@ done
#run test
for test in $(ls -l "$REPOROOT/test/PackagedCommands/Consumers" | grep ^d | awk '{print $9}' | grep "AppWith")
do
- testName="test/PackagedCommands/Consumers/$test"
+ testName="test/PackagedCommands/Consumers/$test"
pushd "$REPOROOT/$testName"
diff --git a/src/Microsoft.DotNet.Cli.Utils/CoreHost.cs b/src/Microsoft.DotNet.Cli.Utils/CoreHost.cs
index a428e90e4..0ab2d2c6f 100644
--- a/src/Microsoft.DotNet.Cli.Utils/CoreHost.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/CoreHost.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using Microsoft.DotNet.ProjectModel;
@@ -8,6 +9,11 @@ namespace Microsoft.DotNet.Cli.Utils
internal static string _hostDir;
internal static string _hostExePath;
+ ///
+ /// Gets the path to the version of corehost that was shipped with this command
+ ///
+ public static string LocalHostExePath => Path.Combine(AppContext.BaseDirectory, Constants.HostExecutableName);
+
public static string HostExePath
{
get
diff --git a/src/Microsoft.DotNet.Cli.Utils/RuntimeEnvironmentRidExtensions.cs b/src/Microsoft.DotNet.Cli.Utils/RuntimeEnvironmentRidExtensions.cs
index b27738a15..20ed4227d 100644
--- a/src/Microsoft.DotNet.Cli.Utils/RuntimeEnvironmentRidExtensions.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/RuntimeEnvironmentRidExtensions.cs
@@ -11,6 +11,20 @@ namespace Microsoft.Extensions.PlatformAbstractions
// We should clean this up. Filed #619 to track.
public static class RuntimeEnvironmentRidExtensions
{
+ // Work around NuGet/Home#1941
+ public static IEnumerable GetOverrideRestoreRuntimeIdentifiers(this IRuntimeEnvironment env)
+ {
+ if (env.OperatingSystemPlatform != Platform.Windows)
+ {
+ yield return env.GetRuntimeIdentifier();
+ }
+ else
+ {
+ yield return "win7-x86";
+ yield return "win7-x64";
+ }
+ }
+
// Gets the identfier that is used for restore by default (this is different from the actual RID, but only on Windows)
public static string GetLegacyRestoreRuntimeIdentifier(this IRuntimeEnvironment env)
{
diff --git a/src/Microsoft.DotNet.ProjectModel.Workspaces/project.json b/src/Microsoft.DotNet.ProjectModel.Workspaces/project.json
index 1e9cf564f..777bdf275 100644
--- a/src/Microsoft.DotNet.ProjectModel.Workspaces/project.json
+++ b/src/Microsoft.DotNet.ProjectModel.Workspaces/project.json
@@ -9,6 +9,8 @@
"Microsoft.CodeAnalysis.CSharp.Workspaces": "1.2.0-beta1-20160108-01"
},
"frameworks": {
- "dnxcore50": { }
+ "dnxcore50": {
+ "imports": "portable-net45+win8"
+ }
}
}
diff --git a/src/Microsoft.DotNet.ProjectModel/EnvironmentNames.cs b/src/Microsoft.DotNet.ProjectModel/EnvironmentNames.cs
index 803d4ff4a..6e0f9f02f 100644
--- a/src/Microsoft.DotNet.ProjectModel/EnvironmentNames.cs
+++ b/src/Microsoft.DotNet.ProjectModel/EnvironmentNames.cs
@@ -5,7 +5,7 @@ namespace Microsoft.DotNet.ProjectModel
{
public class EnvironmentNames
{
- public static readonly string PackagesCache = "NUGET_PACKAGES";
+ public static readonly string PackagesStore = "NUGET_PACKAGES";
public static readonly string StrongNameKeyFile = "DOTNET_BUILD_STRONG_NAME_KEYFILE";
}
}
diff --git a/src/Microsoft.DotNet.ProjectModel/Resolution/PackageDependencyProvider.cs b/src/Microsoft.DotNet.ProjectModel/Resolution/PackageDependencyProvider.cs
index 512879447..36b5dc38b 100644
--- a/src/Microsoft.DotNet.ProjectModel/Resolution/PackageDependencyProvider.cs
+++ b/src/Microsoft.DotNet.ProjectModel/Resolution/PackageDependencyProvider.cs
@@ -71,7 +71,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
{
// Order
// 1. global.json { "packages": "..." }
- // 2. EnvironmentNames.Packages environment variable
+ // 2. EnvironmentNames.PackagesStore environment variable
// 3. NuGet.config repositoryPath (maybe)?
// 4. {DefaultLocalRuntimeHomeDir}\packages
@@ -80,7 +80,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
return Path.Combine(rootDirectory, settings.PackagesPath);
}
- var runtimePackages = Environment.GetEnvironmentVariable(EnvironmentNames.PackagesCache);
+ var runtimePackages = Environment.GetEnvironmentVariable(EnvironmentNames.PackagesStore);
if (!string.IsNullOrEmpty(runtimePackages))
{
@@ -94,8 +94,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
profileDirectory = Environment.GetEnvironmentVariable("HOME");
}
- // TODO(anurse): This should migrate to the NuGet packages directory
- return Path.Combine(profileDirectory, ".dnx", "packages");
+ return Path.Combine(profileDirectory, ".nuget", "packages");
}
}
}
diff --git a/src/Microsoft.DotNet.ProjectModel/project.json b/src/Microsoft.DotNet.ProjectModel/project.json
index 21736c437..77913b047 100644
--- a/src/Microsoft.DotNet.ProjectModel/project.json
+++ b/src/Microsoft.DotNet.ProjectModel/project.json
@@ -12,7 +12,7 @@
"System.Security.Cryptography.Algorithms": "4.0.0-rc2-23616",
"Microsoft.CSharp": "4.0.1-rc2-23616",
"System.Xml.XDocument": "4.0.11-rc2-23616",
- "NuGet.Packaging": "3.3.0-*",
+ "NuGet.Packaging": "3.4.0-*",
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15882",
"Microsoft.Extensions.JsonParser.Sources": {
diff --git a/src/corehost/common/pal.unix.cpp b/src/corehost/common/pal.unix.cpp
index 9e943208e..ead8034d8 100644
--- a/src/corehost/common/pal.unix.cpp
+++ b/src/corehost/common/pal.unix.cpp
@@ -87,7 +87,7 @@ bool pal::get_default_packages_directory(pal::string_t* recv)
{
return false;
}
- append_path(&*recv, _X(".dnx"));
+ append_path(&*recv, _X(".nuget"));
append_path(&*recv, _X("packages"));
return true;
}
diff --git a/src/corehost/common/pal.windows.cpp b/src/corehost/common/pal.windows.cpp
index 29793ddf6..d70bd60e9 100644
--- a/src/corehost/common/pal.windows.cpp
+++ b/src/corehost/common/pal.windows.cpp
@@ -75,7 +75,7 @@ bool pal::get_default_packages_directory(string_t* recv)
{
return false;
}
- append_path(&*recv, _X(".dnx"));
+ append_path(&*recv, _X(".nuget"));
append_path(&*recv, _X("packages"));
return true;
}
diff --git a/src/dotnet-restore/Dnx.cs b/src/dotnet-restore/Dnx.cs
deleted file mode 100644
index 013349e7b..000000000
--- a/src/dotnet-restore/Dnx.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.DotNet.Cli.Utils;
-using Microsoft.DotNet.ProjectModel.Graph;
-
-namespace Microsoft.DotNet.Tools.Restore
-{
- public static class Dnx
- {
- public static int RunRestore(IEnumerable args)
- {
- var result = RunDnx(new List {"restore"}.Concat(args))
- .ForwardStdErr()
- .ForwardStdOut()
- .Execute();
-
- return result.ExitCode;
- }
-
- public static int RunPackageInstall(LibraryRange dependency, string projectPath, IEnumerable args)
- {
- var result = RunDnx(new List { "install", dependency.Name, dependency.VersionRange.OriginalString, projectPath }.Concat(args))
- .ForwardStdErr()
- .ForwardStdOut()
- .Execute();
-
- return result.ExitCode;
- }
-
- private static Command RunDnx(IEnumerable dnxArgs)
- {
- return Command.Create("dotnet-dnx", dnxArgs);
- }
- }
-}
\ No newline at end of file
diff --git a/src/dotnet-restore/NuGet3.cs b/src/dotnet-restore/NuGet3.cs
new file mode 100644
index 000000000..54767bb17
--- /dev/null
+++ b/src/dotnet-restore/NuGet3.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Microsoft.DotNet.Cli.Utils;
+
+namespace Microsoft.DotNet.Tools.Restore
+{
+ internal static class NuGet3
+ {
+ public static int Restore(IEnumerable args, bool quiet)
+ {
+ var prefixArgs = new List();
+ if (quiet)
+ {
+ prefixArgs.Add("--verbosity");
+ prefixArgs.Add("Error");
+ }
+ prefixArgs.Add("restore");
+
+ var result = Run(Enumerable.Concat(
+ prefixArgs,
+ args))
+ .ForwardStdErr()
+ .ForwardStdOut()
+ .Execute();
+
+ return result.ExitCode;
+ }
+
+ private static Command Run(IEnumerable nugetArgs)
+ {
+ return Command.Create(CoreHost.LocalHostExePath, Enumerable.Concat(
+ new[] { Path.Combine(AppContext.BaseDirectory, "NuGet.CommandLine.XPlat.dll") },
+ nugetArgs));
+ }
+ }
+}
diff --git a/src/dotnet-restore/Program.cs b/src/dotnet-restore/Program.cs
index 0a96b121e..565deaddb 100644
--- a/src/dotnet-restore/Program.cs
+++ b/src/dotnet-restore/Program.cs
@@ -20,6 +20,7 @@ namespace Microsoft.DotNet.Tools.Restore
{
private static readonly string DefaultRid = PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier();
+
public static int Main(string[] args)
{
DebugHelper.HandleDebugSwitch(ref args);
@@ -30,12 +31,25 @@ namespace Microsoft.DotNet.Tools.Restore
FullName = ".NET project dependency restorer",
Description = "Restores dependencies listed in project.json"
};
-
+
+ // Parse --quiet, because we have to handle that specially since NuGet3 has a different
+ // "--verbosity" switch that goes BEFORE the command
+ var quiet = args.Any(s => s.Equals("--quiet", StringComparison.OrdinalIgnoreCase));
+ args = args.Where(s => !s.Equals("--quiet", StringComparison.OrdinalIgnoreCase)).ToArray();
+
+ // Until NuGet/Home#1941 is fixed, if no RIDs are specified, add our own.
+ if (!args.Any(s => s.Equals("--runtime", StringComparison.OrdinalIgnoreCase)))
+ {
+ args = Enumerable.Concat(
+ PlatformServices.Default.Runtime.GetOverrideRestoreRuntimeIdentifiers().SelectMany(r => new [] { "--runtime", r }),
+ args).ToArray();
+ }
+
app.OnExecute(() =>
{
try
{
- var projectRestoreResult = Dnx.RunRestore(args);
+ var projectRestoreResult = NuGet3.Restore(args, quiet);
var restoreTasks = GetRestoreTasks(args);
@@ -43,7 +57,7 @@ namespace Microsoft.DotNet.Tools.Restore
{
var project = ProjectReader.GetProject(restoreTask.ProjectPath);
- RestoreTools(project, restoreTask);
+ RestoreTools(project, restoreTask, quiet);
}
return projectRestoreResult;
@@ -100,22 +114,22 @@ namespace Microsoft.DotNet.Tools.Restore
return firstArg.EndsWith(Project.FileName) && File.Exists(firstArg);
}
- private static void RestoreTools(Project project, RestoreTask restoreTask)
+ private static void RestoreTools(Project project, RestoreTask restoreTask, bool quiet)
{
foreach (var tooldep in project.Tools)
{
- RestoreTool(tooldep, restoreTask);
+ RestoreTool(tooldep, restoreTask, quiet);
}
}
- private static void RestoreTool(LibraryRange tooldep, RestoreTask restoreTask)
+ private static void RestoreTool(LibraryRange tooldep, RestoreTask restoreTask, bool quiet)
{
var tempRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
try
{
var tempPath = Path.Combine(tempRoot, "bin");
- RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath);
+ RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath, quiet);
CreateDepsInPackageCache(tooldep, tempPath);
@@ -163,34 +177,33 @@ namespace Microsoft.DotNet.Tools.Restore
File.Move(Path.Combine(context.ProjectDirectory, "bin" + FileNameSuffixes.Deps), depsPath);
}
- private static void RestoreToolToPath(LibraryRange tooldep, IEnumerable args, string tempPath)
+ private static void RestoreToolToPath(LibraryRange tooldep, IEnumerable args, string tempPath, bool quiet)
{
Directory.CreateDirectory(tempPath);
var projectPath = Path.Combine(tempPath, Project.FileName);
Console.WriteLine($"Restoring Tool '{tooldep.Name}' for '{projectPath}' in '{tempPath}'");
- File.WriteAllText(projectPath, GenerateProjectJsonContents(new[] {"dnxcore50"}));
- Dnx.RunPackageInstall(tooldep, projectPath, args);
- Dnx.RunRestore(new [] { $"\"{projectPath}\"", "--runtime", $"{DefaultRid}"}.Concat(args));
+ File.WriteAllText(projectPath, GenerateProjectJsonContents(new[] {"dnxcore50"}, tooldep));
+ NuGet3.Restore(new [] { $"\"{projectPath}\"", "--runtime", $"{DefaultRid}"}.Concat(args), quiet);
}
- private static string GenerateProjectJsonContents(IEnumerable frameworks = null)
+ private static string GenerateProjectJsonContents(IEnumerable frameworks, LibraryRange tooldep)
{
var sb = new StringBuilder();
sb.AppendLine("{");
- if (frameworks != null)
+ sb.AppendLine(" \"dependencies\": {");
+ sb.AppendLine($" \"{tooldep.Name}\": \"{tooldep.VersionRange.OriginalString}\"");
+ sb.AppendLine(" },");
+ sb.AppendLine(" \"frameworks\": {");
+ foreach (var framework in frameworks)
{
- sb.AppendLine(" \"frameworks\":{");
- foreach (var framework in frameworks)
- {
- sb.AppendLine($" \"{framework}\":{{}}");
- }
- sb.AppendLine(" }");
+ sb.AppendLine($" \"{framework}\": {{}}");
}
+ sb.AppendLine(" }");
sb.AppendLine("}");
var pjContents = sb.ToString();
return pjContents;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/dotnet-restore/project.json b/src/dotnet-restore/project.json
index 49fd164d1..e97943d2a 100644
--- a/src/dotnet-restore/project.json
+++ b/src/dotnet-restore/project.json
@@ -11,7 +11,8 @@
"emitEntryPoint": true
},
"dependencies": {
- "Microsoft.NETCore.ConsoleHost": "1.0.0-beta-23409",
+ "NuGet.CommandLine.XPlat": "3.4.0-*",
+ "Microsoft.NETCore.Platforms": "1.0.1-rc2-23608",
"NETStandard.Library": "1.0.0-rc2-23608",
"System.Linq": "4.0.1-beta-23504",
"System.Collections": "4.0.11-beta-23504",
diff --git a/test/E2E/project.json b/test/E2E/project.json
index 06ea2f81c..a5f6eccd5 100644
--- a/test/E2E/project.json
+++ b/test/E2E/project.json
@@ -12,9 +12,9 @@
"xunit.netcore.extensions": "1.0.0-prerelease-*",
"xunit.runner.utility": "2.1.0",
- "Microsoft.DotNet.ProjectModel": { "target": "project" },
- "Microsoft.DotNet.Cli.Utils": { "target": "project" },
- "Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }
+ "Microsoft.DotNet.ProjectModel": "1.0.0-*",
+ "Microsoft.DotNet.Cli.Utils": "1.0.0-*",
+ "Microsoft.DotNet.Tools.Tests.Utilities": "1.0.0-*"
},
"frameworks": {
diff --git a/test/LoadContextTest/project.json b/test/LoadContextTest/project.json
index 0f1f64a6d..835e44567 100644
--- a/test/LoadContextTest/project.json
+++ b/test/LoadContextTest/project.json
@@ -15,7 +15,7 @@
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530",
- "Microsoft.DotNet.ProjectModel.Loader": { "target": "project" }
+ "Microsoft.DotNet.ProjectModel.Loader": "1.0.0-*"
},
"frameworks": {
diff --git a/test/Microsoft.DotNet.Tools.Compiler.Tests/CompilerTests.cs b/test/Microsoft.DotNet.Tools.Compiler.Tests/CompilerTests.cs
index 9b8606b89..7f5c8f02a 100644
--- a/test/Microsoft.DotNet.Tools.Compiler.Tests/CompilerTests.cs
+++ b/test/Microsoft.DotNet.Tools.Compiler.Tests/CompilerTests.cs
@@ -16,6 +16,8 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var root = Temp.CreateDirectory();
+ root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
+
var testLibDir = root.CreateDirectory("TestLibrary");
// copy projects to the temp dir and restore them
diff --git a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
index 8c100808b..57af9bd01 100644
--- a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
+++ b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs
@@ -37,6 +37,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var root = Temp.CreateDirectory();
+ root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary");
@@ -73,6 +74,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var testDir = Temp.CreateDirectory();
+ testDir.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = Path.Combine(_testProjectsRoot, "TestAppWithContents");
// copy projects to the temp dir
@@ -94,6 +96,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var root = Temp.CreateDirectory();
+ root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary");
@@ -111,6 +114,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var root = Temp.CreateDirectory();
+ root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testLibDir = root.CreateDirectory("TestLibrary");
//copy projects to the temp dir
@@ -157,6 +161,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
public void CompilationFailedTest()
{
var testDir = Temp.CreateDirectory();
+ testDir.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var compileFailDir = Path.Combine(_testProjectsRoot, "CompileFail");
CopyProjectToTempDir(compileFailDir, testDir);
@@ -174,6 +179,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{
// create unique directories in the 'temp' folder
var root = Temp.CreateDirectory();
+ root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary");
diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json b/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json
index 51df612bc..5f9ec376d 100644
--- a/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json
+++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/project.json
@@ -14,9 +14,8 @@
"FluentAssertions": "4.0.0",
"xunit": "2.1.0",
- "Microsoft.DotNet.Cli.Utils": { "target": "project" },
+ "Microsoft.DotNet.Cli.Utils": "1.0.0-*",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530"
-
},
diff --git a/test/TestProjects/CompileFail/project.json b/test/TestProjects/CompileFail/project.json
index c32a00236..d29882168 100644
--- a/test/TestProjects/CompileFail/project.json
+++ b/test/TestProjects/CompileFail/project.json
@@ -5,9 +5,8 @@
},
"dependencies": {
- "Microsoft.NETCore.ConsoleHost": "1.0.0-23428",
- "Microsoft.NETCore.Runtime": "1.0.1-23428",
- "System.Console": "4.0.0-beta-23109"
+ "NETStandard.Library": "1.0.0-rc2-23704",
+ "Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
},
"frameworks": {
diff --git a/test/TestProjects/TestApp/project.json b/test/TestProjects/TestApp/project.json
index 01a8d9137..2e8f39167 100644
--- a/test/TestProjects/TestApp/project.json
+++ b/test/TestProjects/TestApp/project.json
@@ -5,12 +5,10 @@
},
"dependencies": {
- "TestLibrary": { "target": "project" },
- "System.IO": "4.0.11-beta-23428",
- "System.Console": "4.0.0-beta-23428",
- "System.Runtime": "4.0.21-beta-23428",
- "System.Diagnostics.Process": "4.1.0-beta-23428",
- "Microsoft.NETCore.Runtime": "1.0.1-beta-23428"
+ "TestLibrary": "1.0.0-*",
+
+ "NETStandard.Library": "1.0.0-rc2-23704",
+ "Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
},
"frameworks": {
diff --git a/test/TestProjects/TestLibrary/project.json b/test/TestProjects/TestLibrary/project.json
index a8ae68bbb..0c97af079 100644
--- a/test/TestProjects/TestLibrary/project.json
+++ b/test/TestProjects/TestLibrary/project.json
@@ -5,8 +5,9 @@
"xmlDoc": true
},
"dependencies": {
- "System.Runtime": "4.0.21-beta-23428",
- "System.Console": "4.0.0-beta-23428"
+ "System.Runtime": "4.0.21-rc2-23704",
+ "System.Console": "4.0.0-rc2-23704",
+ "Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
},
"frameworks": {
diff --git a/test/TestProjects/TestLibraryWithRunner/project.json b/test/TestProjects/TestLibraryWithRunner/project.json
index 53d92dcd8..965bc6237 100644
--- a/test/TestProjects/TestLibraryWithRunner/project.json
+++ b/test/TestProjects/TestLibraryWithRunner/project.json
@@ -3,7 +3,8 @@
"testRunner": "xunit",
"dependencies": {
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
- "Newtonsoft.Json": "3.5.8"
+ "Newtonsoft.Json": "3.5.8",
+ "System.Runtime": "4.0.0"
},
"frameworks": {
diff --git a/test/TestProjects/global.json b/test/TestProjects/global.json
new file mode 100644
index 000000000..09f20328d
--- /dev/null
+++ b/test/TestProjects/global.json
@@ -0,0 +1,3 @@
+{
+ "projects": [ ".", "../../src" ]
+}
\ No newline at end of file