From 29db52a40d2d8267232d66dc83ec8209f836f3f7 Mon Sep 17 00:00:00 2001 From: Arun Mahapatra Date: Wed, 28 Jun 2017 15:59:19 +0530 Subject: [PATCH 01/15] Update test platform to 15.3.0-preview-20170628-02 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a3a15fb3b..f80188e72 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -18,7 +18,7 @@ 4.3.0-preview3-4168 2.0.0-preview2-25331-02 2.0.0-rel-20170518-512 - 15.3.0-preview-20170618-03 + 15.3.0-preview-20170628-02 $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) From 9c913674c918ea7222c8f8fa5f2b45d66524add2 Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Wed, 28 Jun 2017 17:35:53 +0000 Subject: [PATCH 02/15] Update CoreSetup to preview3-25428-01 --- build/DependencyVersions.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a3a15fb3b..1e263ea8b 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.0-preview3-25426-01 + 2.0.0-preview3-25428-01 15.3.0-preview-000400-01 2.3.0-beta3-61816-04 2.3.0-pre-20170624-6 @@ -25,8 +25,8 @@ 1.0.0-beta2-20170614-260 1.0.0-beta2-20170620-266 1.0.0-beta2-20170620-266 - 2.0.0-preview3-25426-01 - 2.0.0-preview3-25426-01 + 2.0.0-preview3-25428-01 + 2.0.0-preview3-25428-01 0.1.1-alpha-167 1.2.1-alpha-002133 0.2.0 From b6931ab0c57b0ab83f90ed321e717661cf8b1547 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 29 Jun 2017 09:32:52 -0700 Subject: [PATCH 03/15] MSBuild 15.3.402 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a3a15fb3b..e6785f1e6 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -2,7 +2,7 @@ 2.0.0-preview3-25426-01 - 15.3.0-preview-000400-01 + 15.3.0-preview-000402-01 2.3.0-beta3-61816-04 2.3.0-pre-20170624-6 1.6.0-beta2-25304 From a396550ed06a06bb21279e9495dbcf3c3348c78b Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 27 Jun 2017 16:49:34 -0700 Subject: [PATCH 04/15] Adding a installer for Downlevel (Dev14) to install .NET Framework props and targets to enable it to reference netstandard 2.0. --- build/Branding.props | 3 +- build/InstallerInfo.props | 2 + build/package/Archive.targets | 2 +- build/package/Installer.MSI.targets | 29 ++++ build/package/Layout.targets | 27 ++++ .../windows/msbuildextensions/generatemsi.ps1 | 140 ++++++++++++++++++ .../msbuildextensions/msbuildextensions.wxs | 34 +++++ .../windows/msbuildextensions/provider.wxs | 9 ++ .../msbuildextensions/registrykeys.wxs | 13 ++ .../windows/msbuildextensions/variables.wxi | 23 +++ 10 files changed, 280 insertions(+), 2 deletions(-) create mode 100644 packaging/windows/msbuildextensions/generatemsi.ps1 create mode 100644 packaging/windows/msbuildextensions/msbuildextensions.wxs create mode 100644 packaging/windows/msbuildextensions/provider.wxs create mode 100644 packaging/windows/msbuildextensions/registrykeys.wxs create mode 100644 packaging/windows/msbuildextensions/variables.wxi diff --git a/build/Branding.props b/build/Branding.props index 913041dac..4624ef7ed 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -1,6 +1,7 @@ Microsoft .NET Core SDK - 2.0.0 Preview 2 + Microsoft .NET Core MSBuild Extensions - 2.0.0 Preview 2 Microsoft .NET Core Runtime - 2.0.0 Microsoft .NET Core Host - 2.0.0 Microsoft .NET Core Host FX Resolver - 2.0.0 @@ -24,7 +25,7 @@ dotnet-sdk $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) - + dotnet-msbuild-extensions-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) diff --git a/build/InstallerInfo.props b/build/InstallerInfo.props index 6cc81f094..036369fab 100644 --- a/build/InstallerInfo.props +++ b/build/InstallerInfo.props @@ -2,11 +2,13 @@ $(PackagesDirectory) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) + $(InstallerOutputDirectory)/$(ArtifactNameWithVersionMSBuildExtensions)$(InstallerExtension) $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) $(IntermediateDirectory)/debian/sdk $(SdkDebianIntermediateDirectory)/debianLayoutDirectory $(IntermediateDirectory)/layouts $(LayoutDirectory)/$(ArtifactNameSdk) + $(LayoutDirectory)/MSBuildExtensions diff --git a/build/package/Archive.targets b/build/package/Archive.targets index 54352ae27..901423bd2 100644 --- a/build/package/Archive.targets +++ b/build/package/Archive.targets @@ -37,7 +37,7 @@ - + %(LayoutDefinition.OutputFiles) $(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension) $(LayoutDirectory)/%(LayoutDefinition.Name) diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 44f930c8b..2a4e131b8 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -17,6 +17,8 @@ $(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1 $(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1 + $(RepoRoot)/packaging/windows/msbuildextensions/generatemsi.ps1 + $(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec $(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg @@ -36,11 +38,14 @@ + + + + + + @@ -103,6 +113,24 @@ '$(Architecture)'" /> + + + + + + + + + + + + + + + + + + + + + + @@ -53,7 +74,13 @@ $(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk) $(ArtifactNameCombinedHostHostFxrFrameworkSdk) + + + + @(CombinedMSBuildExtensionsInput) + @(CombinedMSBuildExtensionsRelativeOutputFiles -> '$(MSBuildExtensionsOutputDirectory)/%(Identity)') + diff --git a/packaging/windows/msbuildextensions/generatemsi.ps1 b/packaging/windows/msbuildextensions/generatemsi.ps1 new file mode 100644 index 000000000..84ca7462e --- /dev/null +++ b/packaging/windows/msbuildextensions/generatemsi.ps1 @@ -0,0 +1,140 @@ +# 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. + +param( + [Parameter(Mandatory=$true)][string]$inputDir, + [Parameter(Mandatory=$true)][string]$MSBuildExtensionsMSIOutput, + [Parameter(Mandatory=$true)][string]$WixRoot, + [Parameter(Mandatory=$true)][string]$ProductMoniker, + [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, + [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$UpgradeCode, + [Parameter(Mandatory=$true)][string]$Architecture +) + +. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" +$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.." + +$InstallFileswsx = "install-files.wxs" +$InstallFilesWixobj = "install-files.wixobj" + +function RunHeat +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running heat.. + + .\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr MSBUILDEXTENSIONSHOME -out $InstallFileswsx | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Heat failed with exit code $LastExitCode." + } + + popd + return $result +} + +function RunCandle +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running candle.. + $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" + + .\candle.exe -nologo ` + -dDotnetSrc="$inputDir" ` + -dMicrosoftEula="$RepoRoot\packaging\windows\clisdk\dummyeula.rtf" ` + -dProductMoniker="$ProductMoniker" ` + -dBuildVersion="$DotnetMSIVersion" ` + -dDisplayVersion="$DotnetCLIDisplayVersion" ` + -dNugetVersion="$DotnetCLINugetVersion" ` + -dUpgradeCode="$UpgradeCode" ` + -arch "$Architecture" ` + -ext WixDependencyExtension.dll ` + "$AuthWsxRoot\msbuildextensions.wxs" ` + "$AuthWsxRoot\provider.wxs" ` + "$AuthWsxRoot\registrykeys.wxs" ` + $InstallFileswsx | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Candle failed with exit code $LastExitCode." + } + + popd + return $result +} + +function RunLight +{ + $result = $true + pushd "$WixRoot" + + Write-Output Running light.. + $CabCache = Join-Path $WixRoot "cabcache" + $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" + + .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` + -cultures:en-us ` + msbuildextensions.wixobj ` + provider.wixobj ` + registrykeys.wixobj ` + $InstallFilesWixobj ` + -b "$inputDir" ` + -b "$AuthWsxRoot" ` + -reusecab ` + -cc "$CabCache" ` + -out $MSBuildExtensionsMSIOutput | Out-Host + + if($LastExitCode -ne 0) + { + $result = $false + Write-Output "Light failed with exit code $LastExitCode." + } + + popd + return $result +} + +if(!(Test-Path $inputDir)) +{ + throw "$inputDir not found" +} + +Write-Output "Creating MSBuild Extensions MSI at $MSBuildExtensionsMSIOutput" + +if([string]::IsNullOrEmpty($WixRoot)) +{ + Exit -1 +} + +if(-Not (RunHeat)) +{ + Exit -1 +} + +if(-Not (RunCandle)) +{ + Exit -1 +} + +if(-Not (RunLight)) +{ + Exit -1 +} + +if(!(Test-Path $MSBuildExtensionsMSIOutput)) +{ + throw "Unable to create the MSBuild Extensions msi." + Exit -1 +} + +Write-Output -ForegroundColor Green "Successfully created MSBuild Extensions MSI - $MSBuildExtensionsMSIOutput" + +exit $LastExitCode diff --git a/packaging/windows/msbuildextensions/msbuildextensions.wxs b/packaging/windows/msbuildextensions/msbuildextensions.wxs new file mode 100644 index 000000000..9cfa987fa --- /dev/null +++ b/packaging/windows/msbuildextensions/msbuildextensions.wxs @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packaging/windows/msbuildextensions/provider.wxs b/packaging/windows/msbuildextensions/provider.wxs new file mode 100644 index 000000000..e1711ec76 --- /dev/null +++ b/packaging/windows/msbuildextensions/provider.wxs @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packaging/windows/msbuildextensions/registrykeys.wxs b/packaging/windows/msbuildextensions/registrykeys.wxs new file mode 100644 index 000000000..fde60d74a --- /dev/null +++ b/packaging/windows/msbuildextensions/registrykeys.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packaging/windows/msbuildextensions/variables.wxi b/packaging/windows/msbuildextensions/variables.wxi new file mode 100644 index 000000000..fb23aef1a --- /dev/null +++ b/packaging/windows/msbuildextensions/variables.wxi @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + From d8087d35d4ac195e788fbe54624a14d91a8baa11 Mon Sep 17 00:00:00 2001 From: Mike Lorbetske Date: Thu, 29 Jun 2017 10:16:02 -0700 Subject: [PATCH 05/15] Update engine and templates, update to SetupCrossgen 224 - Coherence 25975 --- NuGet.Config | 5 +---- build/DependencyVersions.props | 14 +++++++------- .../GenerateNuGetPackagesArchiveVersion.cs | 2 +- .../commands/dotnet-migrate/DotnetNewRedirector.cs | 2 +- test/EndToEnd/GivenDotNetUsesMSBuild.cs | 2 +- .../GivenDotnetAddReference.cs | 2 +- .../GivenDotnetBuildBuildsCsproj.cs | 2 +- .../GivenDotnetListReference.cs | 2 +- test/dotnet-new.Tests/GivenThatIWantANewApp.cs | 8 ++++---- .../GivenThatIWantANewAppWithSpecifiedType.cs | 2 +- test/dotnet-pack.Tests/PackTests.cs | 2 +- .../GivenDotnetPublishPublishesProjects.cs | 2 +- .../GivenDotnetRemoveP2P.cs | 2 +- .../GivenThatIWantToRestoreApp.cs | 6 +++--- test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs | 2 +- 15 files changed, 26 insertions(+), 29 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 329dde57d..3fb7835ee 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -4,10 +4,8 @@ - - - + @@ -16,7 +14,6 @@ - diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index a3a15fb3b..74f3dc1af 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -22,9 +22,9 @@ $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) - 1.0.0-beta2-20170614-260 - 1.0.0-beta2-20170620-266 - 1.0.0-beta2-20170620-266 + 1.0.0-beta2-20170629-268 + 1.0.0-beta2-20170629-268 + 1.0.0-beta2-20170629-268 2.0.0-preview3-25426-01 2.0.0-preview3-25426-01 0.1.1-alpha-167 @@ -34,10 +34,10 @@ 0.2.0-beta-000042 - notimestamp - 2.0.0-preview2-215 - preview2 - 25794 + timestamped + dev-224 + preview3 + 25975 diff --git a/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs b/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs index 4ba8fb393..75bcf0232 100644 --- a/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs +++ b/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs @@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Build { ToolPath = ToolPath, TemplateType = newArgs[0], - TemplateArgs = newArgs[1] + $" --debug:ephemeral-hive -n TempProject -o \"{outputDir}\" --no-restore", + TemplateArgs = newArgs[1] + $" --debug:ephemeral-hive -n TempProject -o \"{outputDir}\"", HostObject = HostObject, BuildEngine = BuildEngine }; diff --git a/src/dotnet/commands/dotnet-migrate/DotnetNewRedirector.cs b/src/dotnet/commands/dotnet-migrate/DotnetNewRedirector.cs index bc997da4c..0657f4abe 100644 --- a/src/dotnet/commands/dotnet-migrate/DotnetNewRedirector.cs +++ b/src/dotnet/commands/dotnet-migrate/DotnetNewRedirector.cs @@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Tools.Migrate string outputDirectory, string workingDirectory) { - RunCommand("new", new string[] { "console", "-o", workingDirectory, "--debug:ephemeral-hive", "--no-restore" }, workingDirectory); + RunCommand("new", new string[] { "console", "-o", workingDirectory, "--debug:ephemeral-hive" }, workingDirectory); } private void RunCommand(string commandToExecute, IEnumerable args, string workingDirectory) { diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs index f714ee38c..fa7e2cb75 100644 --- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs +++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs @@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd { string projectDirectory = directory.Path; - string newArgs = "console -f netcoreapp2.0 --debug:ephemeral-hive --no-restore"; + string newArgs = "console -f netcoreapp2.0 --debug:ephemeral-hive"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) diff --git a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs index bbe339071..0210cda52 100644 --- a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs +++ b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs @@ -68,7 +68,7 @@ Commands: try { - string args = $"classlib -o \"{projDir.Path}\" --debug:ephemeral-hive --no-restore"; + string args = $"classlib -o \"{projDir.Path}\" --debug:ephemeral-hive"; new NewCommandShim() .WithWorkingDirectory(projDir.Path) .ExecuteWithCapturedOutput(args) diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index febd7a9b3..a95130cd2 100644 --- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -93,7 +93,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests string dir = "pkgs"; string args = $"--packages {dir}"; - string newArgs = $"console -f netcoreapp2.0 -o \"{rootPath}\" --debug:ephemeral-hive --no-restore"; + string newArgs = $"console -f netcoreapp2.0 -o \"{rootPath}\" --debug:ephemeral-hive"; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) diff --git a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs index 12766e983..92332290d 100644 --- a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs +++ b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs @@ -209,7 +209,7 @@ Commands: try { - string newArgs = $"classlib -o \"{dir.Path}\" --debug:ephemeral-hive --no-restore"; + string newArgs = $"classlib -o \"{dir.Path}\" --debug:ephemeral-hive"; new NewCommandShim() .WithWorkingDirectory(dir.Path) .ExecuteWithCapturedOutput(newArgs) diff --git a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs index a468bd7b8..ec8d96195 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewApp.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewApp.cs @@ -21,13 +21,13 @@ namespace Microsoft.DotNet.New.Tests new NewCommand() .WithWorkingDirectory(rootPath) - .Execute($"console --debug:ephemeral-hive --no-restore"); + .Execute($"console --debug:ephemeral-hive"); DateTime expectedState = Directory.GetLastWriteTime(rootPath); var result = new NewCommand() .WithWorkingDirectory(rootPath) - .ExecuteWithCapturedOutput($"console --debug:ephemeral-hive --no-restore"); + .ExecuteWithCapturedOutput($"console --debug:ephemeral-hive"); DateTime actualState = Directory.GetLastWriteTime(rootPath); @@ -64,7 +64,7 @@ namespace Microsoft.DotNet.New.Tests new NewCommand() .WithWorkingDirectory(projectFolder) - .Execute($"{projectType} --debug:ephemeral-hive --no-restore") + .Execute($"{projectType} --debug:ephemeral-hive") .Should().Pass(); // https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed. @@ -87,7 +87,7 @@ namespace Microsoft.DotNet.New.Tests new NewCommand() .WithWorkingDirectory(rootPath) - .Execute($"{type} --name {projectName} -o . --debug:ephemeral-hive --no-restore") + .Execute($"{type} --name {projectName} -o . --debug:ephemeral-hive") .Should().Pass(); new RestoreCommand() diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index 34d706979..9121df32e 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -40,7 +40,7 @@ namespace Microsoft.DotNet.New.Tests string rootPath = TestAssets.CreateTestDirectory(identifier: $"{language}_{projectType}").FullName; new TestCommand("dotnet") { WorkingDirectory = rootPath } - .Execute($"new {projectType} -lang {language} -o {rootPath} --debug:ephemeral-hive --no-restore") + .Execute($"new {projectType} -lang {language} -o {rootPath} --debug:ephemeral-hive") .Should().Pass(); if (useNuGetConfigForAspNet) diff --git a/test/dotnet-pack.Tests/PackTests.cs b/test/dotnet-pack.Tests/PackTests.cs index 32b940a45..23d7ecbde 100644 --- a/test/dotnet-pack.Tests/PackTests.cs +++ b/test/dotnet-pack.Tests/PackTests.cs @@ -245,7 +245,7 @@ namespace Microsoft.DotNet.Tools.Pack.Tests string dir = "pkgs"; string args = $"--packages {dir}"; - string newArgs = $"console -o \"{rootPath}\" --no-restore"; + string newArgs = $"console -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index 2db2018fa..8b5e09ca9 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -206,7 +206,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests string dir = "pkgs"; string args = $"--packages {dir}"; - string newArgs = $"console -o \"{rootPath}\" --no-restore"; + string newArgs = $"console -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) diff --git a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs index 65da417b2..77407296f 100644 --- a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs +++ b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs @@ -65,7 +65,7 @@ Commands: try { - string newArgs = $"classlib -o \"{projDir.Path}\" --no-restore"; + string newArgs = $"classlib -o \"{projDir.Path}\""; new NewCommandShim() .WithWorkingDirectory(projDir.Path) .ExecuteWithCapturedOutput(newArgs) diff --git a/test/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs b/test/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs index 40afaea2e..1022596a3 100644 --- a/test/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs +++ b/test/dotnet-restore.Tests/GivenThatIWantToRestoreApp.cs @@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Restore.Tests string dir = "pkgs"; string fullPath = Path.GetFullPath(Path.Combine(rootPath, dir)); - string newArgs = $"console -o \"{rootPath}\" --no-restore"; + string newArgs = $"console -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) @@ -51,7 +51,7 @@ namespace Microsoft.DotNet.Restore.Tests string dir = "pkgs"; string fullPath = Path.GetFullPath(Path.Combine(rootPath, dir)); - string newArgs = $"classlib -o \"{rootPath}\" --no-restore"; + string newArgs = $"classlib -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) @@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Restore.Tests string dir = "pkgs"; string fullPath = Path.GetFullPath(Path.Combine(rootPath, dir)); - string newArgs = $"console -o \"{rootPath}\" --no-restore"; + string newArgs = $"console -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) diff --git a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index 36a0d3fde..69ec51360 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -198,7 +198,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests string dir = "pkgs"; string args = $"--packages {dir}"; - string newArgs = $"console -o \"{rootPath}\" --no-restore"; + string newArgs = $"console -o \"{rootPath}\""; new NewCommandShim() .WithWorkingDirectory(rootPath) .Execute(newArgs) From 59bbc5783fb7b2dba60b614d6ee5d6b835b3bdba Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Thu, 29 Jun 2017 13:44:31 -0700 Subject: [PATCH 06/15] Fix test failures in local build due to environment variable filter --- build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs | 1 + run-build.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs index 5d5cdf9e3..432f30386 100644 --- a/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs +++ b/build_projects/dotnet-cli-build/EnvironmentVariableFilter.cs @@ -28,6 +28,7 @@ namespace Microsoft.DotNet.Cli.Build private IEnumerable _environmentVariablesToKeep = new string [] { "DOTNET_CLI_TELEMETRY_SESSIONID", + "DOTNET_MULTILEVEL_LOOKUP", "DOTNET_RUNTIME_ID", "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "NUGET_PACKAGES" diff --git a/run-build.sh b/run-build.sh index fcbf1b7e9..95154cdf6 100755 --- a/run-build.sh +++ b/run-build.sh @@ -152,7 +152,7 @@ export VSTEST_TRACE_BUILD=1 # Don't resolve shared frameworks from user or global locations -DOTNET_MULTILEVEL_LOOKUP=0 +export DOTNET_MULTILEVEL_LOOKUP=0 # Install a stage 0 (set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS) From c920b3c7478ebe221c192e6b7402dbb0446c55f7 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 29 Jun 2017 18:30:21 -0700 Subject: [PATCH 07/15] Fixing a missing variable in the downlevel installer. --- packaging/windows/msbuildextensions/variables.wxi | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/windows/msbuildextensions/variables.wxi b/packaging/windows/msbuildextensions/variables.wxi index fb23aef1a..2d13e678f 100644 --- a/packaging/windows/msbuildextensions/variables.wxi +++ b/packaging/windows/msbuildextensions/variables.wxi @@ -15,6 +15,7 @@ + From 859058ba7b4dee092933b2852d58c432c2c2b1c6 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 29 Jun 2017 15:34:29 -0700 Subject: [PATCH 08/15] Changing to use File.OpenRead. This is required because when access readonly files, you must pass FileAccess.Read, otherwise, we get a UnauthorizedFileAccess exception. --- src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs b/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs index 61691e4a8..51574b3d5 100644 --- a/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs +++ b/src/Microsoft.DotNet.Cli.Utils/RuntimeConfig.cs @@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Cli.Utils public RuntimeConfig(string runtimeConfigPath) { JObject runtimeConfigJson; - using (var streamReader = new StreamReader(new FileStream(runtimeConfigPath, FileMode.Open))) + using (var streamReader = new StreamReader(File.OpenRead(runtimeConfigPath))) { runtimeConfigJson = OpenRuntimeConfig(streamReader); } From fa852d30598871bb2175c66d7ac25d6ba77ef53f Mon Sep 17 00:00:00 2001 From: Vijay Ramakrishnan Date: Thu, 29 Jun 2017 21:16:36 -0700 Subject: [PATCH 09/15] Updating the WebSdk version to 2.0.0-rel-20170629-588 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 638e751b6..655225c0c 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -17,7 +17,7 @@ 4.3.0-preview3-4168 2.0.0-preview2-25331-02 - 2.0.0-rel-20170518-512 + 2.0.0-rel-20170629-588 15.3.0-preview-20170618-03 $(CLI_SharedFrameworkVersion) $(CLI_SharedFrameworkVersion) From 759ac544d4c56c2f9e552e8a4fc2379b265adbfb Mon Sep 17 00:00:00 2001 From: Zhi Li Date: Fri, 30 Jun 2017 11:11:04 -0700 Subject: [PATCH 10/15] update to NuGet 4.3.0-preview4-4258 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 655225c0c..aad70b953 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -15,7 +15,7 @@ 2.0.0-preview3-20170622-1 $(CLI_NETSDK_Version) - 4.3.0-preview3-4168 + 4.3.0-preview4-4258 2.0.0-preview2-25331-02 2.0.0-rel-20170629-588 15.3.0-preview-20170618-03 From 3ec572f824d0bfcb99cc1d94b05ac9990d418edc Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 29 Jun 2017 18:34:56 -0700 Subject: [PATCH 11/15] Fixing help text for version, info and diagnostics and also removing runtime options that are only available for dotnet exec. --- src/dotnet/commands/dotnet-help/HelpUsageText.cs | 12 ++++++------ .../GivenThatIWantToShowHelpForDotnetCommand.cs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dotnet/commands/dotnet-help/HelpUsageText.cs b/src/dotnet/commands/dotnet-help/HelpUsageText.cs index 55ceac9c1..68c637f06 100644 --- a/src/dotnet/commands/dotnet-help/HelpUsageText.cs +++ b/src/dotnet/commands/dotnet-help/HelpUsageText.cs @@ -5,7 +5,7 @@ internal static class HelpUsageText { public static readonly string UsageText = $@"{LocalizableStrings.Usage}: dotnet [runtime-options] [path-to-application] -{LocalizableStrings.Usage}: dotnet [command] [arguments] [command-options] +{LocalizableStrings.Usage}: dotnet [sdk-options] [command] [arguments] [command-options] path-to-application: {LocalizableStrings.PathToApplicationDefinition} @@ -27,9 +27,6 @@ path-to-application: nuget {LocalizableStrings.NugetDefinition} msbuild {LocalizableStrings.MsBuildDefinition} vstest {LocalizableStrings.VsTestDefinition} - -v|--version {LocalizableStrings.SDKVersionCommandDefinition} - -i|--info {LocalizableStrings.SDKInfoCommandDefinition} - -d|--diagnostics {LocalizableStrings.SDKDiagnosticsCommandDefinition} {LocalizableStrings.CommonOptions}: -v|--verbosity {CommonLocalizableStrings.VerbosityOptionDescription} @@ -37,10 +34,13 @@ path-to-application: {LocalizableStrings.RunDotnetCommandHelpForMore} +sdk-options: + --version {LocalizableStrings.SDKVersionCommandDefinition} + --info {LocalizableStrings.SDKInfoCommandDefinition} + -d|--diagnostics {LocalizableStrings.SDKDiagnosticsCommandDefinition} + runtime-options: --additionalprobingpath {LocalizableStrings.AdditionalprobingpathDefinition} - --depsfile {LocalizableStrings.DepsfilDefinition} - --runtimeconfig {LocalizableStrings.RuntimeconfigDefinition} --fx-version {LocalizableStrings.FxVersionDefinition} --roll-forward-on-no-candidate-fx {LocalizableStrings.RollForwardOnNoCandidateFxDefinition} --additional-deps {LocalizableStrings.AdditionalDeps} diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index 700367832..29c00b2fb 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -16,7 +16,7 @@ namespace Microsoft.DotNet.Help.Tests { private const string HelpText = @"Usage: dotnet [runtime-options] [path-to-application] -Usage: dotnet [command] [arguments] [command-options] +Usage: dotnet [sdk-options] [command] [arguments] [command-options] path-to-application: The path to an application .dll file to execute. @@ -38,9 +38,6 @@ SDK commands: nuget Provides additional NuGet commands. msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. - -v|--version Display .NET Core SDK version. - -i|--info Display .NET Core information. - -d|--diagnostics Enable diagnostic output. Common options: -v|--verbosity Set the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. @@ -48,10 +45,13 @@ Common options: Run 'dotnet COMMAND --help' for more information on a command. +sdk-options: + --version Display .NET Core SDK version. + --info Display .NET Core information. + -d|--diagnostics Enable diagnostic output. + runtime-options: --additionalprobingpath Path containing probing policy and assemblies to probe for. - --depsfile Path to .deps.json file. - --runtimeconfig Path to .runtimeconfig.json file. --fx-version Version of the installed Shared Framework to use to run the application. --roll-forward-on-no-candidate-fx Roll forward on no candidate shared framework is enabled. --additional-deps Path to additonal deps.json file."; From e9be9fda074711d190924d1d04984e0178fc055c Mon Sep 17 00:00:00 2001 From: Bill Wert Date: Fri, 30 Jun 2017 13:54:22 -0700 Subject: [PATCH 12/15] Installation block does not work The product should block installing below 10.12 but does not. Fixing typo. --- packaging/osx/clisdk/Distribution-Template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/osx/clisdk/Distribution-Template b/packaging/osx/clisdk/Distribution-Template index 9b53f10c3..f2e95c46d 100644 --- a/packaging/osx/clisdk/Distribution-Template +++ b/packaging/osx/clisdk/Distribution-Template @@ -6,9 +6,9 @@ - + - + @@ -32,4 +32,4 @@ {HostFxrComponentId}.pkg {SharedHostComponentId}.pkg {CLISdkComponentId}.pkg - \ No newline at end of file + From f0f66df034a7b3fe422724d06060c515b0f4b13b Mon Sep 17 00:00:00 2001 From: William Lee Date: Fri, 30 Jun 2017 14:13:29 -0700 Subject: [PATCH 13/15] Add indication for first time experience (#7044) --- packaging/deb/postinst | 6 +++++- packaging/rpm/scripts/after_install_host.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/deb/postinst b/packaging/deb/postinst index 3ef09330a..cf3769c9e 100755 --- a/packaging/deb/postinst +++ b/packaging/deb/postinst @@ -13,6 +13,10 @@ The .NET Core Tools include a telemetry feature that collects usage information. The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License. -The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry." +The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry. + +Installation Note +-------------- +A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." dotnet new > /dev/null 2>&1 || true diff --git a/packaging/rpm/scripts/after_install_host.sh b/packaging/rpm/scripts/after_install_host.sh index 8b976c886..b0b121425 100644 --- a/packaging/rpm/scripts/after_install_host.sh +++ b/packaging/rpm/scripts/after_install_host.sh @@ -17,6 +17,10 @@ The .NET Core Tools include a telemetry feature that collects usage information. The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License. -The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry." +The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry. + +Installation Note +-------------- +A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete." dotnet new > /dev/null 2>&1 || true From 0dd17b6330705376c387a90aa8d3786ff296a62b Mon Sep 17 00:00:00 2001 From: John Beisner Date: Fri, 30 Jun 2017 16:14:44 -0700 Subject: [PATCH 14/15] Pinning the SDK version to: "2.0.0-preview3-006628" --- run-build.ps1 | 4 ++-- run-build.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run-build.ps1 b/run-build.ps1 index d3bb1152b..4911e1a32 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -80,8 +80,8 @@ $env:VSTEST_TRACE_BUILD=1 # install a stage0 $dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1" -Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"" -Version 2.0.0-preview3-006628" +Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"" -Version 2.0.0-preview3-006628" if ($LastExitCode -ne 0) { Write-Output "The .NET CLI installation failed with exit code $LastExitCode" diff --git a/run-build.sh b/run-build.sh index 95154cdf6..93d9820c0 100755 --- a/run-build.sh +++ b/run-build.sh @@ -155,7 +155,7 @@ export VSTEST_TRACE_BUILD=1 export DOTNET_MULTILEVEL_LOOKUP=0 # Install a stage 0 -(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS) +(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" --version "2.0.0-preview3-006628" $LINUX_PORTABLE_INSTALL_ARGS) EXIT_CODE=$? if [ $EXIT_CODE != 0 ]; then From bf496a9b1256802d6ce8bc409af82f4955e89d18 Mon Sep 17 00:00:00 2001 From: William Li Date: Fri, 16 Jun 2017 13:21:25 -0700 Subject: [PATCH 15/15] Update bages to aligan with linux buid definition --- build/VersionBadge.props | 12 +++++++----- .../CheckIfAllBuildsHavePublished.cs | 7 ++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/build/VersionBadge.props b/build/VersionBadge.props index 42f210be0..e7ae9aacc 100644 --- a/build/VersionBadge.props +++ b/build/VersionBadge.props @@ -1,10 +1,12 @@ - $(OSName)_$(Architecture) - ubuntu_16_04_x64 - ubuntu_16_10_x64 - fedora_24_x64 - opensuse_42_1_x64 + $(OSName)_$(Architecture) + debian_8_x64 + rhel_7_x64 + ubuntu_14_04_x64 + ubuntu_16_04_x64 + ubuntu_16_10_x64 + linux_x64 $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs index 3335e482f..67b3ec6fe 100644 --- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs +++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs @@ -52,7 +52,12 @@ namespace Microsoft.DotNet.Cli.Build { "win_x86", false }, { "win_x64", false }, { "osx_x64", false }, - { "linux_x64", false }, + { "debian_8_x64", false }, + { "rhel_7_x64", false }, + { "ubuntu_14_04_x64", false }, + { "ubuntu_16_04_x64", false }, + { "ubuntu_16_10_x64", false }, + { "linux_x64", false } }; if (!badges.ContainsKey(VersionBadgeMoniker))