Merge branch 'master' of https://github.com/dotnet/cli into version-25305-19

This commit is contained in:
Christopher Costa 2017-05-06 12:17:03 -07:00
commit 49636ea608
142 changed files with 2001 additions and 1074 deletions

1
.gitignore vendored
View file

@ -115,6 +115,7 @@ artifacts/
*.tmp
*.tmp_proj
*.log
*.binlog
*.vspscc
*.vssscc
.builds

View file

@ -5,13 +5,13 @@
<clear />
<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="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
<add key="aspnet-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" />
<add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
<add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
<add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="AspNetCurrent" value="https://dotnet.myget.org/F/aspnet-feb2017-patch/api/v3/index.json" />
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
</packageSources>
</configuration>

View file

@ -6,8 +6,6 @@
<OutputType>Exe</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<AssemblyName>AppWithRedirectsAndConfig</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<AssemblyName>AppWithRedirectsNoConfig</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -3,7 +3,6 @@
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
<OutputType>Library</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0</PackageTargetFallback>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -3,10 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-throwingtool</AssemblyName>
<PackageId>$(AssemblyName)</PackageId>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -5,8 +5,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<GeneratedPackageId>random-name</GeneratedPackageId>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -7,7 +7,6 @@
<GeneratedPackageId>random-name</GeneratedPackageId>
<PackageId>$(GeneratedPackageId)</PackageId>
<AssemblyName>dotnet-randompackage</AssemblyName>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -6,13 +6,6 @@
<AssemblyName>dotnet-tool-with-output-name</AssemblyName>
<PackageId>ToolWithOutputName</PackageId>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
</Project>

View file

@ -1,22 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-dependency-context-test</AssemblyName>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(DependencyModelVersion)" />
</ItemGroup>

View file

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This test asset needs to import the general dir.props in order to get the SdkNugetVersion property.
This is why it also needs to explicitly set DisableImplicitFrameworkReferences to false. -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-dependency-tool-invoker</AssemblyName>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
<VersionSuffix></VersionSuffix>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
<DisableImplicitFrameworkReferences>false</DisableImplicitFrameworkReferences>
</PropertyGroup>
@ -20,12 +20,6 @@
<Compile Include="..\..\..\src\dotnet\CommandLine\*.cs;..\..\..\src\dotnet\CommonLocalizableStrings.cs;" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGet.Frameworks" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="$(SdkNugetVersion)" />

View file

@ -9,12 +9,6 @@
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
</PropertyGroup>

View file

@ -6,12 +6,6 @@
<AssemblyName>dotnet-fallbackfoldertool</AssemblyName>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
</Project>

View file

@ -6,7 +6,6 @@
<!--Workaround for https://github.com/NuGet/Home/issues/4583-->
<VersionSuffix></VersionSuffix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<AssemblyName>dotnet-hello</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>

View file

@ -6,7 +6,6 @@
<!--Workaround for https://github.com/NuGet/Home/issues/4583-->
<VersionSuffix></VersionSuffix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<AssemblyName>dotnet-hello</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>

View file

@ -7,9 +7,4 @@
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
</Project>

View file

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
<ItemGroup>
<Compile Include="..\dotnet-portable\Program.cs" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\dotnet-portable\Program.cs" />
</ItemGroup>
</Project>

View file

@ -2,6 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Reflection;
namespace ConsoleApplication
{
@ -10,6 +12,20 @@ namespace ConsoleApplication
public static void Main(string[] args)
{
Console.WriteLine("Hello Portable World!");
var depsFile = new FileInfo(GetDataFromAppDomain("FX_DEPS_FILE"));
string frameworkVersion = depsFile.Directory.Name;
Console.WriteLine($"I'm running on shared framework version {frameworkVersion}!");
}
public static string GetDataFromAppDomain(string propertyName)
{
var appDomainType = typeof(object).GetTypeInfo().Assembly?.GetType("System.AppDomain");
var currentDomain = appDomainType?.GetProperty("CurrentDomain")?.GetValue(null);
var deps = appDomainType?.GetMethod("GetData")?.Invoke(currentDomain, new[] { propertyName });
return deps as string;
}
}
}

View file

@ -3,15 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-portable</AssemblyName>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
</ItemGroup>
</Project>

View file

@ -5,14 +5,9 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectRuntimeConfigFilePath)">
<FinalOutputPath>$(ProjectRuntimeConfigFilePath)</FinalOutputPath>
</BuiltProjectOutputGroupOutput>
<Content Include="prefercliruntime">
<Pack>true</Pack>
<PackagePath>\prefercliruntime</PackagePath>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -7,8 +7,6 @@
<AssemblyName>AppWithDirectDep</AssemblyName>
<OutputType>Exe</OutputType>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -8,8 +8,6 @@
<OutputType>Exe</OutputType>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
</Project>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net451;netcoreapp2.0</TargetFrameworks>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -5,8 +5,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGet.Configuration" Version="4.3.0-beta1-2418" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,16 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections;
using NuGet.Configuration;
class Program
{
public static void Main(string[] args)
{
var settingValue = new SettingValue("key", "value", false);
Console.WriteLine(settingValue.Key);
}
}

View file

@ -0,0 +1,3 @@
<StoreArtifacts>
<Package Id="NuGet.Configuration" Version ="4.3.0-beta1-2418"/>
</StoreArtifacts>

View file

@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="NuGet.Configuration" Version ="4.3.0-beta1-2418"/>
</ItemGroup>
</Project>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<!-- Issue: https://github.com/dotnet/sdk/issues/1150 -->
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
</PropertyGroup>

View file

@ -4,8 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<DotnetCliToolTargetFramework>netcoreapp1.1</DotnetCliToolTargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -2,7 +2,6 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
@ -10,10 +9,6 @@
<DefineConstants>DESKTOP;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestFramework" Version="1.0.6-preview" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.5-preview" />

View file

@ -4,7 +4,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -20,7 +20,7 @@
<BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl>$(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Binaries/$(BackwardsCompatibility110SharedFrameworkVersion)</BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl>
<BackwardsCompatibility110CoreSetupInstallerBlobRootUrl>$(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Installers</BackwardsCompatibility110CoreSetupInstallerBlobRootUrl>
<BackwardsCompatibility110CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(BackwardsCompatibility110SharedFrameworkVersion)</BackwardsCompatibility110CoreSetupDownloadDirectory>
<BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>$(BackwardsCompatibility110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive</BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>
<BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>$(BackwardsCompatibility110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>
</PropertyGroup>
<ItemGroup Condition=" '$(IncludeSharedFrameworksForBackwardsCompatibilityTests)' == 'true' ">

View file

@ -25,7 +25,22 @@
<SharedFrameworkArchiveBlobRootUrl>$(CoreSetupBlobRootUrlWithChannel)/Binaries/$(SharedFrameworkVersion)</SharedFrameworkArchiveBlobRootUrl>
<CoreSetupInstallerBlobRootUrl>$(CoreSetupBlobRootUrlWithChannel)/Installers</CoreSetupInstallerBlobRootUrl>
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(SharedFrameworkVersion)</CoreSetupDownloadDirectory>
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive</CombinedSharedHostAndFrameworkArchive>
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
</PropertyGroup>
<PropertyGroup>
<AspNetCoreRuntimeInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeVersion)</AspNetCoreRuntimeInstallerBlobRootUrl>
<!-- Examples: Build.RS.linux.zip Build.RS.winx86.zip AspNetCorePackageStoreLibx64.wixlib -->
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(OSName)' == 'win' ">$(OSName)$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(OSName)' == 'osx' ">$(OSName)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)' == '' ">linux</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
<AspNetCoreRuntimeInstallerArchiveFileName>Build.RS.$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(ArchiveExtension)</AspNetCoreRuntimeInstallerArchiveFileName>
<AspNetCoreRuntimeInstallerArchiveFile>$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerArchiveFileName)</AspNetCoreRuntimeInstallerArchiveFile>
<AspNetCoreRuntimeInstallerWixLibFileName Condition=" '$(OSName)' == 'win' ">AspNetCorePackageStoreLib$(Architecture).wixlib</AspNetCoreRuntimeInstallerWixLibFileName>
<AspNetCoreRuntimeInstallerWixLibFile Condition=" '$(AspNetCoreRuntimeInstallerWixLibFileName)' != '' ">$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerWixLibFileName)</AspNetCoreRuntimeInstallerWixLibFile>
</PropertyGroup>
<ItemGroup>
@ -47,14 +62,29 @@
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
<Url>$(CoreSetupInstallerBlobRootUrl)/$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)</Url>
<DownloadFileName>$(DownloadedSharedHostInstallerFile)</DownloadFileName>
<ExtractDestintation></ExtractDestintation>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
<Url>$(CoreSetupInstallerBlobRootUrl)/$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)</Url>
<DownloadFileName>$(DownloadedHostFxrInstallerFile)</DownloadFileName>
<ExtractDestintation></ExtractDestintation>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerWixLibFile"
Condition=" '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)</Url>
<DownloadFileName>$(AspNetCoreRuntimeInstallerWixLibFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerArchiveFile"
Condition="!Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')">
<Url>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)</Url>
<DownloadFileName>$(AspNetCoreRuntimeInstallerArchiveFile)</DownloadFileName>
<ExtractDestination>$(AspNetRuntimePackageStorePublishDirectory)</ExtractDestination>
</_DownloadAndExtractItem>
</ItemGroup>
</Project>

View file

@ -12,5 +12,14 @@
<!-- Publish DotNet -->
<MSBuild Projects="$(SrcDirectory)/redist/redist.csproj"
Targets="Publish" />
<!-- Build MSBuildSdkResolver for all target frameworks (so we can build and test it x-plat) -->
<MSBuild Projects="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj" />
<!-- Publish MSBuildSdkResolver for net46 (to prepare it for the VS insertion nupkg packaging) -->
<MSBuild Projects="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj"
Condition="'$(OS)' == 'Windows_NT'"
Properties="TargetFramework=net46"
Targets="Publish" />
</Target>
</Project>

View file

@ -2,22 +2,26 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.0.0-preview2-25305-19</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.2.0-preview-000093-02</CLI_MSBuild_Version>
<CLI_MSBuild_Version>15.3.0-preview-000117-01</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
<CLI_NETSDK_Version>2.0.0-preview2-20170425-7</CLI_NETSDK_Version>
<CLI_NETSDK_Version>2.0.0-preview2-20170506-1</CLI_NETSDK_Version>
<CLI_NuGet_Version>4.3.0-preview1-2500</CLI_NuGet_Version>
<CLI_WEBSDK_Version>1.0.0-rel-20170413-451</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.1.0-preview-20170414-04</CLI_TestPlatform_Version>
<CLI_WEBSDK_Version>1.0.0-rel-20170501-473</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.3.0-preview-20170502-03</CLI_TestPlatform_Version>
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
<TemplateEngineVersion>1.0.0-beta2-20170425-201</TemplateEngineVersion>
<TemplateEngineTemplateVersion>1.0.0-beta2-20170425-203</TemplateEngineTemplateVersion>
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170425-203</TemplateEngineTemplate2_0Version>
<TemplateEngineVersion>1.0.0-beta2-20170503-217</TemplateEngineVersion>
<TemplateEngineTemplateVersion>1.0.0-beta2-20170504-221</TemplateEngineTemplateVersion>
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170504-221</TemplateEngineTemplate2_0Version>
<PlatformAbstractionsVersion>2.0.0-preview2-002093</PlatformAbstractionsVersion>
<DependencyModelVersion>2.0.0-preview2-002093</DependencyModelVersion>
<CliCommandLineParserVersion>0.1.0-alpha-142</CliCommandLineParserVersion>
<CliMigrateVersion>1.2.1-alpha-002130</CliMigrateVersion>
<AspNetCoreRuntimeVersion>2.0.0-preview1-65</AspNetCoreRuntimeVersion>
<!-- This should either be timestamped or notimestamp as appropriate -->
<AspNetCoreRuntimePackageFlavor>notimestamp</AspNetCoreRuntimePackageFlavor>
</PropertyGroup>

View file

@ -9,7 +9,6 @@
<Target Name="GenerateBundledVersionsProps">
<PropertyGroup>
<BundledVersionsPropsFolder>15.0/Imports/Microsoft.Common.props/ImportBefore</BundledVersionsPropsFolder>
<BundledVersionsPropsFileName>Microsoft.NETCoreSdk.BundledVersions.props</BundledVersionsPropsFileName>
</PropertyGroup>
@ -59,12 +58,9 @@ Copyright (c) .NET Foundation. All rights reserved.
</BundledVersionsPropsContent>
</PropertyGroup>
<MakeDir Directories="$(GeneratedMSBuildExtensionsDirectory)/$(BundledVersionsPropsFolder)" />
<WriteLinesToFile File="$(GeneratedMSBuildExtensionsDirectory)/$(BundledVersionsPropsFolder)/$(BundledVersionsPropsFileName)"
<MakeDir Directories="$(GeneratedMSBuildExtensionsDirectory)" />
<WriteLinesToFile File="$(GeneratedMSBuildExtensionsDirectory)/$(BundledVersionsPropsFileName)"
Lines="$(BundledVersionsPropsContent)"
Overwrite="true" />
<Copy
SourceFiles="$(GeneratedMSBuildExtensionsDirectory)/$(BundledVersionsPropsFolder)/$(BundledVersionsPropsFileName)"
DestinationFiles="$(SdkOutputDirectory)/$(BundledVersionsPropsFileName)" />
</Target>
</Project>

View file

@ -10,9 +10,12 @@
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
<!-- The 'AspNetRuntimePackageStorePublishDirectory' needs to be very short due to path length constraints on Win8.1 -->
<AspNetRuntimePackageStorePublishDirectory>$(BaseOutputDirectory)/AspRT</AspNetRuntimePackageStorePublishDirectory>
<BackwardsCompatibleSharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish</BackwardsCompatibleSharedFrameworksPublishDirectory>
<TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir>
<DotnetInOutputDirectory>$(OutputDirectory)/dotnet$(ExeExtension)</DotnetInOutputDirectory>
<GeneratedMSBuildExtensionsDirectory>$(IntermediateDirectory)/GeneratedMSBuildExtensions</GeneratedMSBuildExtensionsDirectory>
<SdkResolverOutputDirectory>$(IntermediateDirectory)/MSBuildSdkResolver</SdkResolverOutputDirectory>
</PropertyGroup>
</Project>

View file

@ -36,12 +36,12 @@
Uri="%(_DownloadAndExtractItem.Url)"
DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' == 'win' "
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.zip')) "
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
OverwriteDestination="$(OverwriteExtractionDestination)" />
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' != 'win' "
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.tar.gz')) "
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
OverwriteDestination="$(OverwriteExtractionDestination)" />

View file

@ -18,6 +18,7 @@
<OutputDirectory Condition="'$(OutputDirectory)' == ''">$(BaseOutputDirectory)/stage2</OutputDirectory>
<CompilationDirectory Condition="'$(CompilationDirectory)' == ''">$(BaseOutputDirectory)/stage2compilation</CompilationDirectory>
<PackagesDirectory Condition="'$(PackagesDirectory)' == ''">$(BaseOutputDirectory)/packages</PackagesDirectory>
<SdkResolverOutputDirectory>$(BaseOutputDirectory)/intermediate/MSBuildSdkResolver</SdkResolverOutputDirectory>
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
signs files that are under these paths. -->
@ -71,6 +72,19 @@
</ItemGroup>
</Target>
<Target Name="SignSdkResolverContents" DependsOnTargets="GetSignSdkResolverContentsFiles;SignFiles" />
<Target Name="GetSignSdkResolverContentsFiles">
<PropertyGroup>
<OutDir>$(SdkResolverOutputDirectory)</OutDir>
</PropertyGroup>
<ItemGroup>
<FilesToSign Include="$(SdkResolverOutputDirectory)/Microsoft.DotNet.MSBuildSdkResolver.dll">
<Authenticode>$(InternalCertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Target Name="SignMsiAndCab" DependsOnTargets="GetSignMsiAndCabFiles;SignFiles" />
<Target Name="GetSignMsiAndCabFiles">

View file

@ -2,127 +2,20 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UploadNuGetPackagesArchiveToAzure>false</UploadNuGetPackagesArchiveToAzure>
<NuGetConfigContent>
&lt;configuration&gt;
&lt;packageSources&gt;
&lt;add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" /&gt;
&lt;/packageSources&gt;
&lt;/configuration&gt;
</NuGetConfigContent>
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
<LZMANuGetConfigFilePath Condition=" '$(CLI_LZMA_PACKAGE_SOURCE)' != '' ">$(NuGetPackagesArchiveProject)/Nuget.config</LZMANuGetConfigFilePath>
<LZMANuGetConfigFilePath Condition=" '$(LZMANuGetConfigFilePath)' == '' ">$(RepoRoot)/NuGet.Config</LZMANuGetConfigFilePath>
<ToolsOutputDirectory>$(BaseOutputDirectory)/tools</ToolsOutputDirectory>
<ArchiverDll>$(ToolsOutputDirectory)/Archiver.dll</ArchiverDll>
<FinalArchive>$(SdkOutputDirectory)/nuGetPackagesArchive.lzma</FinalArchive>
<NugetPackagesArchiveName>nuGetPackagesArchive.$(AspNetCoreRuntimePackageFlavor).lzma</NugetPackagesArchiveName>
<IntermediateArchive>$(IntermediateDirectory)/$(NugetPackagesArchiveName)</IntermediateArchive>
<NugetPackagesArchiveBlobUrl>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName)</NugetPackagesArchiveBlobUrl>
</PropertyGroup>
<Target Name="GetNuGetPackagesArchive"
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
DownloadNuGetPackagesArchive;
GenerateNuGetPackagesArchive;
UploadNuGetPackagesArchiveToAzure"
Inputs="$(IntermediateArchive)"
Outputs="$(FinalArchive)"
Condition=" '$(IncludeNuGetPackageArchive)' == 'true' ">
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
</Target>
<Target Name="UploadNuGetPackagesArchiveToAzure"
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
GenerateNuGetPackagesArchive"
Condition=" '$(UploadNuGetPackagesArchiveToAzure)' == 'true' And '$(PUBLISH_LZMA_TO_AZURE_BLOB)' != '' ">
<ItemGroup>
<NuGetPackagesArchiveToUpload Include="$(IntermediateArchive)" />
</ItemGroup>
<ItemGroup>
<NuGetPackagesArchiveToUpload>
<RelativeBlobPath>$(NugetPackagesArchiveRelativeBlobUrl)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
</NuGetPackagesArchiveToUpload>
</ItemGroup>
<UploadToAzure
AccountKey="$(ArtifactCloudDropAccessToken)"
AccountName="$(ArtifactCloudDropAccountName)"
ContainerName="$(ArtifactContainerName)"
Items="@(NuGetPackagesArchiveToUpload)"
Overwrite="false"
ContinueOnError="WarnAndContinue" />
</Target>
<Target Name="DownloadNuGetPackagesArchive"
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
Inputs="$(IntermediateArchive)"
Outputs="$(IntermediateArchive)">
<DownloadFile Uri="$(NugetPackagesArchiveBlobUrl)"
DestinationPath="$(IntermediateArchive)"
ContinueOnError="WarnAndContinue" />
</Target>
<Target Name="GenerateNuGetPackagesArchive"
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
Inputs="$(IntermediateArchive)"
Outputs="$(IntermediateArchive)">
<!-- I need to use the CreateProperty task in conjunction with the ValueSetByTask TaskParameter -->
<!-- to ensure that the property only gets set when the parent target is run. -->
<CreateProperty Value="true">
<Output TaskParameter="ValueSetByTask" PropertyName="UploadNuGetPackagesArchiveToAzure" />
</CreateProperty>
<ItemGroup>
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveProject)/MvcIndividual" />
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveFolder)" />
</ItemGroup>
<Delete Files="@(FilesToClean)" />
<RemoveDir Directories="@(NuGetPackagesArchiveDirectory)" />
<MakeDir Directories="@(NuGetPackagesArchiveDirectory)"/>
<WriteLinesToFile Condition=" '$(CLI_LZMA_PACKAGE_SOURCE)' != '' "
File="$(LZMANuGetConfigFilePath)"
Lines="$(NuGetConfigContent)" />
<DotNetNew ToolPath="$(OutputDirectory)"
TemplateType="mvc"
TemplateArgs="-au Individual --debug:ephemeral-hive --no-restore"
WorkingDirectory="$(NuGetPackagesArchiveProject)/MvcIndividual" />
<DotNetRestore ToolPath="$(OutputDirectory)"
Packages="$(NuGetPackagesArchiveFolder)"
ConfigFile="$(LZMANuGetConfigFilePath)"
SkipInvalidConfigurations="True"
WorkingDirectory="$(NuGetPackagesArchiveProject)/MvcIndividual" />
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip;$(NuGetPackagesArchiveFolder)/**/*.nupkg" />
<Message Text="Publishing Archiver" />
<DotNetPublish ToolPath="$(OutputDirectory)"
WorkingDirectory="$(RepoRoot)/tools/Archiver"
Output="$(ToolsOutputDirectory)"
Configuration="$(Configuration)" />
<Exec Command="$(DotnetInOutputDirectory) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
</Target>
<Target Name="SetupNuGetPackagesArchiveInputsOutputs">
<GenerateNuGetPackagesArchiveVersion ToolPath="$(OutputDirectory)" SDKVersion="$(CLI_NETSDK_Version)">
<Output TaskParameter="Version" PropertyName="NuGetPackagesArchiveVersion" />
</GenerateNuGetPackagesArchiveVersion>
<PropertyGroup>
<NugetPackagesArchiveName>nuGetPackagesArchive.$(NuGetPackagesArchiveVersion).lzma</NugetPackagesArchiveName>
<IntermediateArchive>$(IntermediateDirectory)/$(NugetPackagesArchiveName)</IntermediateArchive>
<NugetPackagesArchiveRelativeBlobUrl>$(Product)/NuGetPackagesArchives</NugetPackagesArchiveRelativeBlobUrl>
<NugetPackagesArchiveBlobUrl>$(DotnetBlobRootUrl)/$(NugetPackagesArchiveRelativeBlobUrl)/$(NugetPackagesArchiveName)</NugetPackagesArchiveBlobUrl>
</PropertyGroup>
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
</Target>
</Project>

View file

@ -10,7 +10,7 @@
TestDebuild;
BuildSdkDeb;
TestSdkDeb;"
Condition=" '$(OSName)' == 'ubuntu' "
Condition=" '$(OSName)' == 'ubuntu' "
Outputs="@(GeneratedInstallers)"/>
<Target Name="BuildSdkDeb"
@ -28,11 +28,19 @@
<!-- Create layout: Binaries -->
<Copy
DestinationFiles="@(CLISdkFiles->'$(LayoutPackageRootDir)/sdk/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(CLISdkFiles)"
SourceFiles="@(CLISdkFiles)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
<!-- Create layout: Aspnet runtime -->
<Copy
DestinationFiles="@(AspNetRuntimeFilesInput ->'$(LayoutPackageRootDir)/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(AspNetRuntimeFilesInput)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
<!-- Create layout: Man Pages -->
<Copy
DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(SdkVersion)%(Extension)')"
@ -41,13 +49,21 @@
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
<!-- Create layout: postinst -->
<Copy
DestinationFiles= "$(DebianPostinstFile)"
SourceFiles="$(DebianPostinstTemplateFile)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
<!-- Create layout: Generate and Place debian_config.json -->
<ReplaceFileContents
InputFile="$(DebianConfigTemplateFile)"
DestinationFile="$(DebianConfigJsonFile)"
ReplacementItems="@(DebianConfigTokenValues)" />
<Chmod
<Chmod
Glob="$(PackageTool)"
Mode="u+x" />
@ -58,12 +74,12 @@
PackageName="$(SdkDebianPackageName)"
PackageVersion="$(SdkVersion)"
WorkingDirectory="$(DotnetDebToolDir)" />
<!-- Copy SDK package to output -->
<ItemGroup>
<GeneratedDebFiles Include="$(DotNetDebToolOutputDirectory)/*.deb" />
</ItemGroup>
<Error Text="@(GeneratedDebFiles->Count()) .deb files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
<Copy
@ -97,9 +113,9 @@
<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />
<!-- Run E2E -->
<DotNetRestore ProjectPath="$(EndToEndTestProject)"
ToolPath="$(DebianInstalledDirectory)" />
<DotNetRestore ProjectPath="$(EndToEndTestProject)"
ToolPath="$(DebianInstalledDirectory)" />
<DotNetTest ProjectPath="$(EndToEndTestProject)"
EnvironmentVariables="@(TestSdkDebTaskEnvironmentVariables)"
ToolPath="$(DebianInstalledDirectory)" />
@ -158,11 +174,11 @@
<Target Name="TestDebuild">
<Message Text="Don't remove this" />
<!-- run Debuild -->
<Exec Command="/usr/bin/env debuild -h" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="DebuildExitCode" />
</Exec>
</Exec>
<!-- Check if it returned 0 -->
<PropertyGroup>

View file

@ -75,6 +75,11 @@
<DebianConfigJsonFile>$(LayoutDirectory)/debian_config.json</DebianConfigJsonFile>
</PropertyGroup>
<PropertyGroup>
<DebianPostinstTemplateFile>$(RepoRoot)/packaging/deb/postinst</DebianPostinstTemplateFile>
<DebianPostinstFile>$(LayoutDirectory)/debian/postinst</DebianPostinstFile>
</PropertyGroup>
<ItemGroup>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%">
<ReplacementString>$(SharedFxDebianPackageName)</ReplacementString>

View file

@ -115,6 +115,7 @@
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
'$(SdkInstallerFile)'
'$(AspNetCoreRuntimeInstallerWixLibFile)'
'$(DownloadedSharedFrameworkInstallerFile)'
'$(DownloadedHostFxrInstallerFile)'
'$(DownloadedSharedHostInstallerFile)'
@ -146,13 +147,13 @@
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="$(GeneratedMSBuildExtensionsDirectory)/**/*;
Inputs="$(SdkResolverOutputDirectory)/**/*;
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
Outputs="$(SdkInstallerNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
'$(GeneratedMSBuildExtensionsDirectory)'
'$(SdkResolverOutputDirectory)'
'$(FullNugetVersion)'
'$(SdkMSBuildExtensionsNuspecFile)'
'$(SdkMSBuildExtensionsNupkgFile)'" />

View file

@ -80,6 +80,9 @@
DependsOnTargets="Init;Layout;SetupPkgInputsOutputs"
Condition=" '$(OSName)' == 'osx' ">
<Copy SourceFiles="@(AspNetRuntimeFilesInput)"
DestinationFiles="@(AspNetRuntimeFilesInput->'$(SdkLayoutOutputDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
<Exec Command="pkgbuild
--root '$(SdkLayoutOutputDirectory)'
--identifier '$(SdkComponentId)'

View file

@ -14,6 +14,10 @@
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/shared/**/*" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/sdk/**/*" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/additionalDeps/**/*" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/store/**/*" />
<AspNetRuntimeFilesInput Include="$(AspNetRuntimePackageStorePublishDirectory)/**/*" />
</ItemGroup>
<MakeRelative

View file

@ -136,6 +136,24 @@
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable-v1">
<Name>dotnet-portable</Name>
<ProjectName>dotnet-portable-v1.csproj</ProjectName>
<IsTool>True</IsTool>
<IsApplicable>True</IsApplicable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable-v1-prefercli">
<Name>dotnet-portable</Name>
<ProjectName>dotnet-portable-v1-prefercli.csproj</ProjectName>
<IsTool>True</IsTool>
<IsApplicable>True</IsApplicable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-fallbackfoldertool">
<Name>dotnet-fallbackfoldertool</Name>
<ProjectName>dotnet-fallbackfoldertool.csproj</ProjectName>

View file

@ -2,6 +2,9 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace Microsoft.DotNet.Scripts
{
@ -35,11 +38,10 @@ namespace Microsoft.DotNet.Scripts
private Lazy<string> _password = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PASSWORD"));
private Lazy<string> _dotNetVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info"));
private Lazy<string> _roslynVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("ROSLYN_VERSION_FRAGMENT", "dotnet/roslyn/netcore1.0"));
private Lazy<string> _coreSetupVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", "dotnet/core-setup/master"));
private Lazy<string> _coreSetupVersionFragment = new Lazy<string>(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", GetDefaultCoreSetupVersionFragment()));
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli"));
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", "master"));
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch()));
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
@ -51,7 +53,6 @@ namespace Microsoft.DotNet.Scripts
public string Email => _email.Value;
public string Password => _password.Value;
public string DotNetVersionUrl => _dotNetVersionUrl.Value;
public string RoslynVersionFragment => _roslynVersionFragment.Value;
public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value;
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
public string GitHubProject => _gitHubProject.Value;
@ -73,5 +74,38 @@ namespace Microsoft.DotNet.Scripts
return value;
}
private static string GetDefaultUpstreamBranch()
{
return GetRepoMSBuildPropValue("BranchInfo.props", "BranchName") ?? "master";
}
private static string GetDefaultCoreSetupVersionFragment()
{
string coreSetupChannel = GetRepoMSBuildPropValue("BundledRuntimes.props", "CoreSetupChannel") ?? "master";
return $"dotnet/core-setup/{coreSetupChannel}";
}
private static string GetRepoMSBuildPropValue(string propsFileName, string propertyName)
{
var propsFilePath = Path.Combine(Dirs.RepoRoot, "build", propsFileName);
var root = XDocument.Load(propsFilePath).Root;
var ns = root.Name.Namespace;
var value = root
.Elements(ns + "PropertyGroup")
.Elements(ns + propertyName)
.FirstOrDefault()
?.Value;
if (string.IsNullOrEmpty(value))
{
Console.WriteLine($"Could not find a property named '{propertyName}' in {propsFilePath}");
return null;
}
return value;
}
}
}

View file

@ -25,7 +25,6 @@ namespace Microsoft.DotNet.Scripts
List<BuildInfo> buildInfos = new List<BuildInfo>();
buildInfos.Add(GetBuildInfo("Roslyn", s_config.RoslynVersionFragment, fetchLatestReleaseFile: false));
buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false));
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();

12
packaging/deb/postinst Normal file → Executable file
View file

@ -1,3 +1,15 @@
#!/usr/bin/env sh
echo "This software may collect information about you and your use of the software, and send that to Microsoft."
echo "Please visit http://aka.ms/dotnet-cli-eula for more information."
# Run 'dotnet new' as the user to trigger the first time experience to initialize the cache
echo "Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry."
su - $SUDO_USER -c "dotnet new > /dev/null 2>&1 || true"

View file

@ -5,13 +5,12 @@
<background file="dotnetbackground.png" mime-type="image/png"/>
<options customize="never" require-scripts="false" />
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="firstTimeWelcomeMessage.html" mime-type="text/html" />
<volume-check>
<allowed-os-version>
<os-version min="10.12" />
<os-version min="10.12" />
</allowed-os-version>
</volume-check>
<choices-outline>
<line choice="{SharedFxComponentId}.pkg" />
<line choice="{HostFxrComponentId}.pkg" />
@ -24,7 +23,7 @@
<choice id="{HostFxrComponentId}.pkg" visible="true" title="{HostFxrBrandName} (x64)" description="The .NET Core Host FX Resolver">
<pkg-ref id="{HostFxrComponentId}.pkg" />
</choice>
<choice id="{SharedHostComponentId}.pkg" visible="true" title="{SharedHostBrandName} (x64)" description="The .NET Core Shared Host." >
<choice id="{SharedHostComponentId}.pkg" visible="true" title="{SharedHostBrandName} (x64)" description="The .NET Core Shared Host.">
<pkg-ref id="{SharedHostComponentId}.pkg" />
</choice>
<choice id="{CLISdkComponentId}.pkg" visible="true" title="{CLISdkBrandName} (x64)" description="The .NET Core SDK">
@ -34,4 +33,4 @@
<pkg-ref id="{HostFxrComponentId}.pkg">{HostFxrComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>
<pkg-ref id="{CLISdkComponentId}.pkg">{CLISdkComponentId}.pkg</pkg-ref>
</installer-gui-script>
</installer-gui-script>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title styles="color:white">Welcome to .NET Core!</title>
</head>
<body>
<font face="Helvetica">
<h3>
Welcome to .NET Core!
</h3>
<p>
Learn more about .NET Core at <a href="https://aka.ms/dotnet-docs">https://aka.ms/dotnet-docs</a> . Use dotnet --help to see available commands or go to <a href="https://aka.ms/dotnet-cli-docs">https://aka.ms/dotnet-cli-docs</a>.
</p>
<h3>
Telemetry
</h3>
<p>
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at <a href="https://aka.ms/dotnet-cli-telemetry">https://aka.ms/dotnet-cli-telemetry</a>.
</p>
<h3>
Configuration
</h3>
<p>
A command is run in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</p>
</font>
</body></html>

View file

@ -11,4 +11,8 @@ INSTALL_DESTINATION=$2
# A temporary fix for the permissions issue(s)
chmod -R 755 $INSTALL_DESTINATION
# Run 'dotnet new' as user to trigger the first time experience to initialize the cache
INSTALLER_USER=$(stat -f '%Su' $HOME)
su - $INSTALLER_USER -c "$INSTALL_DESTINATION/dotnet new > /dev/null 2>&1 || true"
exit 0

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
<Window Width="620" Height="418" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Window Width="620" Height="468" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="1" Height="-24" Weight="900" Foreground="FFFFFF" Background="682079">Segoe UI</Font>
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
@ -52,6 +52,7 @@
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Text X="160" Y="180" Width="442" Height="300" FontId="3">#(loc.FirstTimeWelcomeMessage)</Text>
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>

View file

@ -51,4 +51,11 @@ Ready? Set? Let's go!</String>
<String Id="FilesInUseDontCloseRadioButton">&amp;Do not close applications. A reboot will be required.</String>
<String Id="FilesInUseOkButton">&amp;OK</String>
<String Id="FilesInUseCancelButton">&amp;Cancel</String>
<String Id="FirstTimeWelcomeMessage">Welcome to .NET Core!
Learn more about .NET Core at https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry:
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry.
Configuration:
A command is running in the end of install process to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
</String>
</WixLocalization>

View file

@ -38,6 +38,11 @@
<MsiPackage SourceFile="$(var.CLISDKMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
<?if $(var.Platform)=x86?>
<PackageGroupRef Id="PG_AspNetCorePackageStore_x86"/>
<?elseif $(var.Platform)=x64?>
<PackageGroupRef Id="PG_AspNetCorePackageStore_x64"/>
<?endif?>
</Chain>
</Bundle>

View file

@ -1,45 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include "Variables.wxi" ?>
<Product Id="*" Name="$(var.ProductName)" Language="$(var.ProductLanguage)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package Compressed="yes" InstallScope="perMachine" InstallerVersion="200" />
<?include "Variables.wxi" ?>
<Product Id="*" Name="$(var.ProductName)" Language="$(var.ProductLanguage)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package Compressed="yes" InstallScope="perMachine" InstallerVersion="200" />
<MajorUpgrade DowngradeErrorMessage="$(var.DowngradeErrorMessage)" Schedule="afterInstallInitialize"/>
<MajorUpgrade DowngradeErrorMessage="$(var.DowngradeErrorMessage)" Schedule="afterInstallInitialize"/>
<MediaTemplate CabinetTemplate="dnet-{0}.cab" CompressionLevel="high" />
<MediaTemplate CabinetTemplate="dnet-{0}.cab" CompressionLevel="high" />
<Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentGroupRef Id="InstallFiles" />
<ComponentGroupRef Id="AuthoredRegistryKeys"/>
</Feature>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="$(var.DependencyKeyId)" />
</Feature>
<Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" />
<Property Id="ProductCPU" Value="$(var.Platform)" />
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
<Property Id="MSIFASTINSTALL" Value="7" />
<Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentGroupRef Id="InstallFiles" />
<ComponentGroupRef Id="AuthoredRegistryKeys"/>
</Feature>
<Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
<ComponentRef Id="$(var.DependencyKeyId)" />
</Feature>
<Property Id="ProductFamily" Value="$(var.ProductFamily)" />
<Property Id="ProductEdition" Value="$(var.ProductEdition)" />
<Property Id="ProductCPU" Value="$(var.Platform)" />
<Property Id="RTM_ProductVersion" Value="$(var.Dotnet_ProductVersion)" />
<Property Id="MSIFASTINSTALL" Value="7" />
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
<WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
<Property Id="DOTNETEXE">
<DirectorySearch Id="DOTNETPATH" Path="[#DOTNETHOME]">
<FileSearch Id="DOTNETEXESEARCH" Name="dotnet.exe" />
</DirectorySearch>
</Property>
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
<CustomAction Id="RunDotnetNewToTriggerFirstTimeExperienceToPrimeCache"
ExeCommand="dotnet.exe new"
Directory="DOTNETHOME"
Execute="immediate"
Return="ignore"/>
<InstallExecuteSequence>
<Custom Action="RunDotnetNewToTriggerFirstTimeExperienceToPrimeCache"
After="InstallFinalize" />
</InstallExecuteSequence>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
<Directory Id="DOTNETHOME" Name="dotnet"/>
</Directory>
</Directory>
</Fragment>
</Wix>
<CustomAction Id="PropertyAssign" Property="QtExecDotnetnew" Value="&quot;[DOTNETHOME]\dotnet.exe&quot; new" Execute="immediate" />
<CustomAction Id="QtExecDotnetnew" BinaryKey="WixCA" DllEntry="$(var.WixQuietExec)" Execute="deferred" Return="ignore" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="PropertyAssign" Before="QtExecDotnetnew" />
<Custom Action="QtExecDotnetnew" Before="InstallFinalize" />
</InstallExecuteSequence>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
<Directory Id="DOTNETHOME" Name="dotnet"/>
</Directory>
</Directory>
</Fragment>
</Wix>

View file

@ -3,6 +3,7 @@
param(
[Parameter(Mandatory=$true)][string]$CLISDKMSIFile,
[Parameter(Mandatory=$true)][string]$ASPNETRuntimeWixLibFile,
[Parameter(Mandatory=$true)][string]$SharedFxMSIFile,
[Parameter(Mandatory=$true)][string]$HostFxrMSIFile,
[Parameter(Mandatory=$true)][string]$SharedHostMSIFile,
@ -69,6 +70,7 @@ function RunLightForBundle
.\light.exe -nologo `
-cultures:en-us `
bundle.wixobj `
$ASPNETRuntimeWixlibFile `
-ext WixBalExtension.dll `
-ext WixUtilExtension.dll `
-ext WixTagExtension.dll `
@ -91,6 +93,11 @@ if(!(Test-Path $CLISDKMSIFile))
throw "$CLISDKMSIFile not found"
}
if(!(Test-Path $ASPNETRuntimeWixLibFile))
{
throw "$ASPNETRuntimeWixLibFile not found"
}
Write-Host "Creating dotnet Bundle at $DotnetBundleOutput"
if([string]::IsNullOrEmpty($WixRoot))

View file

@ -17,9 +17,11 @@
<?define Platform = "$(sys.BUILDARCH)" ?>
<?if $(var.Platform)=x86?>
<?define WixQuietExec="WixQuietExec"?>
<?define Program_Files="ProgramFilesFolder"?>
<?define Win64AttributeValue=no?>
<?elseif $(var.Platform)=x64?>
<?define WixQuietExec="WixQuietExec64"?>
<?define Program_Files="ProgramFiles64Folder"?>
<?define Win64AttributeValue=yes?>
<?else?>

View file

@ -70,6 +70,9 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR_PJ))
# Disable first run since we want to control all package sources
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Don't resolve shared frameworks from user or global locations
$env:DOTNET_MULTILEVEL_LOOKUP=0
# Enable vs test console logging
$env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1
@ -77,8 +80,8 @@ $env:VSTEST_TRACE_BUILD=1
# install a stage0
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
Write-Host "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Write-Host "$dotnetInstallPath -Channel ""master"" -Version ""2.0.0-preview1-005867"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Invoke-Expression "$dotnetInstallPath -Channel ""master"" ""2.0.0-preview1-005867"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
if ($LastExitCode -ne 0)
{
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
@ -105,6 +108,6 @@ if ($NoBuild)
else
{
dotnet msbuild build.proj /p:Architecture=$Architecture /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
dotnet msbuild build.proj /m /v:diag /fl /flp:v=diag /p:Architecture=$Architecture $ExtraParameters
dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /p:Architecture=$Architecture $ExtraParameters
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
}

View file

@ -150,8 +150,12 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export VSTEST_BUILD_TRACE=1
export VSTEST_TRACE_BUILD=1
# Don't resolve shared frameworks from user or global locations
DOTNET_MULTILEVEL_LOOKUP=0
# Install a stage 0
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --version "2.0.0-preview1-005867" --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
@ -184,7 +188,7 @@ echo "${args[@]}"
if [ $BUILD -eq 1 ]; then
dotnet msbuild build.proj /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
dotnet msbuild build.proj /m /v:diag /fl /flp:v=diag /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS "${args[@]}"
dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS "${args[@]}"
else
echo "Not building due to --nobuild"
echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS ${args[@]}'"

View file

@ -1,315 +0,0 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Microsoft.Extensions.DependencyModel;
using NuGet.Frameworks;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.ProjectModel;
namespace Microsoft.DotNet.Cli.Utils
{
internal class DepsJsonBuilder
{
private readonly VersionFolderPathResolver _versionFolderPathResolver;
public DepsJsonBuilder()
{
// This resolver is only used for building file names, so that base path is not required.
_versionFolderPathResolver = new VersionFolderPathResolver(rootPath: null);
}
public DependencyContext Build(
SingleProjectInfo mainProjectInfo,
CompilationOptions compilationOptions,
LockFile lockFile,
NuGetFramework framework,
string runtime)
{
bool includeCompilationLibraries = compilationOptions != null;
LockFileTarget lockFileTarget = lockFile.GetTarget(framework, runtime);
IEnumerable<LockFileTargetLibrary> runtimeExports = lockFileTarget.GetRuntimeLibraries();
IEnumerable<LockFileTargetLibrary> compilationExports =
includeCompilationLibraries ?
lockFileTarget.GetCompileLibraries() :
Enumerable.Empty<LockFileTargetLibrary>();
var dependencyLookup = compilationExports
.Concat(runtimeExports)
.Distinct()
.Select(library => new Dependency(library.Name, library.Version.ToString()))
.ToDictionary(dependency => dependency.Name, StringComparer.OrdinalIgnoreCase);
var libraryLookup = lockFile.Libraries.ToDictionary(l => l.Name, StringComparer.OrdinalIgnoreCase);
var runtimeSignature = GenerateRuntimeSignature(runtimeExports);
IEnumerable<RuntimeLibrary> runtimeLibraries =
GetLibraries(runtimeExports, libraryLookup, dependencyLookup, runtime: true).Cast<RuntimeLibrary>();
IEnumerable<CompilationLibrary> compilationLibraries;
if (includeCompilationLibraries)
{
CompilationLibrary projectCompilationLibrary = GetProjectCompilationLibrary(
mainProjectInfo,
lockFile,
lockFileTarget,
dependencyLookup);
compilationLibraries = new[] { projectCompilationLibrary }
.Concat(
GetLibraries(compilationExports, libraryLookup, dependencyLookup, runtime: false)
.Cast<CompilationLibrary>());
}
else
{
compilationLibraries = Enumerable.Empty<CompilationLibrary>();
}
return new DependencyContext(
new TargetInfo(framework.DotNetFrameworkName, runtime, runtimeSignature, lockFileTarget.IsPortable()),
compilationOptions ?? CompilationOptions.Default,
compilationLibraries,
runtimeLibraries,
new RuntimeFallbacks[] { });
}
private static string GenerateRuntimeSignature(IEnumerable<LockFileTargetLibrary> runtimeExports)
{
var sha1 = SHA1.Create();
var builder = new StringBuilder();
var packages = runtimeExports
.Where(libraryExport => libraryExport.Type == "package");
var separator = "|";
foreach (var libraryExport in packages)
{
builder.Append(libraryExport.Name);
builder.Append(separator);
builder.Append(libraryExport.Version.ToString());
builder.Append(separator);
}
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(builder.ToString()));
builder.Clear();
foreach (var hashByte in hash)
{
builder.AppendFormat("{0:x2}", hashByte);
}
return builder.ToString();
}
private List<Dependency> GetProjectDependencies(
LockFile lockFile,
LockFileTarget lockFileTarget,
Dictionary<string, Dependency> dependencyLookup)
{
List<Dependency> dependencies = new List<Dependency>();
IEnumerable<ProjectFileDependencyGroup> projectFileDependencies = lockFile
.ProjectFileDependencyGroups
.Where(dg => dg.FrameworkName == string.Empty ||
dg.FrameworkName == lockFileTarget.TargetFramework.DotNetFrameworkName);
foreach (string projectFileDependency in projectFileDependencies.SelectMany(dg => dg.Dependencies))
{
int separatorIndex = projectFileDependency.IndexOf(' ');
string dependencyName = separatorIndex > 0 ?
projectFileDependency.Substring(0, separatorIndex) :
projectFileDependency;
Dependency dependency;
if (dependencyLookup.TryGetValue(dependencyName, out dependency))
{
dependencies.Add(dependency);
}
}
return dependencies;
}
private RuntimeLibrary GetProjectRuntimeLibrary(
SingleProjectInfo projectInfo,
LockFile lockFile,
LockFileTarget lockFileTarget,
Dictionary<string, Dependency> dependencyLookup)
{
RuntimeAssetGroup[] runtimeAssemblyGroups = new[] { new RuntimeAssetGroup(string.Empty, projectInfo.GetOutputName()) };
List<Dependency> dependencies = GetProjectDependencies(lockFile, lockFileTarget, dependencyLookup);
ResourceAssembly[] resourceAssemblies = projectInfo
.ResourceAssemblies
.Select(r => new ResourceAssembly(r.RelativePath, r.Culture))
.ToArray();
return new RuntimeLibrary(
type: "project",
name: projectInfo.Name,
version: projectInfo.Version,
hash: string.Empty,
runtimeAssemblyGroups: runtimeAssemblyGroups,
nativeLibraryGroups: new RuntimeAssetGroup[] { },
resourceAssemblies: resourceAssemblies,
dependencies: dependencies.ToArray(),
serviceable: false);
}
private CompilationLibrary GetProjectCompilationLibrary(
SingleProjectInfo projectInfo,
LockFile lockFile,
LockFileTarget lockFileTarget,
Dictionary<string, Dependency> dependencyLookup)
{
List<Dependency> dependencies = GetProjectDependencies(lockFile, lockFileTarget, dependencyLookup);
return new CompilationLibrary(
type: "project",
name: projectInfo.Name,
version: projectInfo.Version,
hash: string.Empty,
assemblies: new[] { projectInfo.GetOutputName() },
dependencies: dependencies.ToArray(),
serviceable: false);
}
private IEnumerable<Library> GetLibraries(
IEnumerable<LockFileTargetLibrary> exports,
IDictionary<string, LockFileLibrary> libraryLookup,
IDictionary<string, Dependency> dependencyLookup,
bool runtime)
{
return exports.Select(export => GetLibrary(export, libraryLookup, dependencyLookup, runtime));
}
private Library GetLibrary(
LockFileTargetLibrary export,
IDictionary<string, LockFileLibrary> libraryLookup,
IDictionary<string, Dependency> dependencyLookup,
bool runtime)
{
var type = export.Type;
// TEMPORARY: All packages are serviceable in RC2
// See https://github.com/dotnet/cli/issues/2569
var serviceable = export.Type == "package";
var libraryDependencies = new HashSet<Dependency>();
foreach (PackageDependency libraryDependency in export.Dependencies)
{
Dependency dependency;
if (dependencyLookup.TryGetValue(libraryDependency.Id, out dependency))
{
libraryDependencies.Add(dependency);
}
}
string hash = string.Empty;
string path = null;
string hashPath = null;
LockFileLibrary library;
if (libraryLookup.TryGetValue(export.Name, out library))
{
if (!string.IsNullOrEmpty(library.Sha512))
{
hash = "sha512-" + library.Sha512;
hashPath = _versionFolderPathResolver.GetHashFileName(export.Name, export.Version);
}
path = library.Path;
}
if (runtime)
{
return new RuntimeLibrary(
type.ToLowerInvariant(),
export.Name,
export.Version.ToString(),
hash,
CreateRuntimeAssemblyGroups(export),
CreateNativeLibraryGroups(export),
export.ResourceAssemblies.FilterPlaceHolderFiles().Select(CreateResourceAssembly),
libraryDependencies,
serviceable,
path,
hashPath);
}
else
{
IEnumerable<string> assemblies = export
.CompileTimeAssemblies
.FilterPlaceHolderFiles()
.Select(libraryAsset => libraryAsset.Path);
return new CompilationLibrary(
type.ToString().ToLowerInvariant(),
export.Name,
export.Version.ToString(),
hash,
assemblies,
libraryDependencies,
serviceable,
path,
hashPath);
}
}
private IReadOnlyList<RuntimeAssetGroup> CreateRuntimeAssemblyGroups(LockFileTargetLibrary export)
{
List<RuntimeAssetGroup> assemblyGroups = new List<RuntimeAssetGroup>();
assemblyGroups.Add(
new RuntimeAssetGroup(
string.Empty,
export.RuntimeAssemblies.FilterPlaceHolderFiles().Select(a => a.Path)));
foreach (var runtimeTargetsGroup in export.GetRuntimeTargetsGroups("runtime"))
{
assemblyGroups.Add(
new RuntimeAssetGroup(
runtimeTargetsGroup.Key,
runtimeTargetsGroup.Select(t => t.Path)));
}
return assemblyGroups;
}
private IReadOnlyList<RuntimeAssetGroup> CreateNativeLibraryGroups(LockFileTargetLibrary export)
{
List<RuntimeAssetGroup> nativeGroups = new List<RuntimeAssetGroup>();
nativeGroups.Add(
new RuntimeAssetGroup(
string.Empty,
export.NativeLibraries.FilterPlaceHolderFiles().Select(a => a.Path)));
foreach (var runtimeTargetsGroup in export.GetRuntimeTargetsGroups("native"))
{
nativeGroups.Add(
new RuntimeAssetGroup(
runtimeTargetsGroup.Key,
runtimeTargetsGroup.Select(t => t.Path)));
}
return nativeGroups;
}
private ResourceAssembly CreateResourceAssembly(LockFileItem resourceAssembly)
{
string locale;
if (!resourceAssembly.Properties.TryGetValue("locale", out locale))
{
locale = null;
}
return new ResourceAssembly(resourceAssembly.Path, locale);
}
}
}

View file

@ -13,17 +13,7 @@ namespace Microsoft.DotNet.Cli.Utils
string commandName,
IEnumerable<string> commandArguments,
IEnumerable<string> allowedExtensions,
string nugetPackagesRoot,
CommandResolutionStrategy commandResolutionStrategy,
string depsFilePath,
string runtimeConfigPath);
CommandSpec CreateCommandSpecFromLibrary(
LockFileTargetLibrary toolLibrary,
string commandName,
IEnumerable<string> commandArguments,
IEnumerable<string> allowedExtensions,
IEnumerable<string> packageFolders,
LockFile lockFile,
CommandResolutionStrategy commandResolutionStrategy,
string depsFilePath,
string runtimeConfigPath);

View file

@ -26,5 +26,7 @@ namespace Microsoft.DotNet.Cli.Utils
NuGetFramework DotnetCliToolTargetFramework { get; }
Dictionary<string, string> EnvironmentVariables { get; }
string ToolDepsJsonGeneratorProject { get; }
}
}

View file

@ -92,6 +92,19 @@ namespace Microsoft.DotNet.Cli.Utils
}
}
public string ToolDepsJsonGeneratorProject
{
get
{
var generatorProject = _project
.AllEvaluatedProperties
.FirstOrDefault(p => p.Name.Equals("ToolDepsJsonGeneratorProject"))
?.EvaluatedValue;
return generatorProject;
}
}
public MSBuildProject(
string msBuildProjectPath,
NuGetFramework framework,

View file

@ -27,28 +27,7 @@ namespace Microsoft.DotNet.Cli.Utils
string commandName,
IEnumerable<string> commandArguments,
IEnumerable<string> allowedExtensions,
string nugetPackagesRoot,
CommandResolutionStrategy commandResolutionStrategy,
string depsFilePath,
string runtimeConfigPath)
{
return CreateCommandSpecFromLibrary(
toolLibrary,
commandName,
commandArguments,
allowedExtensions,
new List<string> { nugetPackagesRoot },
commandResolutionStrategy,
depsFilePath,
runtimeConfigPath);
}
public CommandSpec CreateCommandSpecFromLibrary(
LockFileTargetLibrary toolLibrary,
string commandName,
IEnumerable<string> commandArguments,
IEnumerable<string> allowedExtensions,
IEnumerable<string> packageFolders,
LockFile lockFile,
CommandResolutionStrategy commandResolutionStrategy,
string depsFilePath,
string runtimeConfigPath)
@ -72,7 +51,7 @@ namespace Microsoft.DotNet.Cli.Utils
return null;
}
var commandPath = GetCommandFilePath(packageFolders, toolLibrary, toolAssembly);
var commandPath = GetCommandFilePath(lockFile, toolLibrary, toolAssembly);
if (!File.Exists(commandPath))
{
@ -89,21 +68,16 @@ namespace Microsoft.DotNet.Cli.Utils
commandArguments,
depsFilePath,
commandResolutionStrategy,
packageFolders,
lockFile.GetNormalizedPackageFolders(),
runtimeConfigPath);
}
private string GetCommandFilePath(
IEnumerable<string> packageFolders,
LockFile lockFile,
LockFileTargetLibrary toolLibrary,
LockFileItem runtimeAssembly)
{
var packageFoldersCount = packageFolders.Count();
var userPackageFolder = packageFoldersCount == 1 ? string.Empty : packageFolders.First();
var fallbackPackageFolders = packageFoldersCount > 1 ? packageFolders.Skip(1) : packageFolders;
var packageDirectory = new FallbackPackagePathResolver(userPackageFolder, fallbackPackageFolders)
.GetPackageDirectory(toolLibrary.Name, toolLibrary.Version);
var packageDirectory = lockFile.GetPackageDirectory(toolLibrary);
if (packageDirectory == null)
{

View file

@ -21,11 +21,51 @@ namespace Microsoft.DotNet.Cli.Utils
{
if(PrefersCliRuntime(commandPath))
{
arguments.Add("--fx-version");
arguments.Add(new Muxer().SharedFxVersion);
var runtimeConfigFile = Path.ChangeExtension(commandPath, FileNameSuffixes.RuntimeConfigJson);
if (!File.Exists(runtimeConfigFile))
{
throw new GracefulException(string.Format(LocalizableStrings.CouldNotFindToolRuntimeConfigFile,
nameof(PackagedCommandSpecFactory),
Path.GetFileName(commandPath)));
}
var runtimeConfig = new RuntimeConfig(runtimeConfigFile);
var muxer = new Muxer();
Version currentFrameworkSimpleVersion = GetVersionWithoutPrerelease(muxer.SharedFxVersion);
Version toolFrameworkSimpleVersion = GetVersionWithoutPrerelease(runtimeConfig.Framework.Version);
if (currentFrameworkSimpleVersion.Major != toolFrameworkSimpleVersion.Major)
{
Reporter.Verbose.WriteLine(
string.Format(
LocalizableStrings.IgnoringPreferCLIRuntimeFile,
nameof(PackagedCommandSpecFactory),
runtimeConfig.Framework.Version,
muxer.SharedFxVersion));
}
else
{
arguments.Add("--fx-version");
arguments.Add(muxer.SharedFxVersion);
}
}
}
private static Version GetVersionWithoutPrerelease(string version)
{
int dashOrPlusIndex = version.IndexOfAny(new char[] { '-', '+' });
if (dashOrPlusIndex >= 0)
{
version = version.Substring(0, dashOrPlusIndex);
}
return new Version(version);
}
private static bool PrefersCliRuntime(string commandPath)
{
var libTFMPackageDirectory = Path.GetDirectoryName(commandPath);
@ -35,7 +75,7 @@ namespace Microsoft.DotNet.Cli.Utils
Reporter.Verbose.WriteLine(
string.Format(
LocalizableStrings.LookingForPreferCliRuntimeFile,
"packagedcommandspecfactory",
nameof(PackagedCommandSpecFactory),
preferCliRuntimePath));
return File.Exists(preferCliRuntimePath);

View file

@ -120,15 +120,13 @@ namespace Microsoft.DotNet.Cli.Utils
var lockFile = project.GetLockFile();
var toolLibrary = GetToolLibraryForContext(lockFile, commandName, framework);
var normalizedNugetPackagesRoot =
PathUtility.EnsureNoTrailingDirectorySeparator(lockFile.PackageFolders.First().Path);
var commandSpec = _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
toolLibrary,
commandName,
commandArguments,
allowedExtensions,
normalizedNugetPackagesRoot,
lockFile,
s_commandResolutionStrategy,
depsFilePath,
runtimeConfigPath);

View file

@ -134,12 +134,35 @@ namespace Microsoft.DotNet.Cli.Utils
ProjectToolsCommandResolverName,
string.Join(Environment.NewLine, possiblePackageRoots.Select((p) => $"- {p}"))));
var toolPackageFramework = project.DotnetCliToolTargetFramework;
List<NuGetFramework> toolFrameworksToCheck = new List<NuGetFramework>();
toolFrameworksToCheck.Add(project.DotnetCliToolTargetFramework);
var toolLockFile = GetToolLockFile(
toolLibraryRange,
toolPackageFramework,
possiblePackageRoots);
// NuGet restore in Visual Studio may restore for netcoreapp1.0. So if that happens, fall back to
// looking for a netcoreapp1.0 or netcoreapp1.1 tool restore.
if (project.DotnetCliToolTargetFramework.Framework == FrameworkConstants.FrameworkIdentifiers.NetCoreApp &&
project.DotnetCliToolTargetFramework.Version >= new Version(2, 0, 0))
{
toolFrameworksToCheck.Add(NuGetFramework.Parse("netcoreapp1.1"));
toolFrameworksToCheck.Add(NuGetFramework.Parse("netcoreapp1.0"));
}
LockFile toolLockFile = null;
NuGetFramework toolTargetFramework = null; ;
foreach (var toolFramework in toolFrameworksToCheck)
{
toolLockFile = GetToolLockFile(
toolLibraryRange,
toolFramework,
possiblePackageRoots);
if (toolLockFile != null)
{
toolTargetFramework = toolFramework;
break;
}
}
if (toolLockFile == null)
{
@ -152,7 +175,7 @@ namespace Microsoft.DotNet.Cli.Utils
toolLockFile.Path));
var toolLibrary = toolLockFile.Targets
.FirstOrDefault(t => toolPackageFramework == t.TargetFramework)
.FirstOrDefault(t => toolTargetFramework == t.TargetFramework)
?.Libraries.FirstOrDefault(
l => StringComparer.OrdinalIgnoreCase.Equals(l.Name, toolLibraryRange.Name));
if (toolLibrary == null)
@ -168,12 +191,10 @@ namespace Microsoft.DotNet.Cli.Utils
var depsFilePath = GetToolDepsFilePath(
toolLibraryRange,
toolPackageFramework,
toolTargetFramework,
toolLockFile,
depsFileRoot);
var packageFolders = toolLockFile.PackageFolders.Select(p =>
PathUtility.EnsureNoTrailingDirectorySeparator(p.Path));
depsFileRoot,
project.ToolDepsJsonGeneratorProject);
Reporter.Verbose.WriteLine(string.Format(
LocalizableStrings.AttemptingToCreateCommandSpec,
@ -184,7 +205,7 @@ namespace Microsoft.DotNet.Cli.Utils
commandName,
args,
_allowedCommandExtensions,
packageFolders,
toolLockFile,
s_commandResolutionStrategy,
depsFilePath,
null);
@ -281,7 +302,8 @@ namespace Microsoft.DotNet.Cli.Utils
SingleProjectInfo toolLibrary,
NuGetFramework framework,
LockFile toolLockFile,
string depsPathRoot)
string depsPathRoot,
string toolDepsJsonGeneratorProject)
{
var depsJsonPath = Path.Combine(
depsPathRoot,
@ -292,7 +314,7 @@ namespace Microsoft.DotNet.Cli.Utils
ProjectToolsCommandResolverName,
depsJsonPath));
EnsureToolJsonDepsFileExists(toolLockFile, framework, depsJsonPath, toolLibrary);
EnsureToolJsonDepsFileExists(toolLockFile, framework, depsJsonPath, toolLibrary, toolDepsJsonGeneratorProject);
return depsJsonPath;
}
@ -301,11 +323,12 @@ namespace Microsoft.DotNet.Cli.Utils
LockFile toolLockFile,
NuGetFramework framework,
string depsPath,
SingleProjectInfo toolLibrary)
SingleProjectInfo toolLibrary,
string toolDepsJsonGeneratorProject)
{
if (!File.Exists(depsPath))
{
GenerateDepsJsonFile(toolLockFile, framework, depsPath, toolLibrary);
GenerateDepsJsonFile(toolLockFile, framework, depsPath, toolLibrary, toolDepsJsonGeneratorProject);
}
}
@ -313,21 +336,80 @@ namespace Microsoft.DotNet.Cli.Utils
LockFile toolLockFile,
NuGetFramework framework,
string depsPath,
SingleProjectInfo toolLibrary)
SingleProjectInfo toolLibrary,
string toolDepsJsonGeneratorProject)
{
if (string.IsNullOrEmpty(toolDepsJsonGeneratorProject) ||
!File.Exists(toolDepsJsonGeneratorProject))
{
throw new GracefulException(LocalizableStrings.DepsJsonGeneratorProjectNotSet);
}
Reporter.Verbose.WriteLine(string.Format(
LocalizableStrings.GeneratingDepsJson,
depsPath));
var dependencyContext = new DepsJsonBuilder()
.Build(toolLibrary, null, toolLockFile, framework, null);
var tempDepsFile = Path.GetTempFileName();
using (var fileStream = File.Open(tempDepsFile, FileMode.Open, FileAccess.Write))
{
var dependencyContextWriter = new DependencyContextWriter();
dependencyContextWriter.Write(dependencyContext, fileStream);
var args = new List<string>();
args.Add(toolDepsJsonGeneratorProject);
args.Add($"/p:ProjectAssetsFile=\"{toolLockFile.Path}\"");
args.Add($"/p:ToolName={toolLibrary.Name}");
args.Add($"/p:ProjectDepsFilePath={tempDepsFile}");
var toolTargetFramework = toolLockFile.Targets.First().TargetFramework.GetShortFolderName();
args.Add($"/p:TargetFramework={toolTargetFramework}");
// Look for the .props file in the Microsoft.NETCore.App package, until NuGet
// generates .props and .targets files for tool restores (https://github.com/NuGet/Home/issues/5037)
var platformLibrary = toolLockFile.Targets
.FirstOrDefault(t => framework == t.TargetFramework)
?.GetPlatformLibrary();
if (platformLibrary != null)
{
string buildRelativePath = platformLibrary.Build.FirstOrDefault()?.Path;
var platformLibraryPath = toolLockFile.GetPackageDirectory(platformLibrary);
if (platformLibraryPath != null && buildRelativePath != null)
{
// Get rid of "_._" filename
buildRelativePath = Path.GetDirectoryName(buildRelativePath);
string platformLibraryBuildFolderPath = Path.Combine(platformLibraryPath, buildRelativePath);
var platformLibraryPropsFile = Directory.GetFiles(platformLibraryBuildFolderPath, "*.props").FirstOrDefault();
if (platformLibraryPropsFile != null)
{
args.Add($"/p:AdditionalImport={platformLibraryPropsFile}");
}
}
}
// Delete temporary file created by Path.GetTempFileName(), otherwise the GenerateBuildDependencyFile target
// will think the deps file is up-to-date and skip executing
File.Delete(tempDepsFile);
var msBuildExePath = _environment.GetEnvironmentVariable(Constants.MSBUILD_EXE_PATH);
msBuildExePath = string.IsNullOrEmpty(msBuildExePath) ?
Path.Combine(AppContext.BaseDirectory, "MSBuild.dll") :
msBuildExePath;
var result = new MSBuildForwardingAppWithoutLogging(args, msBuildExePath)
.GetProcessStartInfo()
.ExecuteAndCaptureOutput(out string stdOut, out string stdErr);
if (result != 0)
{
Reporter.Verbose.WriteLine(string.Format(
LocalizableStrings.UnableToGenerateDepsJson,
stdOut + Environment.NewLine + stdErr));
throw new GracefulException(string.Format(LocalizableStrings.UnableToGenerateDepsJson, toolDepsJsonGeneratorProject));
}
try

View file

@ -0,0 +1,36 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.Tools.Common;
using NuGet.Packaging;
using NuGet.ProjectModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Microsoft.DotNet.Cli.Utils
{
static class LockFileExtensions
{
public static string GetPackageDirectory(this LockFile lockFile, LockFileTargetLibrary library)
{
var packageFolders = lockFile.GetNormalizedPackageFolders();
var packageFoldersCount = packageFolders.Count();
var userPackageFolder = packageFoldersCount == 1 ? string.Empty : packageFolders.First();
var fallbackPackageFolders = packageFoldersCount > 1 ? packageFolders.Skip(1) : packageFolders;
var packageDirectory = new FallbackPackagePathResolver(userPackageFolder, fallbackPackageFolders)
.GetPackageDirectory(library.Name, library.Version);
return packageDirectory;
}
public static IEnumerable<string> GetNormalizedPackageFolders(this LockFile lockFile)
{
return lockFile.PackageFolders.Select(p =>
PathUtility.EnsureNoTrailingDirectorySeparator(p.Path));
}
}
}

Some files were not shown because too many files have changed in this diff Show more