From e0d138e0df207f77fcd4c71467ff795201bc52d1 Mon Sep 17 00:00:00 2001 From: Andy Gerlicher Date: Wed, 7 Feb 2018 19:24:28 -0800 Subject: [PATCH 01/15] MSBuild 15.6.80 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 1da9ea515..41f4e29a8 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -3,7 +3,7 @@ 2.0.5 $(MicrosoftNETCoreAppPackageVersion) - 15.6.0-preview-000076-1343104 + 15.6.80 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) From 73dbe8f45ea7553b4d613767c4af931051f9f7ed Mon Sep 17 00:00:00 2001 From: Livar Date: Thu, 8 Feb 2018 12:00:54 -0800 Subject: [PATCH 02/15] Update SDK to 2.1.300-preview1-62608-07 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a339621bd..41384aed9 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -14,7 +14,7 @@ $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) - 2.1.0-preview1-62516-03 + 2.1.300-preview1-62608-07 $(MicrosoftNETSdkPackageVersion) 2.1.0-release21-20180126-1326543 $(MicrosoftNETSdkWebPackageVersion) From eecb8f63a530dbe81c3898d27d01c830258834cc Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Fri, 9 Feb 2018 09:43:55 -0600 Subject: [PATCH 03/15] MSBuild 15.6.81 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 41f4e29a8..9af93ba47 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -3,7 +3,7 @@ 2.0.5 $(MicrosoftNETCoreAppPackageVersion) - 15.6.80 + 15.6.81 $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) From 978957315b967ba390188121e4e46bb138d8b644 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Mon, 29 Jan 2018 21:20:07 -0800 Subject: [PATCH 04/15] Fixing update dependency by using the new APIs. We broke this when we updated the version of VersionTools. --- build/DependencyVersions.props | 2 +- build_projects/update-dependencies/Program.cs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 41f4e29a8..054779e42 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -75,7 +75,7 @@ - 1.0.27-prerelease-01723-01 + 2.1.0-prerelease-02430-04 2.0.0-preview2-25331-01 2.1.0-prerelease-02221-02 diff --git a/build_projects/update-dependencies/Program.cs b/build_projects/update-dependencies/Program.cs index 27926a77c..ae39b89aa 100644 --- a/build_projects/update-dependencies/Program.cs +++ b/build_projects/update-dependencies/Program.cs @@ -4,6 +4,7 @@ using Microsoft.DotNet.VersionTools; using Microsoft.DotNet.VersionTools.Automation; using Microsoft.DotNet.VersionTools.Dependencies; +using Microsoft.DotNet.VersionTools.Dependencies.BuildOutput; using System; using System.Collections.Generic; using System.Diagnostics; @@ -29,7 +30,7 @@ namespace Microsoft.DotNet.Scripts IEnumerable updaters = GetUpdaters(); var dependencyBuildInfos = buildInfos.Select(buildInfo => - new DependencyBuildInfo( + new BuildDependencyInfo( buildInfo, upgradeStableVersions: true, disabledPackages: Enumerable.Empty())); @@ -50,11 +51,14 @@ namespace Microsoft.DotNet.Scripts body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications); } - new PullRequestCreator(gitHubAuth, origin, upstreamBranch) + new PullRequestCreator(gitHubAuth) .CreateOrUpdateAsync( suggestedMessage, suggestedMessage + $" ({upstreamBranch.Name})", - body) + body, + upstreamBranch, + origin, + new PullRequestOptions()) .Wait(); } } From 43b84cf1e2d5db045b69510d1080bce3d6c61044 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 30 Jan 2018 15:43:41 -0800 Subject: [PATCH 05/15] Adding roslyn to automatic dependency flow through maestro. --- build_projects/update-dependencies/Config.cs | 5 +++++ build_projects/update-dependencies/Program.cs | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/build_projects/update-dependencies/Config.cs b/build_projects/update-dependencies/Config.cs index 0bd5a0c6a..75c0d0c81 100644 --- a/build_projects/update-dependencies/Config.cs +++ b/build_projects/update-dependencies/Config.cs @@ -39,12 +39,15 @@ namespace Microsoft.DotNet.Scripts private Lazy _dotNetVersionUrl = new Lazy(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info")); private Lazy _coreSetupVersionFragment = new Lazy(() => GetEnvironmentVariable("CORESETUP_VERSION_FRAGMENT", GetDefaultCoreSetupVersionFragment())); + + private Lazy _roslynVersionFragment = new Lazy(() => GetEnvironmentVariable("ROSLYN_VERSION_FRAGMENT")); private Lazy _gitHubUpstreamOwner = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet")); private Lazy _gitHubProject = new Lazy(() => GetEnvironmentVariable("GITHUB_PROJECT", "cli")); private Lazy _gitHubUpstreamBranch = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch())); private Lazy _gitHubPullRequestNotifications = new Lazy(() => GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "") .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)); + private Config() { } @@ -54,6 +57,8 @@ namespace Microsoft.DotNet.Scripts public string Password => _password.Value; public string DotNetVersionUrl => _dotNetVersionUrl.Value; public string CoreSetupVersionFragment => _coreSetupVersionFragment.Value; + public string RoslynVersionFragment => _roslynVersionFragment.Value; + public bool HasRoslynVersionFragment => !string.IsNullOrEmpty(RoslynVersionFragment); public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value; public string GitHubProject => _gitHubProject.Value; public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value; diff --git a/build_projects/update-dependencies/Program.cs b/build_projects/update-dependencies/Program.cs index ae39b89aa..99b77691e 100644 --- a/build_projects/update-dependencies/Program.cs +++ b/build_projects/update-dependencies/Program.cs @@ -28,6 +28,11 @@ namespace Microsoft.DotNet.Scripts buildInfos.Add(GetBuildInfo("CoreSetup", s_config.CoreSetupVersionFragment, fetchLatestReleaseFile: false)); + if (s_config.HasRoslynVersionFragment) + { + buildInfos.Add(GetBuildInfo("Roslyn", s_config.RoslynVersionFragment, fetchLatestReleaseFile: false)); + } + IEnumerable updaters = GetUpdaters(); var dependencyBuildInfos = buildInfos.Select(buildInfo => new BuildDependencyInfo( @@ -88,6 +93,11 @@ namespace Microsoft.DotNet.Scripts yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App"); yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions"); yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftExtensionsDependencyModelPackageVersion", "Microsoft.Extensions.DependencyModel"); + + if (s_config.HasRoslynVersionFragment) + { + yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftCodeAnalysisCSharpPackageVersion", "Microsoft.CodeAnalysis.CSharp"); + } } private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId) From 6003685b867037e143164852dea279c775058a73 Mon Sep 17 00:00:00 2001 From: NuGet Team Bot Date: Fri, 9 Feb 2018 10:52:38 -0800 Subject: [PATCH 06/15] Insert NuGet Build 4.6.0-rtm-4918 into cli --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 41f4e29a8..9c7d6cdcc 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -31,7 +31,7 @@ 1.2.1-alpha-002133 $(MicrosoftDotNetProjectJsonMigrationPackageVersion) 1.6.0-beta2-25304 - 4.6.0-rtm-4880 + 4.6.0-rtm-4918 $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) $(NuGetBuildTasksPackageVersion) From 932248f0d7e2842ad9660b28182072f3e4ec66ca Mon Sep 17 00:00:00 2001 From: = Date: Fri, 9 Feb 2018 12:45:13 -0800 Subject: [PATCH 07/15] Consume generic aspnetcore rpm installers --- build/BundledRuntimes.props | 3 +-- build/DependencyVersions.props | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 0ab61c2ce..2ebe51f54 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -32,8 +32,7 @@ linux-x64 linux-x64 $(AspNetCoreSharedFxInstallerRid) - x64 - $(CoreSetupRid) + x64 aspnetcore-runtime-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 41384aed9..3c1757a1c 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.1.0-preview1-28228 + 2.1.0-preview1-28263 2.1.0-preview1-26116-04 $(MicrosoftNETCoreAppPackageVersion) 15.6.0-preview-000054-1286830 From 82f9d6e530014be3521d2f6202ae9e6c38d9d1ff Mon Sep 17 00:00:00 2001 From: John Beisner Date: Fri, 9 Feb 2018 17:17:36 -0800 Subject: [PATCH 08/15] Do not create a directory with a trailing space; it cannot be deleted by conventional methods. (#8587) --- test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs b/test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs index fb6ea25e8..702bace71 100644 --- a/test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs +++ b/test/Microsoft.DotNet.ShellShim.Tests/ShellShimMakerTests.cs @@ -177,8 +177,9 @@ namespace Microsoft.DotNet.ShellShim.Tests { const string testAppName = "TestAppSimple"; const string emptySpaceToTestSpaceInPath = " "; + const string directoryNamePostFix = "Test"; TestAssetInstance testInstance = TestAssets.Get(testAppName) - .CreateInstance(testAppName + emptySpaceToTestSpaceInPath) + .CreateInstance(testAppName + emptySpaceToTestSpaceInPath + directoryNamePostFix) .UseCurrentRuntimeFrameworkVersion() .WithRestoreFiles() .WithBuildFiles(); From aa90d8efd2ee6fc21c1743df4ffc53bdb7e22b24 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Fri, 9 Feb 2018 17:20:50 -0800 Subject: [PATCH 09/15] Port Kernel Version telemetry to preview1 --- .../Telemetry/TelemetryCommonProperties.cs | 46 ++++++++++++++++++- .../TelemetryCommonPropertiesTests.cs | 9 ++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/dotnet/Telemetry/TelemetryCommonProperties.cs b/src/dotnet/Telemetry/TelemetryCommonProperties.cs index c19060ab3..6cbf02b47 100644 --- a/src/dotnet/Telemetry/TelemetryCommonProperties.cs +++ b/src/dotnet/Telemetry/TelemetryCommonProperties.cs @@ -8,6 +8,8 @@ using Microsoft.DotNet.PlatformAbstractions; using System.IO; using Microsoft.DotNet.Configurer; using System.Linq; +using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment; +using RuntimeInformation = System.Runtime.InteropServices.RuntimeInformation; namespace Microsoft.DotNet.Cli.Telemetry { @@ -40,6 +42,8 @@ namespace Microsoft.DotNet.Cli.Telemetry private const string CurrentPathHash = "Current Path Hash"; private const string MachineId = "Machine ID"; private const string DockerContainer = "Docker Container"; + private const string KernelVersion = "Kernel Version"; + private const string TelemetryProfileEnvironmentVariable = "DOTNET_CLI_TELEMETRY_PROFILE"; private const string CannotFindMacAddress = "Unknown"; @@ -57,7 +61,8 @@ namespace Microsoft.DotNet.Cli.Telemetry {TelemetryProfile, Environment.GetEnvironmentVariable(TelemetryProfileEnvironmentVariable)}, {DockerContainer, _userLevelCacheWriter.RunWithCache(IsDockerContainerCacheKey, () => _dockerContainerDetector.IsDockerContainer().ToString("G") )}, {CurrentPathHash, _hasher(_getCurrentDirectory())}, - {MachineId, _userLevelCacheWriter.RunWithCache(MachineIdCacheKey, GetMachineId)} + {MachineId, _userLevelCacheWriter.RunWithCache(MachineIdCacheKey, GetMachineId)}, + {KernelVersion, GetKernelVersion()} }; } @@ -73,5 +78,44 @@ namespace Microsoft.DotNet.Cli.Telemetry return Guid.NewGuid().ToString(); } } + + /// + /// Returns a string identifying the OS kernel. + /// For Unix this currently comes from "uname -srv". + /// For Windows this currently comes from RtlGetVersion(). + /// + /// Here are some example values: + /// + /// Alpine.36 Linux 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 + /// Centos.73 Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 + /// Debian.87 Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) + /// Debian.90 Linux 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) + /// fedora.25 Linux 4.11.3-202.fc25.x86_64 #1 SMP Mon Jun 5 16:38:21 UTC 2017 + /// Fedora.26 Linux 4.14.15-200.fc26.x86_64 #1 SMP Wed Jan 24 04:26:15 UTC 2018 + /// Fedora.27 Linux 4.14.14-300.fc27.x86_64 #1 SMP Fri Jan 19 13:19:54 UTC 2018 + /// OpenSuse.423 Linux 4.4.104-39-default #1 SMP Thu Jan 4 08:11:03 UTC 2018 (7db1912) + /// RedHat.69 Linux 2.6.32-696.20.1.el6.x86_64 #1 SMP Fri Jan 12 15:07:59 EST 2018 + /// RedHat.72 Linux 3.10.0-514.21.1.el7.x86_64 #1 SMP Sat Apr 22 02:41:35 EDT 2017 + /// RedHat.73 Linux 3.10.0-514.21.1.el7.x86_64 #1 SMP Sat Apr 22 02:41:35 EDT 2017 + /// SLES.12 Linux 4.4.103-6.38-default #1 SMP Mon Dec 25 20:44:33 UTC 2017 (e4b9067) + /// suse.422 Linux 4.4.49-16-default #1 SMP Sun Feb 19 17:40:35 UTC 2017 (70e9954) + /// Ubuntu.1404 Linux 3.19.0-65-generic #73~14.04.1-Ubuntu SMP Wed Jun 29 21:05:22 UTC 2016 + /// Ubuntu.1604 Linux 4.13.0-1005-azure #7-Ubuntu SMP Mon Jan 8 21:37:36 UTC 2018 + /// Ubuntu.1604.WSL Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 + /// Ubuntu.1610 Linux 4.8.0-45-generic #48-Ubuntu SMP Fri Mar 24 11:46:39 UTC 2017 + /// Ubuntu.1704 Linux 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 + /// Ubuntu.1710 Linux 4.13.0-25-generic #29-Ubuntu SMP Mon Jan 8 21:14:41 UTC 2018 + /// OSX1012 Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 + /// OSX1013 Darwin 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 + /// Windows.10 Microsoft Windows 10.0.14393 + /// Windows.10.Core Microsoft Windows 10.0.14393 + /// Windows.10.Nano Microsoft Windows 10.0.14393 + /// Windows.7 Microsoft Windows 6.1.7601 S + /// Windows.81 Microsoft Windows 6.3.9600 + /// + private static string GetKernelVersion() + { + return RuntimeInformation.OSDescription; + } } } diff --git a/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs b/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs index b30e59e9d..7c6c5484d 100644 --- a/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs +++ b/test/dotnet.Tests/TelemetryCommonPropertiesTests.cs @@ -5,9 +5,11 @@ using FluentAssertions; using Microsoft.DotNet.Tools.Test.Utilities; using Xunit; using System; +using System.Runtime.InteropServices; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Configurer; +using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment; namespace Microsoft.DotNet.Tests { @@ -43,6 +45,13 @@ namespace Microsoft.DotNet.Tests Guid.TryParse(assignedMachineId, out var _).Should().BeTrue("it should be a guid"); } + [Fact] + public void TelemetryCommonPropertiesShouldContainKernelVersion() + { + var unitUnderTest = new TelemetryCommonProperties(getMACAddress: () => null, userLevelCacheWriter: new NothingCache()); + unitUnderTest.GetTelemetryCommonProperties()["Kernel Version"].Should().Be(RuntimeInformation.OSDescription); + } + private class NothingCache : IUserLevelCacheWriter { public string RunWithCache(string cacheKey, Func getValueToCache) From 2a493c1318cc26cb68fefb3613309d14e859ef2c Mon Sep 17 00:00:00 2001 From: William Lee Date: Mon, 12 Feb 2018 14:59:43 -0800 Subject: [PATCH 10/15] Support TildeSlash expand (#8589) --- .../EnvironmentProvider.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs b/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs index 65db78e82..b8d85b3b7 100644 --- a/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs +++ b/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs @@ -14,6 +14,7 @@ namespace Microsoft.DotNet.Cli.Utils private static char[] s_pathSeparator = new char[] { Path.PathSeparator }; private static char[] s_quote = new char[] { '"' }; private IEnumerable _searchPaths; + private readonly Lazy _userHomeDirectory = new Lazy(() => Environment.GetEnvironmentVariable("HOME") ?? string.Empty); private IEnumerable _executableExtensions; public IEnumerable ExecutableExtensions @@ -45,7 +46,8 @@ namespace Microsoft.DotNet.Cli.Utils searchPaths.AddRange(Environment .GetEnvironmentVariable("PATH") .Split(s_pathSeparator) - .Select(p => p.Trim(s_quote))); + .Select(p => p.Trim(s_quote)) + .Select(p => ExpandTildeSlash(p))); _searchPaths = searchPaths; } @@ -54,6 +56,19 @@ namespace Microsoft.DotNet.Cli.Utils } } + private string ExpandTildeSlash(string path) + { + const string tildeSlash = "~/"; + if (path.StartsWith(tildeSlash, StringComparison.Ordinal) && !string.IsNullOrEmpty(_userHomeDirectory.Value)) + { + return Path.Combine(_userHomeDirectory.Value, path.Substring(tildeSlash.Length)); + } + else + { + return path; + } + } + public EnvironmentProvider( IEnumerable extensionsOverride = null, IEnumerable searchPathsOverride = null) From 8fcbb631c9833b1bd85294ac9efbc4b487993e47 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 12 Feb 2018 15:56:07 -0800 Subject: [PATCH 11/15] Update to roslyn 2.7.0-beta3-62612-07 for 2.1.1xx --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 0b334d8a5..eba1b455d 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -9,7 +9,7 @@ $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) 10.1.2-rtm-180131-0 - 2.7.0-beta3-62529-05 + 2.7.0-beta3-62612-07 $(MicrosoftCodeAnalysisCSharpPackageVersion) $(MicrosoftCodeAnalysisCSharpPackageVersion) 15.5.0-preview-62518-04 From bc1fb44364da925e895ff8238d9fd9f6b690b120 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 12 Feb 2018 16:03:25 -0800 Subject: [PATCH 12/15] Use satellites from roslyn package, not cli-deps-satellites --- build/DependencyVersions.props | 1 - build/Microsoft.DotNet.Cli.tasks | 1 - build_projects/dotnet-cli-build/AddToDeps.cs | 67 ------------------- src/redist/redist.csproj | 9 +-- .../tool_roslyn_satellites.csproj | 35 ---------- 5 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 build_projects/dotnet-cli-build/AddToDeps.cs delete mode 100644 src/tool_roslyn_satellites/tool_roslyn_satellites.csproj diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index eba1b455d..d467d2629 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -45,7 +45,6 @@ $(MicrosoftNETTestSdkPackageVersion) 0.2.0-beta-000042 0.2.0 - 2.6.0-pre-20171122-1 diff --git a/build/Microsoft.DotNet.Cli.tasks b/build/Microsoft.DotNet.Cli.tasks index 1c846d8b0..901a48f84 100644 --- a/build/Microsoft.DotNet.Cli.tasks +++ b/build/Microsoft.DotNet.Cli.tasks @@ -1,7 +1,6 @@ - diff --git a/build_projects/dotnet-cli-build/AddToDeps.cs b/build_projects/dotnet-cli-build/AddToDeps.cs deleted file mode 100644 index ca02cd474..000000000 --- a/build_projects/dotnet-cli-build/AddToDeps.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; -using System.Linq; - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.Extensions.DependencyModel; - -namespace Microsoft.DotNet.Cli.Build -{ - /// - /// Merges additional .deps.json files into target .deps.json files. - /// - public class AddToDeps : Task - { - /// - /// Paths to target .deps.json files, into which will be merged. - /// These files will be overwritten with the merge result. - /// - [Required] - public string[] TargetDeps { get; set; } - - /// - /// Paths to additional .deps.json files to merge into . - /// - [Required] - public string[] AdditionalDeps { get; set; } - - public override bool Execute() - { - DependencyContext additionalContext = Read(AdditionalDeps.First()); - - foreach (string additionalPath in AdditionalDeps.Skip(1)) - { - additionalContext = additionalContext.Merge(Read(additionalPath)); - } - - foreach (string targetPath in TargetDeps) - { - DependencyContext targetContext = Read(targetPath).Merge(additionalContext); - Write(targetContext, targetPath); - } - - return true; - } - - private static DependencyContext Read(string path) - { - using (FileStream stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)) - using (var reader = new DependencyContextJsonReader()) - { - return reader.Read(stream); - } - } - - private static void Write(DependencyContext context, string path) - { - using (FileStream stream = File.Open(path, FileMode.Create, FileAccess.Write, FileShare.Read)) - { - var writer = new DependencyContextWriter(); // unlike reader, writer is not disposable - writer.Write(context, stream); - } - } - } -} \ No newline at end of file diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 900d43f55..3879fe674 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -77,13 +77,11 @@ - - @@ -95,12 +93,7 @@ DestinationFile="%(RoslynRuntimeConfigs.Identity)" ReplacementPatterns="$(ReplacementPattern)" ReplacementStrings="$(ReplacementString)" /> - - - + - - - - - $(CliVersionPrefix) - $(CliTargetFramework) - $(MicrosoftNETCoreAppPackageVersion) - $(RoslynDirectory)/bincore - $(CommitCount) - false - false - false - - - - - - - - - - - - - - - - - - \ No newline at end of file From 423c407ec4a2cbee988b243d61b219fead21a29b Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 13 Feb 2018 13:46:31 -0800 Subject: [PATCH 13/15] Signing nupkg contents (Cli.Utils and MSBuildResolver) along with the rest of the compiled assemblies. --- build/Signing.proj | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build/Signing.proj b/build/Signing.proj index 11871f15a..9cefdeed2 100644 --- a/build/Signing.proj +++ b/build/Signing.proj @@ -28,7 +28,7 @@ - + @@ -71,18 +71,21 @@ - + + - + $(InternalCertificateId) - + + From e6cdfeb833725b53445b2cffcf4bb8e10fac2118 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Wed, 14 Feb 2018 08:04:45 -0800 Subject: [PATCH 14/15] "ExternalRestoreSources" needs to be set in the docker container (#8602) * Add "PB_RESTORESOURCE" to docker environmental variables. * Add "PB_RestoreSource" explictly to the 'SandBox' build.sh call. * Add "ExternalRestoreSources" explictly to the 'SandBox' build.sh call. * Using an environmental variable to communicate to the docker container. --- scripts/dockerrun.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dockerrun.sh b/scripts/dockerrun.sh index 15a81ef15..1b96a5021 100755 --- a/scripts/dockerrun.sh +++ b/scripts/dockerrun.sh @@ -139,5 +139,6 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \ -e PB_ASSETROOTURL \ -e PB_PACKAGEVERSIONPROPSURL \ -e PB_PUBLISHBLOBFEEDURL \ + -e EXTERNALRESTORESOURCES \ $DOTNET_BUILD_CONTAINER_TAG \ $BUILD_COMMAND "$@" From 62ce305f06c502a2fae459fc906c982b943c6128 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 14 Feb 2018 11:50:14 -0800 Subject: [PATCH 15/15] Update to aspnetcore 2.1.0-preview1-28275 and react to feed layout changes (#8611) --- build/BundledRuntimes.props | 7 ++++--- build/DependencyVersions.props | 4 ++-- scripts/obtain/dotnet-install.ps1 | 32 +++++++++++++++++++++---------- scripts/obtain/dotnet-install.sh | 30 +++++++++++++++++++---------- 4 files changed, 48 insertions(+), 25 deletions(-) diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 2ebe51f54..aeeaf373d 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -49,6 +49,7 @@ $(CoreSetupBlobRootUrl)Runtime/ + $(CoreSetupBlobRootUrl)aspnetcore/Runtime/ $(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion) $(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) @@ -56,7 +57,7 @@ <_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile" Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')"> - $(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam) + $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreSharedFxArchiveFile) $(AspNetCoreSharedFxPublishDirectory) @@ -98,14 +99,14 @@ <_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile" Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != ''"> - $(CoreSetupRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam) + $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam) $(DownloadedAspNetCoreSharedFxInstallerFile) <_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile" Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)')"> - $(CoreSetupRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam) + $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreSharedFxBaseRuntimeVersionFile) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 6961bdfdf..6d5690141 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.1.0-preview1-28263 + 2.1.0-preview1-28275 2.1.0-preview1-26116-04 $(MicrosoftNETCoreAppPackageVersion) 15.6.81 @@ -59,7 +59,7 @@ $(MicrosoftNETCoreAppPackageVersion) $(MicrosoftNETCoreAppPackageVersion) - $(MicrosoftAspNetCoreAllPackageVersion) + $(MicrosoftAspNetCoreAppPackageVersion) diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 975b93d0d..1a35ec4fb 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -43,8 +43,8 @@ .PARAMETER Runtime Installs just a shared runtime, not the entire SDK. Possible values: - - dotnet - - aspnetcore + - dotnet - the Microsoft.NETCore.App shared runtime + - aspnetcore - the Microsoft.AspNetCore.App shared runtime .PARAMETER DryRun If set it will not perform installation but instead display what command line to use to consistently install currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link @@ -249,10 +249,10 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co if ($Runtime -eq "dotnet") { $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version" } - elseif ($Runtime) { - $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.$Runtime.version" + elseif ($Runtime -eq "aspnetcore") { + $VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version" } - else { + elseif (-not $Runtime) { if ($Coherent) { $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version" } @@ -260,6 +260,9 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" } } + else { + throw "Invalid value for `$Runtime" + } $Response = GetHTTPResponse -Uri $VersionFileUrl $StringContent = $Response.Content.ReadAsStringAsync().Result @@ -296,11 +299,17 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { Say-Invocation $MyInvocation - if ($Runtime) { - $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/$Runtime-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + if ($Runtime -eq "dotnet") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + } + elseif ($Runtime -eq "aspnetcore") { + $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip" + } + elseif (-not $Runtime) { + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip" } else { - $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip" + throw "Invalid value for `$Runtime" } Say-Verbose "Constructed primary payload URL: $PayloadURL" @@ -503,12 +512,15 @@ if ($Runtime -eq "dotnet") { } elseif ($Runtime -eq "aspnetcore") { $assetName = "ASP.NET Core Runtime" - $dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.All" + $dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App" } -else { +elseif (-not $Runtime) { $assetName = ".NET Core SDK" $dotnetPackageRelativePath = "sdk" } +else { + throw "Invalid value for `$Runtime" +} $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion if ($isAssetInstalled) { diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 81a4de77e..04b5a3820 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -390,14 +390,17 @@ get_latest_version_info() { local version_file_url=null if [[ "$runtime" == "dotnet" ]]; then version_file_url="$uncached_feed/Runtime/$channel/latest.version" - elif [ ! -z "$runtime" ]; then - version_file_url="$uncached_feed/Runtime/$channel/latest.$runtime.version" - else + elif [[ "$runtime" == "aspnetcore" ]]; then + version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" + elif [ -z "$runtime" ]; then if [ "$coherent" = true ]; then version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" else version_file_url="$uncached_feed/Sdk/$channel/latest.version" fi + else + say_err "Invalid value for \$runtime" + return 1 fi say_verbose "get_latest_version_info: latest url: $version_file_url" @@ -457,10 +460,14 @@ construct_download_link() { osname="$(get_current_os_name)" || return 1 local download_link=null - if [ ! -z "$runtime" ]; then - download_link="$azure_feed/Runtime/$specific_version/$runtime-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" - else + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + elif [ -z "$runtime" ]; then download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz" + else + return 1 fi echo "$download_link" @@ -706,11 +713,14 @@ install_dotnet() { asset_relative_path="shared/Microsoft.NETCore.App" asset_name=".NET Core Runtime" elif [[ "$runtime" == "aspnetcore" ]]; then - asset_relative_path="shared/Microsoft.AspNetCore.All" + asset_relative_path="shared/Microsoft.AspNetCore.App" asset_name="ASP.NET Core Runtime" - else + elif [ -z "$runtime" ]; then asset_relative_path="sdk" asset_name=".NET Core SDK" + else + say_err "Invalid value for \$runtime" + return 1 fi if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then @@ -866,8 +876,8 @@ do echo " --runtime Installs a shared runtime only, without the SDK." echo " -Runtime" echo " Possible values:" - echo " - dotnet - the Microsoft.NETCore.App shared framework" - echo " - aspnetcore - the Microsoft.AspNetCore.All shared framework" + echo " - dotnet - the Microsoft.NETCore.App shared runtime" + echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime" echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." echo " -SkipNonVersionedFiles" echo " --dry-run,-DryRun Do not perform installation. Display download link."