Merge dotnet/cli:dev/release/2.0 into dev/repo-refactoring

This commit is contained in:
Nick Guerrera 2017-10-19 16:44:10 -07:00
commit 69a3c9d248
19 changed files with 99 additions and 58 deletions

View file

@ -3,6 +3,7 @@
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="TransportFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/packages/index.json" />
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="aspnet" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />

View file

@ -4,6 +4,8 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
<IncludeAspNetCoreRuntime Condition="'$(IncludeAspNetCoreRuntime)' == ''">true</IncludeAspNetCoreRuntime>
<IncludeMSBuildSdkResolver Condition="'$(IncludeMSBuildSdkResolver)' == ''">true</IncludeMSBuildSdkResolver>
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' ">true</UsePortableLinuxSharedFramework>
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
<HighEntropyVA>true</HighEntropyVA>
@ -16,5 +18,7 @@
<NoWarn>NU1701</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DefineConstants Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefineConstants);SOURCE_BUILD</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CoreSetupRid>$(HostRid)</CoreSetupRid>
<CoreSetupRid Condition=" '$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx' ">$(HostMonikerRid)</CoreSetupRid>
<CoreSetupRid Condition=" ('$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx') and '$(DotNetBuildFromSource)' != 'true' ">$(HostMonikerRid)</CoreSetupRid>
<!-- only the runtime OSX .pkgs have a `-internal` suffix -->
<InstallerStartSuffix Condition="'$(HostOSName)' == 'osx'">-internal</InstallerStartSuffix>
@ -80,21 +80,21 @@
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerWixLibFile"
Condition=" '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')">
Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And '$(SkipBuildingInstallers)' != 'true' And '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreRuntimeInstallerWixLibFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerArchiveFile"
Condition="!Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')">
Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And !Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreRuntimeInstallerArchiveFile)</DownloadFileName>
<ExtractDestination>$(AspNetRuntimePackageStorePublishDirectory)</ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreSharedRuntimeVersionFile"
Condition="!Exists('$(AspNetCoreSharedRuntimeVersionFile)')">
Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And !Exists('$(AspNetCoreSharedRuntimeVersionFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
<DownloadFileName>$(AspNetCoreSharedRuntimeVersionFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.0.1</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.4.7</CLI_MSBuild_Version>
<CLI_SharedFrameworkVersion>2.0.0</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.4.8</CLI_MSBuild_Version>
<CLI_NuGet_Version>4.4.0-preview3-4475</CLI_NuGet_Version>
<ToolsetVersion>2.0.3-servicing-007004</ToolsetVersion>

View file

@ -1,12 +1,14 @@
<Project ToolsVersion="15.0">
<Target Name="WriteGitCommitInfoProps">
<Exec Command="git rev-list --count HEAD"
ConsoleToMSBuild="true">
ConsoleToMSBuild="true"
Condition="'$(GitInfoCommitCount)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
</Exec>
<Exec Command="git rev-parse HEAD"
ConsoleToMSBuild="true">
ConsoleToMSBuild="true"
Condition="'$(GitInfoCommitHash)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
</Exec>

View file

@ -71,7 +71,8 @@
<Target Name="SetupRestoreSrcPackagesInputsOutputs">
<ItemGroup>
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" Exclude="$(RepoRoot)/src/**/%24projectName%24.csproj"/>
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" />
<RestoreSrcPackagesInput Remove="%(RestoreSrcPackagesInput.Identity)" Condition="'%(RestoreSrcPackagesInput.Filename)' == 'Microsoft.DotNet.MSBuildSdkResolver' and '$(IncludeMSBuildSdkResolver)' != 'true'" />
</ItemGroup>
</Target>

View file

@ -12,7 +12,7 @@
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.1.0" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="1.0.1-beta-000933" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
</ItemGroup>
</Project>

View file

@ -1,6 +1,8 @@
// 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.
#if !SOURCE_BUILD
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
@ -84,3 +86,5 @@ namespace Microsoft.DotNet.Cli.Build
}
}
}
#endif

View file

@ -1,6 +1,7 @@
// 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.
#if !SOURCE_BUILD
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System.IO;
@ -112,3 +113,4 @@ namespace Microsoft.DotNet.Cli.Build
}
}
}
#endif

View file

@ -1,6 +1,8 @@
// 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.
#if !SOURCE_BUILD
using System;
using System.Collections.Generic;
using System.IO;
@ -65,3 +67,5 @@ namespace Microsoft.DotNet.Cli.Build
}
}
}
#endif

View file

@ -1,11 +1,13 @@
// 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.
#if !SOURCE_BUILD
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.DotNet.VersionTools.Automation;
using System.IO;
namespace Microsoft.DotNet.Cli.Build
{
public class UpdateVersionsRepo : Task
@ -33,3 +35,4 @@ namespace Microsoft.DotNet.Cli.Build
}
}
}
#endif

View file

@ -15,20 +15,12 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1-beta-24410-02" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11" />
<PackageReference Include="WindowsAzure.Storage" Version="7.2.1" />
<PackageReference Include="NuGet.CommandLine.XPlat" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="NuGet.Protocol" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
<!-- This dependency was added due to an issue in restore where a lower version of this package coming from nuget.commandline.xplat
led to an error. This is tracked as NuGet issue : https://github.com/NuGet/Home/issues/4213 -->
<PackageReference Include="Microsoft.Build.Framework" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.DotNet.VersionTools" Version="$(VersionToolsVersion)" />
<PackageReference Include="Microsoft.DotNet.VersionTools" Version="$(VersionToolsVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" />
</ItemGroup>
</Project>

View file

@ -1,6 +1,7 @@
// 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.
#if !SOURCE_BUILD
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -230,3 +231,4 @@ namespace Microsoft.DotNet.Cli.Build
}
}
}
#endif

View file

@ -12,15 +12,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1-beta-24410-02" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.1.1" />
<PackageReference Include="System.Threading.Thread" Version="4.0.0" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11" />
<PackageReference Include="WindowsAzure.Storage" Version="7.2.1" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="1.0.1-beta-000933" />
<PackageReference Include="WindowsAzure.Storage" Version="7.2.1" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,8 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Empty Directory.Build.props so the repo's root Directory.Build.props isn't imported,
since it imports generated .props files that aren't necessary for update-dependencies.
-->
</Project>

View file

@ -34,19 +34,24 @@ if (!$env:DOTNET_INSTALL_DIR)
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture"
}
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Install a stage 0
Write-Output "Installing .NET Core CLI Stage 0"
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel "master" -Architecture $Architecture
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
Write-Output "Installing .NET Core CLI Stage 0"
if (!$env:DOTNET_TOOL_DIR)
{
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel "master" -Architecture $Architecture
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
}
else
{
Copy-Item -Force -Recurse $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR
}
# Put the stage0 on the path
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
# Restore the app
Write-Output "Restoring $ProjectPath..."
dotnet restore "$ProjectPath"
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
# Run the app
Write-Output "Invoking App $ProjectPath..."
dotnet run -p "$ProjectPath" "$ProjectArgs"

View file

@ -30,26 +30,28 @@ if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then
export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64
fi
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
if [ ! -d "$DOTNET_INSTALL_DIR" ]; then
mkdir -p $DOTNET_INSTALL_DIR
fi
# Install a stage 0
echo "Installing .NET Core CLI Stage 0"
$REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64
if [ $? -ne 0 ]; then
echo "Failed to install stage 0"
exit 1
if [ -z "$DOTNET_TOOL_DIR" ]; then
$REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64
if [ $? -ne 0 ]; then
echo "Failed to install stage 0"
exit 1
fi
else
cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/
fi
# Put the stage 0 on the path
export PATH=$DOTNET_INSTALL_DIR:$PATH
echo "Restoring $PROJECT_PATH..."
dotnet restore "$PROJECT_PATH"
if [ $? -ne 0 ]; then
echo "Failed to restore"
exit 1
fi
echo "Invoking App $PROJECT_PATH..."
dotnet run -p "$PROJECT_PATH" $@

View file

@ -66,15 +66,22 @@ $env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1
# install a stage0
$dotnetInstallPath = Join-Path $env:DOTNET_INSTALL_DIR "dotnet-install.ps1"
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$dotnetInstallPath"
Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
if ($LastExitCode -ne 0)
if (!$env:DOTNET_TOOL_DIR)
{
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
exit $LastExitCode
$dotnetInstallPath = Join-Path $env:DOTNET_INSTALL_DIR "dotnet-install.ps1"
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$dotnetInstallPath"
Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
if ($LastExitCode -ne 0)
{
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
exit $LastExitCode
}
}
else
{
Copy-Item -Recurse -Force $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR
}
# Put the stage0 on the path

View file

@ -150,14 +150,19 @@ export VSTEST_TRACE_BUILD=1
export DOTNET_MULTILEVEL_LOOKUP=0
# Install a stage 0
curl -sSL "https://dot.net/v1/dotnet-install.sh" | bash /dev/stdin --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS
if [ -z "$DOTNET_TOOL_DIR" ]; then
curl -sSL "https://dot.net/v1/dotnet-install.sh" | bash /dev/stdin --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS
EXIT_CODE=$?
if [ $EXIT_CODE != 0 ]; then
echo "run-build: Error: installing stage0 with exit code $EXIT_CODE." >&2
exit $EXIT_CODE
EXIT_CODE=$?
if [ $EXIT_CODE != 0 ]; then
echo "run-build: Error: installing stage0 with exit code $EXIT_CODE." >&2
exit $EXIT_CODE
fi
else
cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/
fi
# Put stage 0 on the PATH (for this shell only)
PATH="$DOTNET_INSTALL_DIR:$PATH"