switch from DNX to cross-plat NuGet!

This commit is contained in:
Andrew Stanton-Nurse 2016-01-12 16:36:31 -08:00
parent 4e0d28db74
commit 3d493f7d9d
43 changed files with 241 additions and 181 deletions

4
.gitignore vendored
View file

@ -1,5 +1,9 @@
### Repo-specific things ### ### Repo-specific things ###
# NuGet v3 restore drops these even though we don't use MSBuild :(
*.nuget.targets
*.nuget.props
# Debian and python stuff # Debian and python stuff
*.dsc *.dsc
*.tar.gz *.tar.gz

View file

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.23107.0 VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1 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}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli", "src\Microsoft.DotNet.Cli\Microsoft.DotNet.Cli.xproj", "{60CF7E6C-D6C8-439D-B7B7-D8A27E29BE2C}"
EndProject EndProject
@ -75,14 +75,18 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Tools.Test
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{713CBFBB-5392-438D-B766-A9A585EF1BB8}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{713CBFBB-5392-438D-B766-A9A585EF1BB8}"
EndProject 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}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "test\TestProjects\TestApp\TestApp.xproj", "{58808BBC-371E-47D6-A3D0-4902145EDA4E}"
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithArgs", "test\TestProjects\TestAppWithArgs\TestAppWithArgs.xproj", "{DA8E0E9E-A6D6-4583-864C-8F40465E3A48}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithArgs", "test\TestProjects\TestAppWithArgs\TestAppWithArgs.xproj", "{DA8E0E9E-A6D6-4583-864C-8F40465E3A48}"
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithContents", "test\TestProjects\TestAppWithContents\TestAppWithContents.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestAppWithContents", "test\TestProjects\TestAppWithContents\TestAppWithContents.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
EndProject 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 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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|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.ActiveCfg = Release|Any CPU
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C}.RelWithDebInfo|x64.Build.0 = 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.ActiveCfg = Debug|Any CPU
{58808BBC-371E-47D6-A3D0-4902145EDA4E}.Debug|Any CPU.Build.0 = 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 {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|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.ActiveCfg = Release|Any CPU
{0138CB8F-4AA9-4029-A21E-C07C30F425BA}.RelWithDebInfo|x64.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -658,9 +694,11 @@ Global
{65741CB1-8AEE-4C66-8198-10A7EA0E4258} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {65741CB1-8AEE-4C66-8198-10A7EA0E4258} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{E4F46EAB-B5A5-4E60-9B9D-40A1FADBF45C} = {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} {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} {58808BBC-371E-47D6-A3D0-4902145EDA4E} = {713CBFBB-5392-438D-B766-A9A585EF1BB8}
{DA8E0E9E-A6D6-4583-864C-8F40465E3A48} = {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} {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 EndGlobalSection
EndGlobal EndGlobal

View file

@ -17,4 +17,8 @@
<activePackageSource> <activePackageSource>
<add key="AspNetCIDev" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" /> <add key="AspNetCIDev" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
</activePackageSource> </activePackageSource>
<packageRestore>
<add key="enabled" value="False" />
<add key="automatic" value="False" />
</packageRestore>
</configuration> </configuration>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(NuGetPackageRoot)' == ''"> <PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
<NuGetPackageRoot>C:\Users\sridhper\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot>$(UserProfile)\AppData\Local\Temp</NuGetPackageRoot>
</PropertyGroup> </PropertyGroup>
<ImportGroup> <ImportGroup>
<Import Project="$(NuGetPackageRoot)\WiX\3.10.0.2103-pre1\build\wix.props" Condition="Exists('$(NuGetPackageRoot)\WiX\3.10.0.2103-pre1\build\wix.props')" /> <Import Project="$(NuGetPackageRoot)\WiX\3.10.0.2103-pre1\build\wix.props" Condition="Exists('$(NuGetPackageRoot)\WiX\3.10.0.2103-pre1\build\wix.props')" />

View file

@ -15,6 +15,18 @@ $ErrorActionPreference="Stop"
. "$RepoRoot\scripts\build\generate-version.ps1" . "$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 "Building dotnet tools version $($env:DOTNET_CLI_VERSION) - $Configuration"
header "Checking Pre-Reqs" header "Checking Pre-Reqs"

View file

@ -19,6 +19,11 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source "$DIR/../common/_common.sh" source "$DIR/../common/_common.sh"
source "$REPOROOT/scripts/build/generate-version.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 "Building dotnet tools version $DOTNET_CLI_VERSION - $CONFIGURATION"
header "Checking Pre-Reqs" header "Checking Pre-Reqs"

View file

@ -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 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 REM The AppDepSDK package is a temporary artifact until we have CoreRT assemblies published to Nuget
@ -13,17 +14,17 @@ set __OutputPath=%CD%\bin
popd popd
rmdir /S /Q %AppDepsProjectDir%\packages
pushd %__AppDepsProjectDir% pushd %__AppDepsProjectDir%
dotnet restore --packages %AppDepsProjectDir%\packages rmdir /S /Q packages
set __AppDepSDK=%AppDepsProjectDir%\packages\toolchain*\ dotnet restore --packages %__AppDepsProjectDir%\packages
set __AppDepSDK=%__AppDepsProjectDir%\packages\toolchain*\
popd popd
mkdir %__OutputPath%\appdepsdk mkdir %__OutputPath%\appdepsdk
cd %__AppDepSDK% cd %__AppDepSDK%
FOR /D %%a IN (*) DO ( FOR /D %%a IN (*) DO (
CD %%a CD %%a
TREE
GOTO :Copy GOTO :Copy
) )

View file

@ -18,12 +18,12 @@ else {
# Restore packages # Restore packages
header "Restoring packages" header "Restoring packages"
& "$DnxRoot\dnu" restore "$RepoRoot\src" --quiet --runtime "$Rid" "$NoCacheArg" --parallel & "$DnxRoot\dnu" restore "$RepoRoot\src" --quiet --runtime "$Rid" "$NoCacheArg"
& "$DnxRoot\dnu" restore "$RepoRoot\test" --quiet --runtime "$Rid" "$NoCacheArg" --parallel & "$DnxRoot\dnu" restore "$RepoRoot\test" --quiet --runtime "$Rid" "$NoCacheArg"
& "$DnxRoot\dnu" restore "$RepoRoot\tools" --quiet --runtime "$Rid" "$NoCacheArg" --parallel & "$DnxRoot\dnu" restore "$RepoRoot\tools" --quiet --runtime "$Rid" "$NoCacheArg"
$oldErrorAction=$ErrorActionPreference $oldErrorAction=$ErrorActionPreference
$ErrorActionPreference="SilentlyContinue" $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 $ErrorActionPreference=$oldErrorAction

View file

@ -18,9 +18,9 @@ source "$DIR/../common/_common.sh"
header "Restoring packages" header "Restoring packages"
$DNX_ROOT/dnu restore "$REPOROOT/src" --quiet "$NOCACHE" --parallel $DNX_ROOT/dnu restore "$REPOROOT/src" --quiet "$NOCACHE"
$DNX_ROOT/dnu restore "$REPOROOT/test" --quiet "$NOCACHE" --parallel $DNX_ROOT/dnu restore "$REPOROOT/test" --quiet "$NOCACHE"
$DNX_ROOT/dnu restore "$REPOROOT/tools" --quiet "$NOCACHE" --parallel $DNX_ROOT/dnu restore "$REPOROOT/tools" --quiet "$NOCACHE"
set +e 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 set -e

View file

@ -3,6 +3,8 @@
REM Copyright (c) .NET Foundation and contributors. All rights reserved. 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. 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 %* CALL %~dp0..\build.cmd -NoCache %*
exit /b %errorlevel% exit /b %errorlevel%

View file

@ -93,19 +93,9 @@ if (-not (Test-Path "$OutputDir\bin\csc.ni.exe")) {
_cmd "$RepoRoot\scripts\crossgen\crossgen_roslyn.cmd ""$OutputDir""" _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 # Copy in AppDeps
if (-not (Test-Path "$OutputDir\bin\appdepsdk\")) { if (-not (Test-Path "$OutputDir\bin\appdepsdk\")) {
$env:PATH = "$OutputDir\bin;$StartPath" $env:PATH = "$OutputDir\bin;$StartPath"
header "Acquiring Native App Dependencies" header "Acquiring Native App Dependencies"
_cmd "$RepoRoot\scripts\build\build_appdeps.cmd ""$OutputDir""" _cmd "$RepoRoot\scripts\build\build_appdeps.cmd ""$OutputDir"""
} }

View file

@ -105,17 +105,6 @@ fi
# Make OUTPUT_DIR Folder Accessible # Make OUTPUT_DIR Folder Accessible
chmod -R a+r $OUTPUT_DIR 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 # No compile native support in centos yet
# https://github.com/dotnet/cli/issues/453 # https://github.com/dotnet/cli/issues/453
if [ "$OSNAME" != "centos" ]; then if [ "$OSNAME" != "centos" ]; then

View file

@ -9,7 +9,7 @@ set BIN_DIR=%CD%\bin
popd popd
REM Replace with a robust method for finding the right crossgen.exe 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 REM Crossgen currently requires itself to be next to mscorlib
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul

View file

@ -23,7 +23,7 @@ else
fi fi
# Replace with a robust method for finding the right crossgen.exe # 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 cd $BIN_DIR

View file

@ -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

View file

@ -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" "$@"

View file

@ -32,7 +32,7 @@ foreach {
#restore test projects #restore test projects
pushd "$RepoRoot\test\PackagedCommands\Consumers" pushd "$RepoRoot\test\PackagedCommands\Consumers"
dotnet restore -s "$TestPackagesPath" --no-cache --ignore-failed-sources --parallel dotnet restore -s "$TestPackagesPath"
if (!$?) { if (!$?) {
error "Command failed: dotnet restore" error "Command failed: dotnet restore"
Exit 1 Exit 1

View file

@ -36,7 +36,7 @@ done
# restore test projects # restore test projects
pushd "$REPOROOT/test/PackagedCommands/Consumers" pushd "$REPOROOT/test/PackagedCommands/Consumers"
dotnet restore -s "$TestPackagesPath" --no-cache --ignore-failed-sources --parallel dotnet restore -s "$TestPackagesPath"
popd popd
#compile tests with direct dependencies #compile tests with direct dependencies

View file

@ -1,3 +1,4 @@
using System;
using System.IO; using System.IO;
using Microsoft.DotNet.ProjectModel; using Microsoft.DotNet.ProjectModel;
@ -8,6 +9,11 @@ namespace Microsoft.DotNet.Cli.Utils
internal static string _hostDir; internal static string _hostDir;
internal static string _hostExePath; internal static string _hostExePath;
/// <summary>
/// Gets the path to the version of corehost that was shipped with this command
/// </summary>
public static string LocalHostExePath => Path.Combine(AppContext.BaseDirectory, Constants.HostExecutableName);
public static string HostExePath public static string HostExePath
{ {
get get

View file

@ -11,6 +11,20 @@ namespace Microsoft.Extensions.PlatformAbstractions
// We should clean this up. Filed #619 to track. // We should clean this up. Filed #619 to track.
public static class RuntimeEnvironmentRidExtensions public static class RuntimeEnvironmentRidExtensions
{ {
// Work around NuGet/Home#1941
public static IEnumerable<string> 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) // 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) public static string GetLegacyRestoreRuntimeIdentifier(this IRuntimeEnvironment env)
{ {

View file

@ -9,6 +9,8 @@
"Microsoft.CodeAnalysis.CSharp.Workspaces": "1.2.0-beta1-20160108-01" "Microsoft.CodeAnalysis.CSharp.Workspaces": "1.2.0-beta1-20160108-01"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { } "dnxcore50": {
"imports": "portable-net45+win8"
}
} }
} }

View file

@ -5,7 +5,7 @@ namespace Microsoft.DotNet.ProjectModel
{ {
public class EnvironmentNames 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"; public static readonly string StrongNameKeyFile = "DOTNET_BUILD_STRONG_NAME_KEYFILE";
} }
} }

View file

@ -71,7 +71,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
{ {
// Order // Order
// 1. global.json { "packages": "..." } // 1. global.json { "packages": "..." }
// 2. EnvironmentNames.Packages environment variable // 2. EnvironmentNames.PackagesStore environment variable
// 3. NuGet.config repositoryPath (maybe)? // 3. NuGet.config repositoryPath (maybe)?
// 4. {DefaultLocalRuntimeHomeDir}\packages // 4. {DefaultLocalRuntimeHomeDir}\packages
@ -80,7 +80,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
return Path.Combine(rootDirectory, settings.PackagesPath); return Path.Combine(rootDirectory, settings.PackagesPath);
} }
var runtimePackages = Environment.GetEnvironmentVariable(EnvironmentNames.PackagesCache); var runtimePackages = Environment.GetEnvironmentVariable(EnvironmentNames.PackagesStore);
if (!string.IsNullOrEmpty(runtimePackages)) if (!string.IsNullOrEmpty(runtimePackages))
{ {
@ -94,8 +94,7 @@ namespace Microsoft.DotNet.ProjectModel.Resolution
profileDirectory = Environment.GetEnvironmentVariable("HOME"); profileDirectory = Environment.GetEnvironmentVariable("HOME");
} }
// TODO(anurse): This should migrate to the NuGet packages directory return Path.Combine(profileDirectory, ".nuget", "packages");
return Path.Combine(profileDirectory, ".dnx", "packages");
} }
} }
} }

View file

@ -12,7 +12,7 @@
"System.Security.Cryptography.Algorithms": "4.0.0-rc2-23616", "System.Security.Cryptography.Algorithms": "4.0.0-rc2-23616",
"Microsoft.CSharp": "4.0.1-rc2-23616", "Microsoft.CSharp": "4.0.1-rc2-23616",
"System.Xml.XDocument": "4.0.11-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.FileSystemGlobbing": "1.0.0-rc2-15882",
"Microsoft.Extensions.JsonParser.Sources": { "Microsoft.Extensions.JsonParser.Sources": {

View file

@ -87,7 +87,7 @@ bool pal::get_default_packages_directory(pal::string_t* recv)
{ {
return false; return false;
} }
append_path(&*recv, _X(".dnx")); append_path(&*recv, _X(".nuget"));
append_path(&*recv, _X("packages")); append_path(&*recv, _X("packages"));
return true; return true;
} }

View file

@ -75,7 +75,7 @@ bool pal::get_default_packages_directory(string_t* recv)
{ {
return false; return false;
} }
append_path(&*recv, _X(".dnx")); append_path(&*recv, _X(".nuget"));
append_path(&*recv, _X("packages")); append_path(&*recv, _X("packages"));
return true; return true;
} }

View file

@ -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<string> args)
{
var result = RunDnx(new List<string> {"restore"}.Concat(args))
.ForwardStdErr()
.ForwardStdOut()
.Execute();
return result.ExitCode;
}
public static int RunPackageInstall(LibraryRange dependency, string projectPath, IEnumerable<string> args)
{
var result = RunDnx(new List<string> { "install", dependency.Name, dependency.VersionRange.OriginalString, projectPath }.Concat(args))
.ForwardStdErr()
.ForwardStdOut()
.Execute();
return result.ExitCode;
}
private static Command RunDnx(IEnumerable<string> dnxArgs)
{
return Command.Create("dotnet-dnx", dnxArgs);
}
}
}

View file

@ -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<string> args, bool quiet)
{
var prefixArgs = new List<string>();
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<string> nugetArgs)
{
return Command.Create(CoreHost.LocalHostExePath, Enumerable.Concat(
new[] { Path.Combine(AppContext.BaseDirectory, "NuGet.CommandLine.XPlat.dll") },
nugetArgs));
}
}
}

View file

@ -20,6 +20,7 @@ namespace Microsoft.DotNet.Tools.Restore
{ {
private static readonly string DefaultRid = PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier(); private static readonly string DefaultRid = PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier();
public static int Main(string[] args) public static int Main(string[] args)
{ {
DebugHelper.HandleDebugSwitch(ref args); DebugHelper.HandleDebugSwitch(ref args);
@ -31,11 +32,24 @@ namespace Microsoft.DotNet.Tools.Restore
Description = "Restores dependencies listed in project.json" 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(() => app.OnExecute(() =>
{ {
try try
{ {
var projectRestoreResult = Dnx.RunRestore(args); var projectRestoreResult = NuGet3.Restore(args, quiet);
var restoreTasks = GetRestoreTasks(args); var restoreTasks = GetRestoreTasks(args);
@ -43,7 +57,7 @@ namespace Microsoft.DotNet.Tools.Restore
{ {
var project = ProjectReader.GetProject(restoreTask.ProjectPath); var project = ProjectReader.GetProject(restoreTask.ProjectPath);
RestoreTools(project, restoreTask); RestoreTools(project, restoreTask, quiet);
} }
return projectRestoreResult; return projectRestoreResult;
@ -100,22 +114,22 @@ namespace Microsoft.DotNet.Tools.Restore
return firstArg.EndsWith(Project.FileName) && File.Exists(firstArg); 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) 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()); var tempRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
try try
{ {
var tempPath = Path.Combine(tempRoot, "bin"); var tempPath = Path.Combine(tempRoot, "bin");
RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath); RestoreToolToPath(tooldep, restoreTask.Arguments, tempPath, quiet);
CreateDepsInPackageCache(tooldep, tempPath); CreateDepsInPackageCache(tooldep, tempPath);
@ -163,31 +177,30 @@ namespace Microsoft.DotNet.Tools.Restore
File.Move(Path.Combine(context.ProjectDirectory, "bin" + FileNameSuffixes.Deps), depsPath); File.Move(Path.Combine(context.ProjectDirectory, "bin" + FileNameSuffixes.Deps), depsPath);
} }
private static void RestoreToolToPath(LibraryRange tooldep, IEnumerable<string> args, string tempPath) private static void RestoreToolToPath(LibraryRange tooldep, IEnumerable<string> args, string tempPath, bool quiet)
{ {
Directory.CreateDirectory(tempPath); Directory.CreateDirectory(tempPath);
var projectPath = Path.Combine(tempPath, Project.FileName); var projectPath = Path.Combine(tempPath, Project.FileName);
Console.WriteLine($"Restoring Tool '{tooldep.Name}' for '{projectPath}' in '{tempPath}'"); Console.WriteLine($"Restoring Tool '{tooldep.Name}' for '{projectPath}' in '{tempPath}'");
File.WriteAllText(projectPath, GenerateProjectJsonContents(new[] {"dnxcore50"})); File.WriteAllText(projectPath, GenerateProjectJsonContents(new[] {"dnxcore50"}, tooldep));
Dnx.RunPackageInstall(tooldep, projectPath, args); NuGet3.Restore(new [] { $"\"{projectPath}\"", "--runtime", $"{DefaultRid}"}.Concat(args), quiet);
Dnx.RunRestore(new [] { $"\"{projectPath}\"", "--runtime", $"{DefaultRid}"}.Concat(args));
} }
private static string GenerateProjectJsonContents(IEnumerable<string> frameworks = null) private static string GenerateProjectJsonContents(IEnumerable<string> frameworks, LibraryRange tooldep)
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendLine("{"); 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\":{"); sb.AppendLine($" \"{framework}\": {{}}");
foreach (var framework in frameworks)
{
sb.AppendLine($" \"{framework}\":{{}}");
}
sb.AppendLine(" }");
} }
sb.AppendLine(" }");
sb.AppendLine("}"); sb.AppendLine("}");
var pjContents = sb.ToString(); var pjContents = sb.ToString();
return pjContents; return pjContents;

View file

@ -11,7 +11,8 @@
"emitEntryPoint": true "emitEntryPoint": true
}, },
"dependencies": { "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", "NETStandard.Library": "1.0.0-rc2-23608",
"System.Linq": "4.0.1-beta-23504", "System.Linq": "4.0.1-beta-23504",
"System.Collections": "4.0.11-beta-23504", "System.Collections": "4.0.11-beta-23504",

View file

@ -12,9 +12,9 @@
"xunit.netcore.extensions": "1.0.0-prerelease-*", "xunit.netcore.extensions": "1.0.0-prerelease-*",
"xunit.runner.utility": "2.1.0", "xunit.runner.utility": "2.1.0",
"Microsoft.DotNet.ProjectModel": { "target": "project" }, "Microsoft.DotNet.ProjectModel": "1.0.0-*",
"Microsoft.DotNet.Cli.Utils": { "target": "project" }, "Microsoft.DotNet.Cli.Utils": "1.0.0-*",
"Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" } "Microsoft.DotNet.Tools.Tests.Utilities": "1.0.0-*"
}, },
"frameworks": { "frameworks": {

View file

@ -15,7 +15,7 @@
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530",
"Microsoft.DotNet.ProjectModel.Loader": { "target": "project" } "Microsoft.DotNet.ProjectModel.Loader": "1.0.0-*"
}, },
"frameworks": { "frameworks": {

View file

@ -16,6 +16,8 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var root = Temp.CreateDirectory(); var root = Temp.CreateDirectory();
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testLibDir = root.CreateDirectory("TestLibrary"); var testLibDir = root.CreateDirectory("TestLibrary");
// copy projects to the temp dir and restore them // copy projects to the temp dir and restore them

View file

@ -37,6 +37,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var root = Temp.CreateDirectory(); var root = Temp.CreateDirectory();
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp"); var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary"); var testLibDir = root.CreateDirectory("TestLibrary");
@ -73,6 +74,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var testDir = Temp.CreateDirectory(); var testDir = Temp.CreateDirectory();
testDir.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = Path.Combine(_testProjectsRoot, "TestAppWithContents"); var testAppDir = Path.Combine(_testProjectsRoot, "TestAppWithContents");
// copy projects to the temp dir // copy projects to the temp dir
@ -94,6 +96,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var root = Temp.CreateDirectory(); var root = Temp.CreateDirectory();
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp"); var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary"); var testLibDir = root.CreateDirectory("TestLibrary");
@ -111,6 +114,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var root = Temp.CreateDirectory(); var root = Temp.CreateDirectory();
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testLibDir = root.CreateDirectory("TestLibrary"); var testLibDir = root.CreateDirectory("TestLibrary");
//copy projects to the temp dir //copy projects to the temp dir
@ -157,6 +161,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
public void CompilationFailedTest() public void CompilationFailedTest()
{ {
var testDir = Temp.CreateDirectory(); var testDir = Temp.CreateDirectory();
testDir.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var compileFailDir = Path.Combine(_testProjectsRoot, "CompileFail"); var compileFailDir = Path.Combine(_testProjectsRoot, "CompileFail");
CopyProjectToTempDir(compileFailDir, testDir); CopyProjectToTempDir(compileFailDir, testDir);
@ -174,6 +179,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
{ {
// create unique directories in the 'temp' folder // create unique directories in the 'temp' folder
var root = Temp.CreateDirectory(); var root = Temp.CreateDirectory();
root.CopyFile(Path.Combine(_testProjectsRoot, "global.json"));
var testAppDir = root.CreateDirectory("TestApp"); var testAppDir = root.CreateDirectory("TestApp");
var testLibDir = root.CreateDirectory("TestLibrary"); var testLibDir = root.CreateDirectory("TestLibrary");

View file

@ -14,9 +14,8 @@
"FluentAssertions": "4.0.0", "FluentAssertions": "4.0.0",
"xunit": "2.1.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" "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16530"
}, },

View file

@ -5,9 +5,8 @@
}, },
"dependencies": { "dependencies": {
"Microsoft.NETCore.ConsoleHost": "1.0.0-23428", "NETStandard.Library": "1.0.0-rc2-23704",
"Microsoft.NETCore.Runtime": "1.0.1-23428", "Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
"System.Console": "4.0.0-beta-23109"
}, },
"frameworks": { "frameworks": {

View file

@ -5,12 +5,10 @@
}, },
"dependencies": { "dependencies": {
"TestLibrary": { "target": "project" }, "TestLibrary": "1.0.0-*",
"System.IO": "4.0.11-beta-23428",
"System.Console": "4.0.0-beta-23428", "NETStandard.Library": "1.0.0-rc2-23704",
"System.Runtime": "4.0.21-beta-23428", "Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
"System.Diagnostics.Process": "4.1.0-beta-23428",
"Microsoft.NETCore.Runtime": "1.0.1-beta-23428"
}, },
"frameworks": { "frameworks": {

View file

@ -5,8 +5,9 @@
"xmlDoc": true "xmlDoc": true
}, },
"dependencies": { "dependencies": {
"System.Runtime": "4.0.21-beta-23428", "System.Runtime": "4.0.21-rc2-23704",
"System.Console": "4.0.0-beta-23428" "System.Console": "4.0.0-rc2-23704",
"Microsoft.NETCore.Platforms": "1.0.1-rc2-23704"
}, },
"frameworks": { "frameworks": {

View file

@ -3,7 +3,8 @@
"testRunner": "xunit", "testRunner": "xunit",
"dependencies": { "dependencies": {
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final", "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": { "frameworks": {

View file

@ -0,0 +1,3 @@
{
"projects": [ ".", "../../src" ]
}