From 947fbfbd5b2c17842b7ea4b53bace3915617a444 Mon Sep 17 00:00:00 2001 From: Mike Lorbetske <mike.lorbetske@n3-p.com> Date: Mon, 6 Feb 2017 13:55:05 -0800 Subject: [PATCH 01/40] Update template engine templates version to absorb the fix --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index 75e4cdcb3..ead05d75c 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -8,6 +8,6 @@ <CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version> <CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version> <TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion> - <TemplateEngineTemplateVersion>1.0.0-beta1-20170131-110</TemplateEngineTemplateVersion> + <TemplateEngineTemplateVersion>1.0.0-beta1-20170206-112</TemplateEngineTemplateVersion> </PropertyGroup> </Project> From b38934b4e8964a5e452fe72cd90c2fbc252435c3 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz <piotrp@microsoft.com> Date: Tue, 7 Feb 2017 10:22:21 -0800 Subject: [PATCH 02/40] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 754d103d4..032c00d8f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repo contains the source code for cross-platform [.NET Core](http://github. Preview 4 release - MSBuild based tools --------------------------------------- -As was outlined in the ["Changes to project.json" blog post](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/), we have started work to move away from project.json to csproj and MSBuild. All the new `latest` releases from this repo (from `rel/1.0.0` branch) are MSBuild-enabled tools. +As was outlined in the ["Changes to project.json" blog post](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/), we have started work to move away from project.json to csproj and MSBuild. All the new `latest` releases from this repo (from `rel/1.0.0` branch) are MSBuild-enabled tools. The current official release of the csproj-enabled CLI tools is **CLI Preview 4**. From 0a634d5174ab92edfb349a12d55746ec3366cd26 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz <piotrp@microsoft.com> Date: Tue, 7 Feb 2017 10:56:06 -0800 Subject: [PATCH 03/40] Add incrementality check for MSI generation --- .../package/Microsoft.DotNet.Cli.Installer.MSI.targets | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets index 365c15b9b..c1d1474d3 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets @@ -26,6 +26,12 @@ <SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(NugetVersion).nupkg</SdkInstallerNupkgFile> </PropertyGroup> + <!-- Generate SDK MSI Inputs --> + <ItemGroup> + <GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*; + $(SdkGenerateMsiPowershellScript)" /> + </ItemGroup> + <!-- Consumed By Publish --> <ItemGroup> <GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" /> @@ -74,7 +80,9 @@ <Target Name="GenerateSdkMsi" DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs" - Condition=" '$(OS)' == 'Windows_NT'"> + Condition=" '$(OS)' == 'Windows_NT'" + Inputs="@(GenerateSdkMsiInputs)" + Outputs="$(SdkInstallerFile)"> <Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript) '$(SdkLayoutOutputDirectory)' From 1c256d7c56e03fd5a06432bf5e1b05afb6414bf0 Mon Sep 17 00:00:00 2001 From: Justin Emgarten <justin@emgarten.com> Date: Tue, 7 Feb 2017 13:27:38 -0800 Subject: [PATCH 04/40] Removing extra PackageReference workaround for tests Fixes https://github.com/NuGet/Home/issues/4416 --- .../dotnet-desktop-and-portable.csproj | 6 ------ .../DependencyContextFromTool.csproj | 5 ----- 2 files changed, 11 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj b/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj index b2d04e484..11e93e15a 100644 --- a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj +++ b/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj @@ -19,12 +19,6 @@ </PackageReference> </ItemGroup> - <!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416 - This should be removed when the issue is fixed--> - <ItemGroup> - <PackageReference Include="NewtonSoft.Json" Version="9.0.1" /> - </ItemGroup> - <ItemGroup Condition=" '$(TargetFramework)' == 'net451' "> <Reference Include="System" /> <Reference Include="Microsoft.CSharp" /> diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj index cf78cd7a8..6a76893df 100755 --- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj +++ b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj @@ -18,11 +18,6 @@ <Version>1.0.0-*</Version> </DotNetCliToolReference> </ItemGroup> - <!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416 - This should be removed when the issue is fixed--> - <ItemGroup> - <PackageReference Include="NewtonSoft.Json" Version="9.0.1" /> - </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <DefineConstants>$(DefineConstants);RELEASE;TRACE</DefineConstants> <Optimize>true</Optimize> From cc191f61b314524d897a0c3de8b32657fd9c076d Mon Sep 17 00:00:00 2001 From: Jonathan Channon <jonathan.channon@gmail.com> Date: Tue, 7 Feb 2017 23:11:13 +0000 Subject: [PATCH 05/40] Change preview4 references to RC4 Preview4 is actually RC4 as all documentation and dotnet --info shows. I thought they were 2 separate things. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 032c00d8f..e825c7b35 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ This repo contains the source code for cross-platform [.NET Core](http://github.com/dotnet/core) command line toolchain. It contains the implementation of each command, the native packages for various supported platforms as well as documentation. -Preview 4 release - MSBuild based tools +RC 4 release - MSBuild based tools --------------------------------------- As was outlined in the ["Changes to project.json" blog post](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/), we have started work to move away from project.json to csproj and MSBuild. All the new `latest` releases from this repo (from `rel/1.0.0` branch) are MSBuild-enabled tools. -The current official release of the csproj-enabled CLI tools is **CLI Preview 4**. +The current official release of the csproj-enabled CLI tools is **CLI RC 4**. There are a couple of things to keep in mind: -* Preview 4 CLI bits are still **in development** so some rough edges are to be expected. -* Preview 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project or add a global.json file to your project to target preview2. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md). -* Preview 4 refers to the **CLI tools only** and does not cover Visual Studio, VS Code or Visual Studio for Mac. +* RC 4 CLI bits are still **in development** so some rough edges are to be expected. +* RC 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project or add a global.json file to your project to target preview2. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md). +* RC 4 refers to the **CLI tools only** and does not cover Visual Studio, VS Code or Visual Studio for Mac. * We welcome any and all issues that relate to MSBuild-based tools, so feel free to try them out and leave comments and file any bugs/problems. ### Download links From 50c10decf527216b3ba2a4bb60ba9e5df6014e88 Mon Sep 17 00:00:00 2001 From: Justin Goshi <jgoshi@microsoft.com> Date: Wed, 8 Feb 2017 00:20:04 -0800 Subject: [PATCH 06/40] Migrate compilationOptions --- .../ProjectReader.cs | 40 ++++++++++--------- .../GivenThatIWantToMigrateBuildOptions.cs | 17 ++++++++ 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/Microsoft.DotNet.Internal.ProjectModel/ProjectReader.cs b/src/Microsoft.DotNet.ProjectJsonMigration/Microsoft.DotNet.Internal.ProjectModel/ProjectReader.cs index 7a2778d9c..298766d64 100644 --- a/src/Microsoft.DotNet.ProjectJsonMigration/Microsoft.DotNet.Internal.ProjectModel/ProjectReader.cs +++ b/src/Microsoft.DotNet.ProjectJsonMigration/Microsoft.DotNet.Internal.ProjectModel/ProjectReader.cs @@ -591,25 +591,10 @@ namespace Microsoft.DotNet.Internal.ProjectModel var rawOptions = rawObject.Value<JToken>("buildOptions") as JObject; if (rawOptions == null) { - rawOptions = rawObject.Value<JToken>("compilationOptions") as JObject; - if (rawOptions == null) + return new CommonCompilerOptions { - return new CommonCompilerOptions - { - CompilerName = compilerName ?? "csc" - }; - } - - var lineInfo = (IJsonLineInfo)rawOptions; - - project.Diagnostics.Add( - new DiagnosticMessage( - ErrorCodes.DOTNET1015, - $"The 'compilationOptions' option is deprecated. Use 'buildOptions' instead.", - project.ProjectFilePath, - DiagnosticMessageSeverity.Warning, - lineInfo.LineNumber, - lineInfo.LinePosition)); + CompilerName = compilerName ?? "csc" + }; } var analyzerOptionsJson = rawOptions.Value<JToken>("analyzerOptions") as JObject; @@ -814,6 +799,9 @@ namespace Microsoft.DotNet.Internal.ProjectModel private static void AddProjectFilesDeprecationDiagnostics(JObject rawProject, Project project) { + var compilationOptionsWarning = "'buildOptions'"; + AddDeprecatedDiagnosticMessage(rawProject, project, "compilationOptions", compilationOptionsWarning); + var compileWarning = "'compile' in 'buildOptions'"; AddDeprecatedDiagnosticMessage(rawProject, project, "compile", compileWarning); AddDeprecatedDiagnosticMessage(rawProject, project, "compileExclude", compileWarning); @@ -870,6 +858,7 @@ namespace Microsoft.DotNet.Internal.ProjectModel private static void ConvertDeprecatedToSupportedFormat(JObject rawProject) { + ConvertToBuildOptions(rawProject); ConvertToBuildOptionsCompile(rawProject); ConvertToBuildOptionsEmbed(rawProject); ConvertToBuildOptionsCopyToOutput(rawProject); @@ -877,6 +866,21 @@ namespace Microsoft.DotNet.Internal.ProjectModel ConvertToPublishOptions(rawProject); } + private static void ConvertToBuildOptions(JObject rawProject) + { + var jpath = "buildOptions"; + if (AreDeprecatedOptionsIgnored(rawProject, jpath)) + { + return; + } + + var deprecatedValue = rawProject.Value<JToken>("compilationOptions"); + if (deprecatedValue != null) + { + rawProject["buildOptions"] = deprecatedValue.DeepClone(); + } + } + private static void ConvertToBuildOptionsCompile(JObject rawProject) { var jpath = "buildOptions.compile"; diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs index 03405bb14..ef8105572 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs @@ -16,6 +16,23 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests { public class GivenThatIWantToMigrateBuildOptions : TestBase { + [Fact] + public void MigratingDeprecatedCompilationOptionsWithEmitEntryPointPopulatesOutputTypeField() + { + var mockProj = RunBuildOptionsRuleOnPj(@" + { + ""compilationOptions"": { + ""emitEntryPoint"": ""true"" + }, + ""exclude"": [ + ""node_modules"" + ] + }"); + + mockProj.Properties.Count(p => p.Name == "OutputType").Should().Be(1); + mockProj.Properties.First(p => p.Name == "OutputType").Value.Should().Be("Exe"); + } + [Fact] public void SpecifiedDefaultPropertiesAreRemovedWhenTheyExistInTheCsprojTemplate() { From 6d492a9ab1fc94b03490e631ea2c31d76f6b659f Mon Sep 17 00:00:00 2001 From: Rohit Agrawal <ragrawal@microsoft.com> Date: Wed, 8 Feb 2017 08:25:30 -0800 Subject: [PATCH 07/40] Update Microsoft.DotNet.Cli.DependencyVersions.props --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index ead05d75c..a248cfe73 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -3,8 +3,8 @@ <PropertyGroup> <CLI_MSBuild_Version>15.1.0-preview-000545-01</CLI_MSBuild_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> - <CLI_NETSDK_Version>1.0.0-alpha-20170205-2</CLI_NETSDK_Version> - <CLI_NuGet_Version>4.0.0-rtm-2265</CLI_NuGet_Version> + <CLI_NETSDK_Version>1.0.0-alpha-20170207-4</CLI_NETSDK_Version> + <CLI_NuGet_Version>4.0.0-rtm-2275</CLI_NuGet_Version> <CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version> <CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version> <TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion> From 5e3f36833824cec59a0a72fb83efaafb419f058c Mon Sep 17 00:00:00 2001 From: Justin Goshi <jgoshi@microsoft.com> Date: Wed, 8 Feb 2017 14:26:14 -0800 Subject: [PATCH 08/40] Update the test --- .../Rules/GivenThatIWantToMigrateBuildOptions.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs index ef8105572..e4f24c6ac 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs @@ -31,6 +31,20 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests mockProj.Properties.Count(p => p.Name == "OutputType").Should().Be(1); mockProj.Properties.First(p => p.Name == "OutputType").Value.Should().Be("Exe"); + + mockProj.Items.Count(i => i.ItemType.Equals("Compile", StringComparison.Ordinal)) + .Should().Be(1); + mockProj.Items.Count(i => + i.ItemType.Equals("Compile", StringComparison.Ordinal) && + i.Remove.Equals("node_modules")) + .Should().Be(1); + + mockProj.Items.Count(i => i.ItemType.Equals("EmbeddedResource", StringComparison.Ordinal)) + .Should().Be(1); + mockProj.Items.Count(i => + i.ItemType.Equals("EmbeddedResource", StringComparison.Ordinal) && + i.Remove.Equals("node_modules")) + .Should().Be(1); } [Fact] From 35fc8c1d0e2f291e4199cb428c4fb9c37a34574d Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Wed, 8 Feb 2017 14:31:07 -0800 Subject: [PATCH 09/40] Step one of introducing a flag to drop the suffix out of our build versions. --- build/Microsoft.DotNet.Cli.Compile.targets | 4 +-- build/Microsoft.DotNet.Cli.Monikers.props | 2 +- build/Microsoft.DotNet.Cli.Prepare.targets | 18 ++++++------ build/Microsoft.DotNet.Cli.Test.targets | 1 - .../Microsoft.DotNet.Cli.Nupkg.targets | 3 +- build/test/TestPackageProjects.targets | 28 +++++++++---------- .../GenerateBuildVersionInfo.cs | 14 +--------- .../Utils/BuildVersion.cs | 13 --------- .../Utils/Version.cs | 4 +-- packaging/windows/clisdk/registrykeys.wxs | 2 +- 10 files changed, 31 insertions(+), 58 deletions(-) delete mode 100644 build_projects/shared-build-targets-utils/Utils/BuildVersion.cs diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets index effb2348c..fe9359a2b 100644 --- a/build/Microsoft.DotNet.Cli.Compile.targets +++ b/build/Microsoft.DotNet.Cli.Compile.targets @@ -115,7 +115,7 @@ <DotNetPublish ToolPath="%(Stage.DotnetDir)" Output="$(SdkOutputDirectory)" Configuration="$(Configuration)" - VersionSuffix="rc4-$(CommitCount)" + VersionSuffix="$(VersionSuffix)" ProjectPath="$(SrcDirectory)/redist/redist.csproj" MSBuildArgs="/p:GenerateRuntimeConfigurationFiles=true" /> @@ -123,7 +123,7 @@ <DotNetPublish ToolPath="%(Stage.DotnetDir)" Output="$(SdkOutputDirectory)/Roslyn" Configuration="$(Configuration)" - VersionSuffix="rc4-$(CommitCount)" + VersionSuffix="$(VersionSuffix)" ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" /> <!-- Corehostify Binaries --> diff --git a/build/Microsoft.DotNet.Cli.Monikers.props b/build/Microsoft.DotNet.Cli.Monikers.props index 10981406b..615cbc0c7 100644 --- a/build/Microsoft.DotNet.Cli.Monikers.props +++ b/build/Microsoft.DotNet.Cli.Monikers.props @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <SdkBrandName>Microsoft .NET Core 1.0.3 - SDK RC 4</SdkBrandName> + <SdkBrandName>Microsoft .NET Core 1.0.3 - SDK</SdkBrandName> <SharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</SharedFrameworkBrandName> <SharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</SharedHostBrandName> <HostFxrBrandName>Microsoft .NET Core 1.1.0 - Host FX Resolver</HostFxrBrandName> diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 5eb5af4b1..93a9d5897 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -68,16 +68,18 @@ <PropertyGroup> <CommitCount Condition=" '$(CommitCount)' == '' ">$(DefaultCommitCount)</CommitCount> - <SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> - <VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix> - <NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion> + <SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> + <SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</SimpleVersion> + + <VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix> + + <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion> + <NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion> + + <SdkVersion>$(NugetVersion)</SdkVersion> + <SdkNugetVersion>$(NugetVersion)</SdkNugetVersion> <VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge> - <SdkVersion>$(NugetVersion)</SdkVersion> - - <SdkNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-rc4-$(CommitCount)</SdkNugetVersion> - <ProjectModelNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-rc4-$(CommitCount)</ProjectModelNugetVersion> - <DependencyModelAndInternalAbstractionsNugetVersion>$(VersionMajor).$(VersionMinor).1-beta-$(CommitCount)</DependencyModelAndInternalAbstractionsNugetVersion> <ArchiveExtension Condition=" '$(OSName)' == 'win' ">.zip</ArchiveExtension> <ArchiveExtension Condition=" '$(OSName)' != 'win' ">.tar.gz</ArchiveExtension> diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index 2b85daa3e..c5322c5b5 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -59,7 +59,6 @@ DependsOnTargets="Init; SetupTestProjectData"> <PropertyGroup> - <TestPackageBuildVersionSuffix>$(CommitCount)</TestPackageBuildVersionSuffix> <TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir> <TestPackagesBuildDir>$(TestOutputDir)/packagesBuild/</TestPackagesBuildDir> <TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir> diff --git a/build/package/Microsoft.DotNet.Cli.Nupkg.targets b/build/package/Microsoft.DotNet.Cli.Nupkg.targets index 5fef716f2..4e57d0c41 100644 --- a/build/package/Microsoft.DotNet.Cli.Nupkg.targets +++ b/build/package/Microsoft.DotNet.Cli.Nupkg.targets @@ -4,7 +4,6 @@ <Target Name="SetupProjectsToPack" DependsOnTargets="Init"> <PropertyGroup> - <NupkgVersionSuffix>$(CommitCount)</NupkgVersionSuffix> <ProjectsSrcDirectory>$(RepoRoot)/src</ProjectsSrcDirectory> <PackagingBuildBasePath>$(Stage2CompilationDirectory)/forPackaging</PackagingBuildBasePath> <NupkgOutputDirectory>$(PackagesDirectory)</NupkgOutputDirectory> @@ -26,7 +25,7 @@ Output="$(NupkgOutputDirectory)" ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj" ToolPath="$(Stage0Directory)" - VersionSuffix="rc4-$(NupkgVersionSuffix)" + VersionSuffix="$(VersionSuffix)" Configuration="$(Configuration)" /> </Target> diff --git a/build/test/TestPackageProjects.targets b/build/test/TestPackageProjects.targets index a12580b82..4b7c98c80 100644 --- a/build/test/TestPackageProjects.targets +++ b/build/test/TestPackageProjects.targets @@ -22,8 +22,8 @@ <ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>$(CliVersionPrefix)-</VersionPrefix> - <VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>False</Clean> </BaseTestPackageProject> <BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils" @@ -32,8 +32,8 @@ <ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>$(CliVersionPrefix)-</VersionPrefix> - <VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>False</Clean> <MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs> </BaseTestPackageProject> @@ -42,8 +42,8 @@ <ProjectName>Microsoft.DotNet.InternalAbstractions.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>2.0.0-beta-</VersionPrefix> - <VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>2.0.0</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>False</Clean> </BaseTestPackageProject> <BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep" @@ -62,8 +62,8 @@ <ProjectName>dotnet-dependency-context-test.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>1.0.0-rc-</VersionPrefix> - <VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>True</Clean> </BaseTestPackageProject> <BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker"> @@ -71,8 +71,8 @@ <ProjectName>dotnet-dependency-tool-invoker.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>1.0.0-rc-</VersionPrefix> - <VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>True</Clean> </BaseTestPackageProject> <BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable" @@ -81,8 +81,8 @@ <ProjectName>dotnet-desktop-and-portable.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>1.0.0-rc-</VersionPrefix> - <VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>True</Clean> <MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs> </BaseTestPackageProject> @@ -93,8 +93,8 @@ <IsTool>True</IsTool> <IsMsbuild>True</IsMsbuild> <IsApplicable>$(DesktopAvailable)</IsApplicable> - <VersionPrefix>1.0.0-rc-</VersionPrefix> - <VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>True</Clean> <MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs> </BaseTestPackageProject> diff --git a/build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs b/build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs index 212eabc97..9e5c1d493 100644 --- a/build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs +++ b/build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs @@ -27,15 +27,6 @@ namespace Microsoft.DotNet.Cli.Build [Output] public string ReleaseSuffix { get; set; } - [Output] - public string VersionSuffix { get; set; } - - [Output] - public string SimpleVersion { get; set; } - - [Output] - public string NugetVersion { get; set; } - [Output] public string MsiVersion { get; set; } @@ -56,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Build var branchInfo = new BranchInfo(RepoRoot); - var buildVersion = new BuildVersion() + var buildVersion = new Version { Major = int.Parse(branchInfo.Entries["MAJOR_VERSION"]), Minor = int.Parse(branchInfo.Entries["MINOR_VERSION"]), @@ -70,9 +61,6 @@ namespace Microsoft.DotNet.Cli.Build VersionPatch = buildVersion.Patch; CommitCount = buildVersion.CommitCountString; ReleaseSuffix = buildVersion.ReleaseSuffix; - VersionSuffix = buildVersion.VersionSuffix; - SimpleVersion = buildVersion.SimpleVersion; - NugetVersion = buildVersion.NuGetVersion; MsiVersion = buildVersion.GenerateMsiVersion(); VersionBadgeMoniker = Monikers.GetBadgeMoniker(); Channel = branchInfo.Entries["CHANNEL"]; diff --git a/build_projects/shared-build-targets-utils/Utils/BuildVersion.cs b/build_projects/shared-build-targets-utils/Utils/BuildVersion.cs deleted file mode 100644 index 3e526f00c..000000000 --- a/build_projects/shared-build-targets-utils/Utils/BuildVersion.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; - -namespace Microsoft.DotNet.Cli.Build -{ - public class BuildVersion : Version - { - public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}"; - public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}"; - public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}"; - public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc4-{CommitCountString}"; - public string ProductionVersion => $"{Major}.{Minor}.{Patch}"; - } -} diff --git a/build_projects/shared-build-targets-utils/Utils/Version.cs b/build_projects/shared-build-targets-utils/Utils/Version.cs index 7bade35d6..def18eda2 100644 --- a/build_projects/shared-build-targets-utils/Utils/Version.cs +++ b/build_projects/shared-build-targets-utils/Utils/Version.cs @@ -1,8 +1,6 @@ -using System.Collections.Generic; - namespace Microsoft.DotNet.Cli.Build { - public abstract class Version + public class Version { public virtual int Major { get; set; } public virtual int Minor { get; set; } diff --git a/packaging/windows/clisdk/registrykeys.wxs b/packaging/windows/clisdk/registrykeys.wxs index 6da9817a3..44e0def3e 100644 --- a/packaging/windows/clisdk/registrykeys.wxs +++ b/packaging/windows/clisdk/registrykeys.wxs @@ -10,7 +10,7 @@ </Component> <Component Id="SetupRegistry_x86_RC2_Compat_Key" Directory="TARGETDIR" Win64="no"> <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sdk"> - <RegistryValue Action="write" Name="1.0.0-rc4" Type="integer" Value="1" KeyPath="yes"/> + <RegistryValue Action="write" Name="1.0.0" Type="integer" Value="1" KeyPath="yes"/> </RegistryKey> </Component> </ComponentGroup> From d373ce8911ea29e6be020dc4a023234ad0b00102 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Wed, 8 Feb 2017 16:53:01 -0800 Subject: [PATCH 10/40] Enabling publish with drop suffix to still publish to a suffix based folder in blob to avoid conflicts. --- build/Microsoft.DotNet.Cli.Prepare.targets | 4 +++- build/Microsoft.DotNet.Cli.Publish.targets | 6 +++--- build/publish/FinishBuild.targets | 6 +++--- packaging/windows/clisdk/registrykeys.wxs | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 93a9d5897..d5dcd5876 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -73,7 +73,9 @@ <VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix> - <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion> + <FullNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion> + + <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion> <NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion> <SdkVersion>$(NugetVersion)</SdkVersion> diff --git a/build/Microsoft.DotNet.Cli.Publish.targets b/build/Microsoft.DotNet.Cli.Publish.targets index 9c66a492c..37ae1e48e 100644 --- a/build/Microsoft.DotNet.Cli.Publish.targets +++ b/build/Microsoft.DotNet.Cli.Publish.targets @@ -47,7 +47,7 @@ <ItemGroup> <ForPublishing> - <RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> + <RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> </ForPublishing> </ItemGroup> </Target> @@ -62,7 +62,7 @@ <SdkInstallerFileItemGroup Include="$(SdkInstallerFile)" /> </ItemGroup> <PropertyGroup> - <SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(NugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl> + <SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl> <DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile> <DebianRevisionNumber>1</DebianRevisionNumber> @@ -89,7 +89,7 @@ <ItemGroup> <CliVersionBadgeToUpload> - <RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> + <RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> </CliVersionBadgeToUpload> </ItemGroup> diff --git a/build/publish/FinishBuild.targets b/build/publish/FinishBuild.targets index 307e23d30..206e131f2 100644 --- a/build/publish/FinishBuild.targets +++ b/build/publish/FinishBuild.targets @@ -8,7 +8,7 @@ <CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)" AccountName="$(ArtifactCloudDropAccountName)" ContainerName="$(ArtifactContainerName)" - NugetVersion="$(NugetVersion)"> + NugetVersion="$(FullNugetVersion)"> <Output TaskParameter="HaveAllBuildsPublished" PropertyName="HaveAllBuildsPublished" /> </CheckIfAllBuildsHavePublished> </Target> @@ -18,14 +18,14 @@ <CopyBlobsToLatest AccountName="$(ArtifactCloudDropAccountName)" AccountKey="$(ArtifactCloudDropAccessToken)" ContainerName="$(ArtifactContainerName)" - NugetVersion="$(NugetVersion)" + NugetVersion="$(FullNugetVersion)" Channel="$(Channel)" CommitHash="$(CommitHash)" /> <CopyBlobsToLatest AccountName="$(ChecksumCloudDropAccountName)" AccountKey="$(ChecksumCloudDropAccessToken)" ContainerName="$(ChecksumContainerName)" - NugetVersion="$(NugetVersion)" + NugetVersion="$(FullNugetVersion)" Channel="$(Channel)" CommitHash="$(CommitHash)" /> diff --git a/packaging/windows/clisdk/registrykeys.wxs b/packaging/windows/clisdk/registrykeys.wxs index 44e0def3e..6da9817a3 100644 --- a/packaging/windows/clisdk/registrykeys.wxs +++ b/packaging/windows/clisdk/registrykeys.wxs @@ -10,7 +10,7 @@ </Component> <Component Id="SetupRegistry_x86_RC2_Compat_Key" Directory="TARGETDIR" Win64="no"> <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sdk"> - <RegistryValue Action="write" Name="1.0.0" Type="integer" Value="1" KeyPath="yes"/> + <RegistryValue Action="write" Name="1.0.0-rc4" Type="integer" Value="1" KeyPath="yes"/> </RegistryKey> </Component> </ComponentGroup> From 81a94c0902f6e79822209e0e0709583dc801dc96 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Thu, 9 Feb 2017 15:33:00 -0800 Subject: [PATCH 11/40] Enabling publishing the nupkgs produced by the CLI to blob storage and hooking up DropSuffix to the VS targeted nupkg of the CLI. --- build/Microsoft.DotNet.Cli.Prepare.targets | 3 +++ build/Microsoft.DotNet.Cli.Publish.targets | 1 + build/package/Microsoft.DotNet.Cli.Installer.MSI.targets | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index d5dcd5876..95462ad38 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -78,6 +78,9 @@ <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion> <NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion> + <NugetVersionToUseWithVS Condition=" '$(DropSuffix)' == '' ">$(NugetVersion)</NugetVersionToUseWithVS> + <NugetVersionToUseWithVS Condition=" '$(NugetVersionToUseWithVS)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-final-$(CommitCount)</NugetVersionToUseWithVS> + <SdkVersion>$(NugetVersion)</SdkVersion> <SdkNugetVersion>$(NugetVersion)</SdkNugetVersion> diff --git a/build/Microsoft.DotNet.Cli.Publish.targets b/build/Microsoft.DotNet.Cli.Publish.targets index 37ae1e48e..8ebfcba7a 100644 --- a/build/Microsoft.DotNet.Cli.Publish.targets +++ b/build/Microsoft.DotNet.Cli.Publish.targets @@ -43,6 +43,7 @@ <ItemGroup> <ForPublishing Include="@(GeneratedInstallers)" /> <ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" /> + <ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" 'PUBLISH_NUPKG_TO_AZURE_BLOB' != '' " /> </ItemGroup> <ItemGroup> diff --git a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets index c1d1474d3..88d7b8e06 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets @@ -23,7 +23,7 @@ <SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile> <CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile> <SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile> - <SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(NugetVersion).nupkg</SdkInstallerNupkgFile> + <SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(NugetVersionToUseWithVS).nupkg</SdkInstallerNupkgFile> </PropertyGroup> <!-- Generate SDK MSI Inputs --> @@ -134,7 +134,7 @@ <Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) '$(CombinedFrameworkSdkHostInstallerFile)' - '$(NugetVersion)' + '$(NugetVersionToUseWithVS)' '$(SdkInstallerNuspecFile)' '$(SdkInstallerNupkgFile)'" /> </Target> From 1c896d440260d1d8ba44b509b5227bd9b9d565d3 Mon Sep 17 00:00:00 2001 From: Livar <licavalc@microsoft.com> Date: Thu, 9 Feb 2017 22:31:46 -0800 Subject: [PATCH 12/40] Adding release suffix as a modified parameter of the build and removing NugetVersionForVS. we don't need that concept. --- build/Microsoft.DotNet.Cli.Prepare.targets | 6 ++---- build/package/Microsoft.DotNet.Cli.Installer.MSI.targets | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 95462ad38..74ab8083a 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -58,7 +58,7 @@ <Output TaskParameter="VersionMinor" PropertyName="VersionMinor" /> <Output TaskParameter="VersionPatch" PropertyName="VersionPatch" /> <Output TaskParameter="CommitCount" PropertyName="DefaultCommitCount" /> - <Output TaskParameter="ReleaseSuffix" PropertyName="ReleaseSuffix" /> + <Output TaskParameter="ReleaseSuffix" PropertyName="DefaultReleaseSuffix" /> <Output TaskParameter="MsiVersion" PropertyName="MsiVersion" /> <Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" /> <Output TaskParameter="Channel" PropertyName="Channel" /> @@ -67,6 +67,7 @@ <PropertyGroup> <CommitCount Condition=" '$(CommitCount)' == '' ">$(DefaultCommitCount)</CommitCount> + <ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">$(DefaultReleaseSuffix)</ReleaseSuffix> <SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> <SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</SimpleVersion> @@ -78,9 +79,6 @@ <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion> <NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion> - <NugetVersionToUseWithVS Condition=" '$(DropSuffix)' == '' ">$(NugetVersion)</NugetVersionToUseWithVS> - <NugetVersionToUseWithVS Condition=" '$(NugetVersionToUseWithVS)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-final-$(CommitCount)</NugetVersionToUseWithVS> - <SdkVersion>$(NugetVersion)</SdkVersion> <SdkNugetVersion>$(NugetVersion)</SdkNugetVersion> diff --git a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets index 88d7b8e06..b75e89f3f 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets @@ -23,7 +23,7 @@ <SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile> <CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile> <SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile> - <SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(NugetVersionToUseWithVS).nupkg</SdkInstallerNupkgFile> + <SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile> </PropertyGroup> <!-- Generate SDK MSI Inputs --> @@ -134,7 +134,7 @@ <Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) '$(CombinedFrameworkSdkHostInstallerFile)' - '$(NugetVersionToUseWithVS)' + '$(FullNugetVersion)' '$(SdkInstallerNuspecFile)' '$(SdkInstallerNupkgFile)'" /> </Target> From 654f835d5088bc052af1b2db688c604860f715ca Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic <zlakne@microsoft.com> Date: Fri, 10 Feb 2017 00:01:56 -0800 Subject: [PATCH 13/40] Update README.md Change the links on the dotnet/README.md to point aka.ms/dotnet-* set of links. --- src/dotnet/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dotnet/README.md b/src/dotnet/README.md index d947deb10..5729f3039 100644 --- a/src/dotnet/README.md +++ b/src/dotnet/README.md @@ -39,19 +39,19 @@ Prints out a short help and a list of current commands. The following commands exist for dotnet: -* [dotnet-new](commands/dotnet-new/README.md) +* [dotnet-new](https://aka.ms/dotnet-new) * Initializes a C# or F# console application project. -* [dotnet-restore](commands/dotnet-restore/README.md) +* [dotnet-restore](https://aka.ms/dotnet-restore) * Restores the dependencies for a given application. -* [dotnet-build](commands/dotnet-build/README.md) +* [dotnet-build](https://aka.ms/dotnet-build) * Builds a .NET Core application. -* [dotnet-publish](commands/dotnet-publish/README.md) +* [dotnet-publish](https://aka.ms/dotnet-publish) * Publishes a .NET portable or self-contained application. -* [dotnet-run](commands/dotnet-run/README.md) +* [dotnet-run](https://aka.ms/dotnet-run) * Runs the application from source. -* [dotnet-test](commands/dotnet-test/README.md) +* [dotnet-test](https://aka.ms/dotnet-test) * Runs tests using a test runner specified in the project.json. -* [dotnet-pack](commands/dotnet-pack/README.md) +* [dotnet-pack](https://aka.ms/dotnet-pack) * Creates a NuGet package of your code. ## EXAMPLES From 4621c1a6ec800eab35120f1b2418ca3498e18ae3 Mon Sep 17 00:00:00 2001 From: Arun Mahapatra <armahapa@microsoft.com> Date: Fri, 10 Feb 2017 21:58:34 +0530 Subject: [PATCH 14/40] Insert TestPlatform v15.0.0-preview-20170210-02. --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index a248cfe73..7c7e9aadf 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -6,7 +6,7 @@ <CLI_NETSDK_Version>1.0.0-alpha-20170207-4</CLI_NETSDK_Version> <CLI_NuGet_Version>4.0.0-rtm-2275</CLI_NuGet_Version> <CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version> - <CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version> + <CLI_TestPlatform_Version>15.0.0-preview-20170210-02</CLI_TestPlatform_Version> <TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion> <TemplateEngineTemplateVersion>1.0.0-beta1-20170206-112</TemplateEngineTemplateVersion> </PropertyGroup> From 167e2da39864e5925cdb9647519d7dd7e757edc2 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Fri, 10 Feb 2017 16:13:15 -0800 Subject: [PATCH 15/40] Updating msbuild to 15.1.0-preview-000545-01. --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index a248cfe73..a946e2742 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <CLI_MSBuild_Version>15.1.0-preview-000545-01</CLI_MSBuild_Version> + <CLI_MSBuild_Version>15.1.546</CLI_MSBuild_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> <CLI_NETSDK_Version>1.0.0-alpha-20170207-4</CLI_NETSDK_Version> <CLI_NuGet_Version>4.0.0-rtm-2275</CLI_NuGet_Version> From 1d61bf97edbc1fb4231efa66c51398a269b7dfed Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Fri, 10 Feb 2017 15:12:52 -0800 Subject: [PATCH 16/40] Updated the Shared Framework to 1.1.1 and 1.0.4. --- .../dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj | 2 +- .../dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj | 2 +- .../dotnet-prefercliruntime/dotnet-prefercliruntime.csproj | 2 +- .../AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj | 2 +- .../TestProjects/AppWithDirectDep/AppWithDirectDep.csproj | 2 +- build.proj | 6 +++--- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 ++ build/Microsoft.DotNet.Cli.Prepare.targets | 2 +- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 2 +- .../Microsoft.DotNet.Cli.Utils.csproj | 2 +- src/dotnet-archive/dotnet-archive.csproj | 2 +- src/dotnet/dotnet.csproj | 4 ++-- src/redist/redist.csproj | 2 +- src/tool_msbuild/tool_msbuild.csproj | 2 +- src/tool_nuget/tool_nuget.csproj | 2 +- src/tool_roslyn/tool_roslyn.csproj | 4 ++-- test/ArgumentForwardingTests/ArgumentForwardingTests.csproj | 4 ++-- test/ArgumentsReflector/ArgumentsReflector.csproj | 2 +- test/EndToEnd/EndToEnd.csproj | 4 ++-- .../Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj | 2 +- .../GivenAProjectToolsCommandResolver.cs | 2 +- .../Microsoft.DotNet.Cli.Utils.Tests.csproj | 4 ++-- .../Microsoft.DotNet.Configurer.UnitTests.csproj | 2 +- .../Microsoft.DotNet.ProjectJsonMigration.Tests.csproj | 2 +- .../Microsoft.DotNet.Tools.Tests.Utilities.csproj | 4 ++-- test/Performance/Performance.csproj | 2 +- test/binding-redirects.Tests/binding-redirects.Tests.csproj | 4 ++-- test/crossgen.Tests/crossgen.Tests.csproj | 2 +- .../dotnet-add-package.Tests.csproj | 2 +- .../dotnet-add-reference.Tests.csproj | 2 +- test/dotnet-build.Tests/dotnet-build.Tests.csproj | 2 +- test/dotnet-help.Tests/dotnet-help.Tests.csproj | 2 +- .../dotnet-list-reference.Tests.csproj | 2 +- test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj | 2 +- test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj | 2 +- test/dotnet-new.Tests/dotnet-new.Tests.csproj | 2 +- test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj | 2 +- test/dotnet-pack.Tests/dotnet-pack.Tests.csproj | 2 +- test/dotnet-publish.Tests/dotnet-publish.Tests.csproj | 2 +- .../dotnet-remove-reference.Tests.csproj | 2 +- test/dotnet-restore.Tests/dotnet-restore.Tests.csproj | 4 ++-- test/dotnet-run.Tests/dotnet-run.Tests.csproj | 2 +- test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj | 2 +- test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj | 2 +- test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj | 2 +- test/dotnet-test.Tests/dotnet-test.Tests.csproj | 2 +- test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj | 2 +- test/dotnet.Tests/dotnet.Tests.csproj | 4 ++-- .../msbuild.IntegrationTests.csproj | 2 +- tools/Archiver/Archiver.csproj | 2 +- .../MigrationDefaultsConstructor.csproj | 2 +- 51 files changed, 63 insertions(+), 61 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj index c1ec38777..12379b76a 100644 --- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj +++ b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj @@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj index 510f6a431..31099ea7a 100644 --- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj +++ b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj @@ -9,7 +9,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj index 5c2bcc31d..5a717573e 100644 --- a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj +++ b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj @@ -17,7 +17,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj index 9c9243987..4cfdc4a2d 100755 --- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj @@ -6,7 +6,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="dotnet-hello"> <Version>1.0.0</Version> diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj index 1f2bc2278..6512f4883 100755 --- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj @@ -8,7 +8,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="dotnet-hello"> <Version>1.0.0</Version> diff --git a/build.proj b/build.proj index b03807f06..2a1233295 100644 --- a/build.proj +++ b/build.proj @@ -19,12 +19,12 @@ <CoreSetupChannel>release/1.1.0</CoreSetupChannel> <SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName> - <SharedFrameworkVersion>1.1.0</SharedFrameworkVersion> + <SharedFrameworkVersion>1.1.1</SharedFrameworkVersion> <SharedHostVersion>1.1.0</SharedHostVersion> <HostFxrVersion>1.1.0</HostFxrVersion> - <CoreCLRVersion>1.1.0</CoreCLRVersion> - <JitVersion>1.1.0</JitVersion> + <CoreCLRVersion>1.1.1</CoreCLRVersion> + <JitVersion>1.1.1</JitVersion> <ExeExtension>.exe</ExeExtension> <ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension> diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index a946e2742..7e316701a 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> + <CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion> <CLI_MSBuild_Version>15.1.546</CLI_MSBuild_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> <CLI_NETSDK_Version>1.0.0-alpha-20170207-4</CLI_NETSDK_Version> @@ -9,5 +10,6 @@ <CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version> <TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion> <TemplateEngineTemplateVersion>1.0.0-beta1-20170206-112</TemplateEngineTemplateVersion> + <PlatformAbstractionsVersion>1.1.1</PlatformAbstractionsVersion> </PropertyGroup> </Project> diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 5eb5af4b1..b1ae16bfd 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -125,7 +125,7 @@ <!-- Additional Shared Framework to be installed --> <PropertyGroup> <AdditionalCoreSetupChannel>preview</AdditionalCoreSetupChannel> - <AdditionalSharedFrameworkVersion>1.0.3</AdditionalSharedFrameworkVersion> + <AdditionalSharedFrameworkVersion>1.0.4</AdditionalSharedFrameworkVersion> <AdditionalSharedHostVersion>1.0.1</AdditionalSharedHostVersion> <AdditionalHostFxrVersion>1.0.1</AdditionalHostFxrVersion> diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index e1ed4996a..5f351ac28 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -17,7 +17,7 @@ <Version>1.6.0</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index 53f8615de..95539171e 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -15,7 +15,7 @@ <Version>1.0.1-beta-000933</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> <PackageReference Include="NuGet.Versioning"> <Version>$(CLI_NuGet_Version)</Version> diff --git a/src/dotnet-archive/dotnet-archive.csproj b/src/dotnet-archive/dotnet-archive.csproj index 3bf1aba42..d39246d0a 100644 --- a/src/dotnet-archive/dotnet-archive.csproj +++ b/src/dotnet-archive/dotnet-archive.csproj @@ -13,7 +13,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index 915e1a36b..8b33ceb65 100755 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -41,7 +41,7 @@ <Version>2.0.0</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> @@ -69,7 +69,7 @@ <Version>$(CLI_MSBuild_Version)</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" /> <PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" /> diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c74807583..f769e28e3 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -9,7 +9,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/src/tool_msbuild/tool_msbuild.csproj b/src/tool_msbuild/tool_msbuild.csproj index 006bbeec2..3e6c6108c 100644 --- a/src/tool_msbuild/tool_msbuild.csproj +++ b/src/tool_msbuild/tool_msbuild.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/src/tool_nuget/tool_nuget.csproj b/src/tool_nuget/tool_nuget.csproj index 163953ae9..807c64d41 100644 --- a/src/tool_nuget/tool_nuget.csproj +++ b/src/tool_nuget/tool_nuget.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="NuGet.CommandLine.XPlat"> <Version>$(CLI_NuGet_Version)</Version> diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index d02092146..367fdaba6 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -8,11 +8,11 @@ <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.0" /> + <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" /> <PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" Version="$(CLI_Roslyn_Version)" /> <PackageReference Include="Microsoft.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" /> - <PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.4.0" /> + <PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.4.1" /> </ItemGroup> <ItemGroup> diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj index 47b35224f..c960959b2 100644 --- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj +++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> @@ -42,7 +42,7 @@ <Version>2.2.0-beta4-build3444</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> </ItemGroup> diff --git a/test/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj index 85e00819d..86929d431 100644 --- a/test/ArgumentsReflector/ArgumentsReflector.csproj +++ b/test/ArgumentsReflector/ArgumentsReflector.csproj @@ -17,7 +17,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.CodeAnalysis.CSharp"> <Version>$(CLI_Roslyn_Version)</Version> diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj index 07404de4c..cf82dfe98 100644 --- a/test/EndToEnd/EndToEnd.csproj +++ b/test/EndToEnd/EndToEnd.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> @@ -52,7 +52,7 @@ <Version>1.0.0-prerelease-00206</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> </ItemGroup> diff --git a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj index 339fbd222..ee2b580e0 100644 --- a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj @@ -21,7 +21,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.NET.Test.Sdk"> <Version>$(CLI_TestPlatform_Version)</Version> diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index be5c756b6..7602d42a5 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -282,7 +282,7 @@ namespace Microsoft.DotNet.Tests result.Should().NotBeNull(); - result.Args.Should().Contain("--fx-version 1.1.0"); + result.Args.Should().Contain("--fx-version 1.1.1"); } [Fact] diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj index 9e1e3201d..6012cbae8 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj @@ -48,7 +48,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> @@ -75,7 +75,7 @@ <Version>2.2.0-beta4-build3444</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj index 793b249b9..43e3a85da 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj +++ b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj index 0b76dd001..bec7acb8c 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj @@ -44,7 +44,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj index 3f4dfe997..624ba4138 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj @@ -24,7 +24,7 @@ <Version>4.18.0</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build3444</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> </ItemGroup> <ItemGroup Condition=" '$(TargetFramework)' == 'net46' "> diff --git a/test/Performance/Performance.csproj b/test/Performance/Performance.csproj index 7c295a2be..0db2ea215 100644 --- a/test/Performance/Performance.csproj +++ b/test/Performance/Performance.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj index 5e1b681d2..bb05cdb41 100644 --- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj +++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj @@ -13,10 +13,10 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.0" /> + <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" /> <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" /> - <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="1.1.0" /> + <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" /> </ItemGroup> </Project> diff --git a/test/crossgen.Tests/crossgen.Tests.csproj b/test/crossgen.Tests/crossgen.Tests.csproj index c5d314cde..b261b6006 100644 --- a/test/crossgen.Tests/crossgen.Tests.csproj +++ b/test/crossgen.Tests/crossgen.Tests.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj index 63c5eff1c..bacf9a867 100644 --- a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj +++ b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj @@ -17,7 +17,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.0" /> + <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" /> <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" /> diff --git a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj index d7072a465..5583624ce 100644 --- a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj +++ b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-build.Tests/dotnet-build.Tests.csproj b/test/dotnet-build.Tests/dotnet-build.Tests.csproj index 10a181763..5305d9b89 100644 --- a/test/dotnet-build.Tests/dotnet-build.Tests.csproj +++ b/test/dotnet-build.Tests/dotnet-build.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-help.Tests/dotnet-help.Tests.csproj b/test/dotnet-help.Tests/dotnet-help.Tests.csproj index 0b2aea8f7..ce66bb27b 100644 --- a/test/dotnet-help.Tests/dotnet-help.Tests.csproj +++ b/test/dotnet-help.Tests/dotnet-help.Tests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj index 4fbc41e22..1784cb91b 100644 --- a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj +++ b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj index 64e43d38a..b47a90d92 100644 --- a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj +++ b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj @@ -48,7 +48,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj index a601acd01..6a0161598 100644 --- a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj +++ b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.1.1</Version> diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj index fc811a75c..938815ca6 100644 --- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj index b67766466..2a867a0fc 100644 --- a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj +++ b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj index b6d0698e3..a32269964 100644 --- a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj +++ b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj index 23daaa675..f791bdbd9 100644 --- a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj +++ b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj @@ -42,7 +42,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj index a339974dd..932a5c975 100644 --- a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj +++ b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj index 2cc814fb5..40890b935 100644 --- a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj +++ b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> @@ -55,7 +55,7 @@ <Version>2.2.0-beta4-build3444</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> <PackageReference Include="FluentAssertions"> <Version>4.18.0</Version> diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj index 4b3dece00..c726786d9 100644 --- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj +++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj index 29025c38a..5c7016d70 100644 --- a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj +++ b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj index 6dc24ff30..dd06fa7e6 100644 --- a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj +++ b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj index 5e062c352..b7e10b39a 100644 --- a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj +++ b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-test.Tests/dotnet-test.Tests.csproj b/test/dotnet-test.Tests/dotnet-test.Tests.csproj index aa68a2b2b..e3aec204f 100644 --- a/test/dotnet-test.Tests/dotnet-test.Tests.csproj +++ b/test/dotnet-test.Tests/dotnet-test.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj index 99ab8dfcc..31a3ddbdc 100644 --- a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj +++ b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index afde5c00a..2ea831632 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -60,7 +60,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> @@ -72,7 +72,7 @@ <Version>1.0.0-prerelease-00206</Version> </PackageReference> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions"> - <Version>1.1.0</Version> + <Version>$(PlatformAbstractionsVersion)</Version> </PackageReference> </ItemGroup> diff --git a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj index c6adb0cd5..05bea77b1 100644 --- a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj +++ b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/tools/Archiver/Archiver.csproj b/tools/Archiver/Archiver.csproj index d8cb679dc..02242cee4 100644 --- a/tools/Archiver/Archiver.csproj +++ b/tools/Archiver/Archiver.csproj @@ -16,7 +16,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> diff --git a/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj b/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj index 090b114cd..0eb0880f4 100644 --- a/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj +++ b/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj @@ -13,7 +13,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <ProjectReference Include="..\..\src\dotnet\dotnet.csproj" /> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.0</Version> + <Version>1.1.1</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> From 9f2ca9989c08e1d8acb8606321c9aafb64fcf812 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Fri, 10 Feb 2017 15:55:09 -0800 Subject: [PATCH 17/40] Introducing a in DependencyVersions to facilitate these updates in the future. Also aligns with master. --- .../TestPackages/ToolWithOutputName/ToolWithOutputName.csproj | 2 +- .../dotnet-dependency-context-test.csproj | 2 +- .../dotnet-dependency-tool-invoker.csproj | 2 +- .../dotnet-desktop-and-portable.csproj | 2 +- .../dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj | 4 +++- .../dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj | 4 +++- .../TestPackages/dotnet-portable/dotnet-portable.csproj | 4 +++- .../dotnet-prefercliruntime/dotnet-prefercliruntime.csproj | 4 +++- .../AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj | 2 +- .../TestProjects/AppWithDirectDep/AppWithDirectDep.csproj | 2 +- src/dotnet-archive/dotnet-archive.csproj | 2 +- src/dotnet/dotnet.csproj | 2 +- src/redist/redist.csproj | 2 +- src/tool_msbuild/tool_msbuild.csproj | 2 +- src/tool_nuget/tool_nuget.csproj | 2 +- src/tool_roslyn/tool_roslyn.csproj | 2 +- test/ArgumentForwardingTests/ArgumentForwardingTests.csproj | 2 +- test/ArgumentsReflector/ArgumentsReflector.csproj | 2 +- test/EndToEnd/EndToEnd.csproj | 2 +- .../Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj | 2 +- .../Microsoft.DotNet.Cli.Utils.Tests.csproj | 2 +- .../Microsoft.DotNet.Configurer.UnitTests.csproj | 2 +- .../Microsoft.DotNet.ProjectJsonMigration.Tests.csproj | 2 +- .../Microsoft.DotNet.Tools.Tests.Utilities.csproj | 2 +- test/Performance/Performance.csproj | 2 +- test/binding-redirects.Tests/binding-redirects.Tests.csproj | 2 +- test/crossgen.Tests/crossgen.Tests.csproj | 2 +- test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj | 2 +- .../dotnet-add-reference.Tests.csproj | 2 +- test/dotnet-build.Tests/dotnet-build.Tests.csproj | 2 +- test/dotnet-help.Tests/dotnet-help.Tests.csproj | 2 +- .../dotnet-list-reference.Tests.csproj | 2 +- test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj | 2 +- test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj | 2 +- test/dotnet-new.Tests/dotnet-new.Tests.csproj | 2 +- test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj | 2 +- test/dotnet-pack.Tests/dotnet-pack.Tests.csproj | 2 +- test/dotnet-publish.Tests/dotnet-publish.Tests.csproj | 2 +- .../dotnet-remove-reference.Tests.csproj | 2 +- test/dotnet-restore.Tests/dotnet-restore.Tests.csproj | 2 +- test/dotnet-run.Tests/dotnet-run.Tests.csproj | 2 +- test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj | 2 +- test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj | 2 +- test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj | 2 +- test/dotnet-test.Tests/dotnet-test.Tests.csproj | 2 +- test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj | 2 +- test/dotnet.Tests/dotnet.Tests.csproj | 2 +- test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj | 2 +- tools/Archiver/Archiver.csproj | 2 +- .../MigrationDefaultsConstructor.csproj | 2 +- 50 files changed, 58 insertions(+), 50 deletions(-) diff --git a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj b/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj index 56cee9233..59a2ee3db 100644 --- a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj +++ b/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj @@ -14,7 +14,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.0.3</Version> + <Version>1.0.4</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj b/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj index 241f2d9ce..95d254ef9 100644 --- a/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj +++ b/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj @@ -15,7 +15,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.0.3</Version> + <Version>1.0.4</Version> </PackageReference> <PackageReference Include="Microsoft.Extensions.DependencyModel"> <Version>1.0.1-beta-000933</Version> diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj index 61ab7e04f..627218965 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj @@ -23,7 +23,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.0.3</Version> + <Version>1.0.4</Version> </PackageReference> <PackageReference Include="NuGet.Frameworks"> <Version>$(CLI_NuGet_Version)</Version> diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj b/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj index 11e93e15a..41da0203f 100644 --- a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj +++ b/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj @@ -15,7 +15,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.0.3</Version> + <Version>1.0.4</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj index 12379b76a..67c8c63cf 100644 --- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj +++ b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj @@ -1,4 +1,6 @@ <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" /> + <PropertyGroup> <TargetFramework>netcoreapp1.1</TargetFramework> <AssemblyName>dotnet-hello</AssemblyName> @@ -8,7 +10,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj index 31099ea7a..ba385070d 100644 --- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj +++ b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj @@ -1,4 +1,6 @@ <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" /> + <PropertyGroup> <VersionPrefix>2.0.0</VersionPrefix> <TargetFramework>netcoreapp1.1</TargetFramework> @@ -9,7 +11,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj index b341aac64..65e89e284 100644 --- a/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj +++ b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj @@ -1,4 +1,6 @@ <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" /> + <PropertyGroup> <TargetFramework>netcoreapp1.0</TargetFramework> <AssemblyName>dotnet-portable</AssemblyName> @@ -13,7 +15,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.0.3</Version> + <Version>1.0.4</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj index 5a717573e..5ac0d94d0 100644 --- a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj +++ b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj @@ -1,4 +1,6 @@ <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" /> + <PropertyGroup> <TargetFramework>netcoreapp1.0</TargetFramework> <OutputType>Exe</OutputType> @@ -17,7 +19,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> </ItemGroup> diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj index 4cfdc4a2d..eb4dbed83 100755 --- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj @@ -6,7 +6,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="dotnet-hello"> <Version>1.0.0</Version> diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj index 6512f4883..7172ce432 100755 --- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj @@ -8,7 +8,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="dotnet-hello"> <Version>1.0.0</Version> diff --git a/src/dotnet-archive/dotnet-archive.csproj b/src/dotnet-archive/dotnet-archive.csproj index d39246d0a..1c5736cc8 100644 --- a/src/dotnet-archive/dotnet-archive.csproj +++ b/src/dotnet-archive/dotnet-archive.csproj @@ -13,7 +13,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index 8b33ceb65..7356a2e8b 100755 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -41,7 +41,7 @@ <Version>2.0.0</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index f769e28e3..d9a4fa8d1 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -9,7 +9,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/src/tool_msbuild/tool_msbuild.csproj b/src/tool_msbuild/tool_msbuild.csproj index 3e6c6108c..d0d1c3f5d 100644 --- a/src/tool_msbuild/tool_msbuild.csproj +++ b/src/tool_msbuild/tool_msbuild.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/src/tool_nuget/tool_nuget.csproj b/src/tool_nuget/tool_nuget.csproj index 807c64d41..d276bb7de 100644 --- a/src/tool_nuget/tool_nuget.csproj +++ b/src/tool_nuget/tool_nuget.csproj @@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="NuGet.CommandLine.XPlat"> <Version>$(CLI_NuGet_Version)</Version> diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index 367fdaba6..69dbd987b 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -8,7 +8,7 @@ <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> + <PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" /> <PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" Version="$(CLI_Roslyn_Version)" /> <PackageReference Include="Microsoft.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" /> diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj index c960959b2..888fe6042 100644 --- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj +++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj index 86929d431..a3fd3f6c4 100644 --- a/test/ArgumentsReflector/ArgumentsReflector.csproj +++ b/test/ArgumentsReflector/ArgumentsReflector.csproj @@ -17,7 +17,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.CodeAnalysis.CSharp"> <Version>$(CLI_Roslyn_Version)</Version> diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj index cf82dfe98..7ca95ba8c 100644 --- a/test/EndToEnd/EndToEnd.csproj +++ b/test/EndToEnd/EndToEnd.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj index ee2b580e0..a9b8cb2c6 100644 --- a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj @@ -21,7 +21,7 @@ <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.NET.Test.Sdk"> <Version>$(CLI_TestPlatform_Version)</Version> diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj index 6012cbae8..1d75acc20 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj @@ -48,7 +48,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj index 43e3a85da..f693092a6 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj +++ b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Diagnostics.TraceSource"> <Version>4.3.0</Version> diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj index bec7acb8c..0c6dd246d 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj @@ -44,7 +44,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj index 624ba4138..7a97523be 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj @@ -24,7 +24,7 @@ <Version>4.18.0</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/Performance/Performance.csproj b/test/Performance/Performance.csproj index 0db2ea215..db7cf67c3 100644 --- a/test/Performance/Performance.csproj +++ b/test/Performance/Performance.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj index bb05cdb41..19083bc65 100644 --- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj +++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj @@ -13,7 +13,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> + <PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" /> <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" /> diff --git a/test/crossgen.Tests/crossgen.Tests.csproj b/test/crossgen.Tests/crossgen.Tests.csproj index b261b6006..5c534fed6 100644 --- a/test/crossgen.Tests/crossgen.Tests.csproj +++ b/test/crossgen.Tests/crossgen.Tests.csproj @@ -33,7 +33,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj index bacf9a867..00613d49d 100644 --- a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj +++ b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj @@ -17,7 +17,7 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="Microsoft.NetCore.App" Version="1.1.1" /> + <PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" /> <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" /> diff --git a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj index 5583624ce..1d90ee643 100644 --- a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj +++ b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-build.Tests/dotnet-build.Tests.csproj b/test/dotnet-build.Tests/dotnet-build.Tests.csproj index 5305d9b89..a15690feb 100644 --- a/test/dotnet-build.Tests/dotnet-build.Tests.csproj +++ b/test/dotnet-build.Tests/dotnet-build.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-help.Tests/dotnet-help.Tests.csproj b/test/dotnet-help.Tests/dotnet-help.Tests.csproj index ce66bb27b..8a19ebd9f 100644 --- a/test/dotnet-help.Tests/dotnet-help.Tests.csproj +++ b/test/dotnet-help.Tests/dotnet-help.Tests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj index 1784cb91b..3c408410f 100644 --- a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj +++ b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj index b47a90d92..85a5fed00 100644 --- a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj +++ b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj @@ -48,7 +48,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj index 6a0161598..e0776ff12 100644 --- a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj +++ b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.1.1</Version> diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj index 938815ca6..c499ac7ef 100644 --- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj index 2a867a0fc..e83ed929d 100644 --- a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj +++ b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj index a32269964..8b26f6100 100644 --- a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj +++ b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj @@ -40,7 +40,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj index f791bdbd9..98ec11d3f 100644 --- a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj +++ b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj @@ -42,7 +42,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj index 932a5c975..38de20d56 100644 --- a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj +++ b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj @@ -36,7 +36,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj index 40890b935..2a67928fd 100644 --- a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj +++ b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj @@ -46,7 +46,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build"> <Version>$(CLI_MSBuild_Version)</Version> diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj index c726786d9..2d64763d1 100644 --- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj +++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj index 5c7016d70..1796866fa 100644 --- a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj +++ b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj index dd06fa7e6..62bdd4d04 100644 --- a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj +++ b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj index b7e10b39a..5e8905cd6 100644 --- a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj +++ b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj @@ -24,7 +24,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/test/dotnet-test.Tests/dotnet-test.Tests.csproj b/test/dotnet-test.Tests/dotnet-test.Tests.csproj index e3aec204f..bbf3d189f 100644 --- a/test/dotnet-test.Tests/dotnet-test.Tests.csproj +++ b/test/dotnet-test.Tests/dotnet-test.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj index 31a3ddbdc..30d2dd075 100644 --- a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj +++ b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index 2ea831632..1819341b9 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -60,7 +60,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="System.Runtime.Serialization.Primitives"> <Version>4.3.0</Version> diff --git a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj index 05bea77b1..47acfd6ce 100644 --- a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj +++ b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj @@ -35,7 +35,7 @@ <Version>2.2.0-beta4-build1194</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="xunit"> <Version>2.2.0-beta4-build3444</Version> diff --git a/tools/Archiver/Archiver.csproj b/tools/Archiver/Archiver.csproj index 02242cee4..bebe500cd 100644 --- a/tools/Archiver/Archiver.csproj +++ b/tools/Archiver/Archiver.csproj @@ -16,7 +16,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> diff --git a/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj b/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj index 0eb0880f4..be60b3c6b 100644 --- a/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj +++ b/tools/MigrationDefaultsConstructor/MigrationDefaultsConstructor.csproj @@ -13,7 +13,7 @@ <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' "> <ProjectReference Include="..\..\src\dotnet\dotnet.csproj" /> <PackageReference Include="Microsoft.NETCore.App"> - <Version>1.1.1</Version> + <Version>$(CLI_SharedFrameworkVersion)</Version> </PackageReference> <PackageReference Include="Microsoft.Build.Runtime"> <Version>$(CLI_MSBuild_Version)</Version> From c9802904313a273b29bf945e79e41f8bc4df7a96 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Sat, 11 Feb 2017 23:55:38 -0800 Subject: [PATCH 18/40] Adding DropSuffix and ReleaseSuffix as enviroment variables passed down to docker. --- scripts/dockerrun.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dockerrun.sh b/scripts/dockerrun.sh index b478a2a10..0edb30ed4 100755 --- a/scripts/dockerrun.sh +++ b/scripts/dockerrun.sh @@ -134,5 +134,7 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \ -e CHECKSUM_STORAGE_CONTAINER \ -e CLIBUILD_SKIP_TESTS \ -e CommitCount \ + -e DropSuffix \ + -e ReleaseSuffix \ $DOTNET_BUILD_CONTAINER_TAG \ $BUILD_COMMAND "$@" From 02c70abe49caf83664a0b1b9aa1de0109b3aaf34 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Sat, 11 Feb 2017 19:11:14 -0800 Subject: [PATCH 19/40] Updating the version of the ASP.NET packages that we migrate to, to the RTM package versions. --- .../ConstantPackageVersions.cs | 5 ++--- .../SupportedPackageVersions.cs | 11 +++++++++++ .../Rules/GivenThatIWantToMigrateTools.cs | 9 +++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs b/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs index 9928d0e67..bb86cd1c3 100644 --- a/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs +++ b/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs @@ -5,8 +5,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration { internal class ConstantPackageVersions { - public const string AspNetToolsVersion = "1.0.0-msbuild3-final"; - public const string AspNet110ToolsVersion = "1.1.0-msbuild3-final"; + public const string AspNetToolsVersion = "1.0.0"; + public const string AspNet110ToolsVersion = "1.1.0"; public const string AspNetLTSPackagesVersion = "1.0.2"; public const string EntityFrameworkLTSPackagesVersion = "1.0.2"; public const string TestSdkPackageVersion = "15.0.0-preview-20170106-08"; @@ -15,6 +15,5 @@ namespace Microsoft.DotNet.ProjectJsonMigration public const string MstestTestAdapterVersion = "1.1.8-rc"; public const string MstestTestFrameworkVersion = "1.0.8-rc"; public const string BundleMinifierToolVersion = "2.2.301"; - public const string WebSdkPackageVersion = "1.0.0-alpha-20161205-1-154" ; } } \ No newline at end of file diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/SupportedPackageVersions.cs b/src/Microsoft.DotNet.ProjectJsonMigration/SupportedPackageVersions.cs index f1feedeb0..511763603 100644 --- a/src/Microsoft.DotNet.ProjectJsonMigration/SupportedPackageVersions.cs +++ b/src/Microsoft.DotNet.ProjectJsonMigration/SupportedPackageVersions.cs @@ -53,6 +53,17 @@ namespace Microsoft.DotNet.ProjectJsonMigration Version = ConstantPackageVersions.AspNetToolsVersion } }, + { + new PackageDependencyInfo + { + Name = "Microsoft.EntityFrameworkCore.Tools.DotNet", + Version = "[1.0.0-*,)" + }, + new PackageDependencyInfo { + Name = "Microsoft.EntityFrameworkCore.Tools.DotNet", + Version = ConstantPackageVersions.AspNetToolsVersion + } + }, { new PackageDependencyInfo { diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateTools.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateTools.cs index a014ac163..afcede957 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateTools.cs +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateTools.cs @@ -59,6 +59,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests } [Theory] + [InlineData("Microsoft.EntityFrameworkCore.Tools.DotNet", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)] [InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)] [InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools", "Microsoft.VisualStudio.Web.CodeGeneration.Tools", ConstantPackageVersions.AspNetToolsVersion)] [InlineData("Microsoft.DotNet.Watcher.Tools", "Microsoft.DotNet.Watcher.Tools", ConstantPackageVersions.AspNetToolsVersion)] @@ -90,5 +91,13 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests var packageRef = mockProj.Items.Where(i => i.ItemType == "DotNetCliToolReference").Should().BeEmpty(); } + + [Fact] + public void ItMergesEntityFrameworkCoreToolsAndEntityFrameworkCoreToolsDotNet() + { + var mockProj = RunPackageDependenciesRuleOnPj("{ \"tools\": { \"Microsoft.EntityFrameworkCore.Tools\": \"1.0.0-preview4-final\", \"Microsoft.EntityFrameworkCore.Tools.DotNet\": \"1.0.0-preview4-final\" } }"); + + EmitsToolReferences(mockProj, Tuple.Create("Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)); + } } } \ No newline at end of file From 6670301493708a711a324cee8569ae74a2f757de Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Mon, 13 Feb 2017 12:56:10 -0800 Subject: [PATCH 20/40] Modifying the docker environment variables to be upper case, because that's how VSO passes them along. --- scripts/dockerrun.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dockerrun.sh b/scripts/dockerrun.sh index 0edb30ed4..d5caeb312 100755 --- a/scripts/dockerrun.sh +++ b/scripts/dockerrun.sh @@ -133,8 +133,8 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \ -e CHECKSUM_STORAGE_ACCOUNT \ -e CHECKSUM_STORAGE_CONTAINER \ -e CLIBUILD_SKIP_TESTS \ - -e CommitCount \ - -e DropSuffix \ - -e ReleaseSuffix \ + -e COMMITCOUNT \ + -e DROPSUFFIX \ + -e RELEASESUFFIX \ $DOTNET_BUILD_CONTAINER_TAG \ $BUILD_COMMAND "$@" From 9cf8e8c57fd7aab51e6a7083e7e753fcb35a2b99 Mon Sep 17 00:00:00 2001 From: Rohit Agrawal <ragrawal@microsoft.com> Date: Mon, 13 Feb 2017 18:11:51 -0800 Subject: [PATCH 21/40] update nuget to 4.0.0-rtm-2283 (#5691) --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index 7e316701a..541d321ae 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -4,8 +4,8 @@ <CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion> <CLI_MSBuild_Version>15.1.546</CLI_MSBuild_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> - <CLI_NETSDK_Version>1.0.0-alpha-20170207-4</CLI_NETSDK_Version> - <CLI_NuGet_Version>4.0.0-rtm-2275</CLI_NuGet_Version> + <CLI_NETSDK_Version>1.0.0-alpha-20170213-1</CLI_NETSDK_Version> + <CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version> <CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version> <CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version> <TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion> From 54464dda3655150b193071cf4141587d2e573eca Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Tue, 14 Feb 2017 10:30:28 -0800 Subject: [PATCH 22/40] Updating the version test to check that dotnet --version uses the .version file instead of using a regular expression to validate the printed version. --- test/dotnet.Tests/VersionTest.cs | 21 +++++++++++++++++---- test/dotnet.Tests/dotnet.Tests.csproj | 4 ++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/test/dotnet.Tests/VersionTest.cs b/test/dotnet.Tests/VersionTest.cs index bff9afd10..0192f5fd8 100644 --- a/test/dotnet.Tests/VersionTest.cs +++ b/test/dotnet.Tests/VersionTest.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Collections.Generic; -using System.Text.RegularExpressions; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Tools.Test.Utilities; @@ -18,14 +17,28 @@ namespace Microsoft.DotNet.Tests [Fact] public void VersionCommandDisplaysCorrectVersion() { + var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version"); + var version = GetVersionFromFile(versionFilePath); + CommandResult result = new DotnetCommand() .ExecuteWithCapturedOutput("--version"); result.Should().Pass(); - - Regex.IsMatch(result.StdOut.Trim(), @"[0-9]{1}\.[0-9]{1}\.[0-9]{1}-[a-zA-Z0-9]+-[0-9]{6}$").Should() - .BeTrue($"Unexpected dotnet sdk version - {result.StdOut}"); + result.StdOut.Trim().Should().Be(version); + } + private string GetVersionFromFile(string versionFilePath) + { + using (var reader = new StreamReader(File.OpenRead(versionFilePath))) + { + SkipCommit(reader); + return reader.ReadLine(); + } + } + + private void SkipCommit(StreamReader reader) + { + reader.ReadLine(); } } } diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index 1819341b9..e80b28426 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -22,6 +22,10 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> </Content> + <Content Include="..\..\artifacts\*\stage2\sdk\*\.version"> + <Link>.version</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> </ItemGroup> <ItemGroup> From 8a53b08959bc612e3f1358dff13977a108d9f52f Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Tue, 14 Feb 2017 13:13:08 -0800 Subject: [PATCH 23/40] Running chmod after crossgen so that our chmod changes are not overwritten by it. --- build/Microsoft.DotNet.Cli.Compile.targets | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets index fe9359a2b..9f8802765 100644 --- a/build/Microsoft.DotNet.Cli.Compile.targets +++ b/build/Microsoft.DotNet.Cli.Compile.targets @@ -126,32 +126,6 @@ VersionSuffix="$(VersionSuffix)" ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" /> - <!-- Corehostify Binaries --> - <ItemGroup Condition=" '$(OSName)' != 'win' "> - <SdkOutputChmodTargets Remove="*" /> - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe; - $(SdkOutputDirectory)/**/*.dll" > - <!-- Managed assemblies do not need execute --> - <Mode>u=rw,g=r,o=r</Mode> - </SdkOutputChmodTargets> - - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib; - $(SdkOutputDirectory)/**/*.so" > - <!-- Generally, dylibs and sos have 'x' --> - <Mode>u=rwx,g=rx,o=rx</Mode> - </SdkOutputChmodTargets> - - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*" - Exclude="$(SdkOutputDirectory)/**/*.*" > - <!-- Executables need x --> - <Mode>u=rwx,g=rx,o=rx</Mode> - </SdkOutputChmodTargets> - </ItemGroup> - - <Chmod Condition=" '$(OSName)' != 'win' " - File="%(SdkOutputChModTargets.FullPath)" - Mode="%(SdkOutputChModTargets.Mode)" /> - <RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json" SectionName="runtimeTargets" AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" /> @@ -224,6 +198,32 @@ @(CompileStageSdkDirectories); $(SharedFrameworkNameVersionPath)" /> + <!-- Corehostify Binaries --> + <ItemGroup Condition=" '$(OSName)' != 'win' "> + <SdkOutputChmodTargets Remove="*" /> + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe; + $(SdkOutputDirectory)/**/*.dll" > + <!-- Managed assemblies do not need execute --> + <Mode>u=rw,g=r,o=r</Mode> + </SdkOutputChmodTargets> + + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib; + $(SdkOutputDirectory)/**/*.so" > + <!-- Generally, dylibs and sos have 'x' --> + <Mode>u=rwx,g=rx,o=rx</Mode> + </SdkOutputChmodTargets> + + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*" + Exclude="$(SdkOutputDirectory)/**/*.*" > + <!-- Executables need x --> + <Mode>u=rwx,g=rx,o=rx</Mode> + </SdkOutputChmodTargets> + </ItemGroup> + + <Chmod Condition=" '$(OSName)' != 'win' " + File="%(SdkOutputChModTargets.FullPath)" + Mode="%(SdkOutputChModTargets.Mode)" /> + <!-- Generate .version file --> <WriteLinesToFile File="$(SdkOutputDirectory)/.version" Lines="$(CommitHash);$(SdkVersion);$(Rid)" From 4d24ae06bb78b11a4b2fd7f67bb2c23ef03ffd74 Mon Sep 17 00:00:00 2001 From: Justin Goshi <jgoshi@microsoft.com> Date: Tue, 14 Feb 2017 14:57:04 -0800 Subject: [PATCH 24/40] Default to C# project type guid --- src/dotnet/ProjectInstanceExtensions.cs | 5 +++-- test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/dotnet/ProjectInstanceExtensions.cs b/src/dotnet/ProjectInstanceExtensions.cs index 4bbcb5247..f437572c5 100644 --- a/src/dotnet/ProjectInstanceExtensions.cs +++ b/src/dotnet/ProjectInstanceExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Build.Execution; +using Microsoft.DotNet.Cli.Sln.Internal; using System; using System.Linq; @@ -37,9 +38,9 @@ namespace Microsoft.DotNet.Tools.Common //ISSUE: https://github.com/dotnet/sdk/issues/522 //The real behavior we want (once DefaultProjectTypeGuid support is in) is to throw //when we cannot find ProjectTypeGuid or DefaultProjectTypeGuid. But for now we - //need the same behavior we had before this change. + //need to default to the C# one. //throw new GracefulException(CommonLocalizableStrings.UnsupportedProjectType); - projectTypeGuid = "{13B669BE-BB05-4DDF-9536-439F39A36129}"; // CPS guid + projectTypeGuid = ProjectTypeGuids.CSharpProjectTypeGuid; } return projectTypeGuid; diff --git a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs index c1ca138d5..cdf0efc91 100644 --- a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs +++ b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs @@ -35,7 +35,7 @@ VisualStudioVersion = 15.0.26006.2 MinimumVisualStudioVersion = 10.0.40219.1 Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""App"", ""App\App.csproj"", ""{7072A694-548F-4CAE-A58F-12D257D5F486}"" EndProject -Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" +Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -83,7 +83,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26006.2 MinimumVisualStudioVersion = 10.0.40219.1 -Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" +Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -120,7 +120,7 @@ Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""App"", ""App.csproj"", " EndProject Project(""{2150E333-8FDC-42A3-9474-1A3956D46DE8}"") = ""src"", ""src"", ""__SRC_FOLDER_GUID__"" EndProject -Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""src\Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" +Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""src\Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__"" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From 149a4590b5fdde8c7c3e351345fd8b58eb99c760 Mon Sep 17 00:00:00 2001 From: Justin Goshi <jgoshi@microsoft.com> Date: Tue, 14 Feb 2017 13:47:06 -1000 Subject: [PATCH 25/40] Do not add duplicate projects (#5698) --- .../App.sln | 39 +++++++++++++++++++ .../src/App/App.csproj | 15 +++++++ .../src/App/Program.cs | 10 +++++ .../src/Lib/Lib.csproj | 11 ++++++ .../src/Lib/Library.cs | 12 ++++++ .../App.sln | 36 +++++++++++++++++ .../App/App.csproj | 19 +++++++++ .../App/Program.cs | 10 +++++ .../Lib/Lib.csproj | 11 ++++++ .../Lib/Library.cs | 12 ++++++ .../SlnFile.cs | 3 +- src/Microsoft.DotNet.Cli.Utils/PathUtility.cs | 26 +++++++++++++ src/dotnet/SlnFileExtensions.cs | 2 +- .../dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs | 30 ++++++++++++-- 14 files changed, 231 insertions(+), 5 deletions(-) create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj create mode 100644 TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln new file mode 100644 index 000000000..c8573d702 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln @@ -0,0 +1,39 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26006.2 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{72BFCA87-B033-4721-8712-4D12166B4A39}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.ActiveCfg = Debug|x64 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.Build.0 = Debug|x64 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.ActiveCfg = Debug|x86 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.Build.0 = Debug|x86 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.Build.0 = Release|Any CPU + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.ActiveCfg = Release|x64 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.Build.0 = Release|x64 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.ActiveCfg = Release|x86 + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {DDF3765C-59FB-4AA6-BE83-779ED13AA64A} = {72BFCA87-B033-4721-8712-4D12166B4A39} + EndGlobalSection +EndGlobal diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj new file mode 100644 index 000000000..b38669c62 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj @@ -0,0 +1,15 @@ +<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>netcoreapp1.0</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\src\Lib\Lib.csproj" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" /> + </ItemGroup> + +</Project> diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs new file mode 100644 index 000000000..abb853a4a --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs @@ -0,0 +1,10 @@ +using System; + +class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello from the main app"); + Console.WriteLine(Lib.Library.GetMessage()); + } +} diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj new file mode 100644 index 000000000..9f8bcbb51 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> + + <PropertyGroup> + <TargetFramework>netstandard1.4</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="NETStandard.Library" Version="1.6" /> + </ItemGroup> + +</Project> diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs new file mode 100644 index 000000000..205c42a01 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs @@ -0,0 +1,12 @@ +using System; + +namespace Lib +{ + public class Library + { + public static string GetMessage() + { + return "Message from Lib"; + } + } +} diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln new file mode 100644 index 000000000..17cd062c5 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26006.2 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86 + {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj new file mode 100644 index 000000000..27e43f08e --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj @@ -0,0 +1,19 @@ +<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>netcoreapp1.0</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <Compile Include="**\*.cs" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Lib\Lib.csproj" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" /> + </ItemGroup> + +</Project> diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs new file mode 100644 index 000000000..abb853a4a --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs @@ -0,0 +1,10 @@ +using System; + +class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello from the main app"); + Console.WriteLine(Lib.Library.GetMessage()); + } +} diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj new file mode 100644 index 000000000..9f8bcbb51 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj @@ -0,0 +1,11 @@ +<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> + + <PropertyGroup> + <TargetFramework>netstandard1.4</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="NETStandard.Library" Version="1.6" /> + </ItemGroup> + +</Project> diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs new file mode 100644 index 000000000..205c42a01 --- /dev/null +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs @@ -0,0 +1,12 @@ +using System; + +namespace Lib +{ + public class Library + { + public static string GetMessage() + { + return "Message from Lib"; + } + } +} diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs index 7eda0d91e..93df94b85 100644 --- a/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs +++ b/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs @@ -274,7 +274,8 @@ namespace Microsoft.DotNet.Cli.Sln.Internal } set { - _filePath = PathUtility.GetPathWithDirectorySeparator(value); + _filePath = PathUtility.RemoveExtraPathSeparators( + PathUtility.GetPathWithDirectorySeparator(value)); } } diff --git a/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs b/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs index 2f2353cbe..895257d28 100644 --- a/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs +++ b/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs @@ -261,6 +261,32 @@ namespace Microsoft.DotNet.Tools.Common } } + public static string RemoveExtraPathSeparators(string path) + { + if (string.IsNullOrEmpty(path)) + { + return path; + } + + var components = path.Split(Path.DirectorySeparatorChar); + var result = string.Empty; + + foreach (var component in components) + { + if (!string.IsNullOrEmpty(component)) + { + result = Path.Combine(result, component); + } + } + + if (path[path.Length-1] == Path.DirectorySeparatorChar) + { + result += Path.DirectorySeparatorChar; + } + + return result; + } + public static bool HasExtension(string filePath, string extension) { var comparison = StringComparison.Ordinal; diff --git a/src/dotnet/SlnFileExtensions.cs b/src/dotnet/SlnFileExtensions.cs index 7fbf0fb70..39e34a806 100644 --- a/src/dotnet/SlnFileExtensions.cs +++ b/src/dotnet/SlnFileExtensions.cs @@ -172,7 +172,7 @@ namespace Microsoft.DotNet.Tools.Common this SlnFile slnFile, SlnPropertySet nestedProjects) { - var solutionFolderPaths = new Dictionary<string, string>(); + var solutionFolderPaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); var solutionFolderProjects = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid); foreach (var slnProject in solutionFolderProjects) diff --git a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs index c1ca138d5..4b52fcbfa 100644 --- a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs +++ b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs @@ -502,11 +502,13 @@ EndGlobal .Count().Should().Be(1, $"Lib {reasonString}"); } - [Fact] - public void WhenSolutionAlreadyContainsProjectItDoesntDuplicate() + [Theory] + [InlineData("TestAppWithSlnAndExistingCsprojReferences")] + [InlineData("TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep")] + public void WhenSolutionAlreadyContainsProjectItDoesntDuplicate(string testAsset) { var projectDirectory = TestAssets - .Get("TestAppWithSlnAndExistingCsprojReferences") + .Get(testAsset) .CreateInstance() .WithSourceFiles() .Root @@ -606,6 +608,28 @@ EndGlobal nonSolutionFolderProjects.Single().TypeGuid.Should().Be(expectedTypeGuid); } + [Fact] + private void WhenSlnContainsSolutionFolderWithDifferentCasingItDoesNotCreateDuplicate() + { + var projectDirectory = TestAssets + .Get("TestAppWithSlnAndCaseSensitiveSolutionFolders") + .CreateInstance() + .WithSourceFiles() + .Root + .FullName; + + var projectToAdd = Path.Combine("src", "Lib", "Lib.csproj"); + var cmd = new DotnetCommand() + .WithWorkingDirectory(projectDirectory) + .Execute($"sln App.sln add {projectToAdd}"); + cmd.Should().Pass(); + + var slnFile = SlnFile.Read(Path.Combine(projectDirectory, "App.sln")); + var solutionFolderProjects = slnFile.Projects.Where( + p => p.TypeGuid == ProjectTypeGuids.SolutionFolderGuid); + solutionFolderProjects.Count().Should().Be(1); + } + private string GetExpectedSlnContents( string slnPath, string slnTemplate, From 627c03b07077187f7fb2cb003b8ea2080e18ab5c Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz <piotrp@microsoft.com> Date: Tue, 14 Feb 2017 22:47:37 -0800 Subject: [PATCH 26/40] Bump MSBuild to 15.1.548 --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index 81cde0cc7..d366eb908 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -2,7 +2,7 @@ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion> - <CLI_MSBuild_Version>15.1.546</CLI_MSBuild_Version> + <CLI_MSBuild_Version>15.1.548</CLI_MSBuild_Version> <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version> <CLI_NETSDK_Version>1.0.0-alpha-20170213-1</CLI_NETSDK_Version> <CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version> From 8d38a2a67faf31209147c9cab6d0f9f9ddde9fe3 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Wed, 15 Feb 2017 11:33:59 -0800 Subject: [PATCH 27/40] Making the tool name comparison with the package case insensitive, so that tools are not required to be declared with the exact casing as the packages that contain them. --- .../AppWithToolDependency.csproj | 3 ++ .../ProjectToolsCommandResolver.cs | 7 ++- .../GivenAProjectToolsCommandResolver.cs | 47 ++++++++++++++----- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj index a31d87934..a5eb7a585 100755 --- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj +++ b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj @@ -13,6 +13,9 @@ <DotNetCliToolReference Include="dotnet-portable"> <Version>1.0.0</Version> </DotNetCliToolReference> + <DotNetCliToolReference Include="dotnet-PreferCliRuntime"> + <Version>1.0.0</Version> + </DotNetCliToolReference> </ItemGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <DefineConstants>$(DefineConstants);RELEASE</DefineConstants> diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectToolsCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectToolsCommandResolver.cs index 5e6496a42..d3dd03ce6 100644 --- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectToolsCommandResolver.cs +++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectToolsCommandResolver.cs @@ -147,10 +147,9 @@ namespace Microsoft.DotNet.Cli.Utils toolLockFile.Path)); var toolLibrary = toolLockFile.Targets - .FirstOrDefault( - t => t.TargetFramework.GetShortFolderName().Equals(s_toolPackageFramework.GetShortFolderName())) - ?.Libraries.FirstOrDefault(l => l.Name == toolLibraryRange.Name); - + .FirstOrDefault(t => s_toolPackageFramework == t.TargetFramework) + ?.Libraries.FirstOrDefault( + l => StringComparer.OrdinalIgnoreCase.Equals(l.Name, toolLibraryRange.Name)); if (toolLibrary == null) { Reporter.Verbose.WriteLine(string.Format( diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 7602d42a5..92b4970c1 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -23,7 +23,7 @@ namespace Microsoft.DotNet.Tests private const string TestProjectName = "AppWithToolDependency"; [Fact] - public void It_returns_null_when_CommandName_is_null() + public void ItReturnsNullWhenCommandNameIsNull() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -40,7 +40,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_returns_null_when_ProjectDirectory_is_null() + public void ItReturnsNullWhenProjectDirectoryIsNull() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_returns_null_when_ProjectDirectory_does_not_contain_a_project_file() + public void ItReturnsNullWhenProjectDirectoryDoesNotContainAProjectFile() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -76,7 +76,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_returns_null_when_CommandName_does_not_exist_in_ProjectTools() + public void ItReturnsNullWhenCommandNameDoesNotExistInProjectTools() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_returns_a_CommandSpec_with_DOTNET_as_FileName_and_CommandName_in_Args_when_CommandName_exists_in_ProjectTools() + public void ItReturnsACommandSpecWithDOTNETAsFileNameAndCommandNameInArgsWhenCommandNameExistsInProjectTools() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -126,7 +126,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_escapes_CommandArguments_when_returning_a_CommandSpec() + public void ItEscapesCommandArgumentsWhenReturningACommandSpec() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -149,7 +149,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_returns_a_CommandSpec_with_Args_containing_CommandPath_when_returning_a_CommandSpec_and_CommandArguments_are_null() + public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenReturningACommandSpecAndCommandArgumentsAreNull() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -174,7 +174,32 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_writes_a_deps_json_file_next_to_the_lockfile() + public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenInvokingAToolReferencedWithADifferentCasing() + { + var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); + + var testInstance = TestAssets.Get(TestProjectName) + .CreateInstance() + .WithSourceFiles() + .WithRestoreFiles(); + + var commandResolverArguments = new CommandResolverArguments() + { + CommandName = "dotnet-prefercliruntime", + CommandArguments = null, + ProjectDirectory = testInstance.Root.FullName + }; + + var result = projectToolsCommandResolver.Resolve(commandResolverArguments); + + result.Should().NotBeNull(); + + var commandPath = result.Args.Trim('"'); + commandPath.Should().Contain("dotnet-prefercliruntime.dll"); + } + + [Fact] + public void ItWritesADepsJsonFileNextToTheLockfile() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -221,7 +246,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void Generate_deps_json_method_doesnt_overwrite_when_deps_file_already_exists() + public void GenerateDepsJsonMethodDoesntOverwriteWhenDepsFileAlreadyExists() { var testInstance = TestAssets.Get(TestProjectName) .CreateInstance() @@ -262,7 +287,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_adds_fx_version_as_a_param_when_the_tool_has_the_prefercliruntime_file() + public void ItAddsFxVersionAsAParamWhenTheToolHasThePrefercliruntimeFile() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); @@ -286,7 +311,7 @@ namespace Microsoft.DotNet.Tests } [Fact] - public void It_does_not_add_fx_version_as_a_param_when_the_tool_does_not_have_the_prefercliruntime_file() + public void ItDoesNotAddFxVersionAsAParamWhenTheToolDoesNotHaveThePrefercliruntimeFile() { var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); From 6c07b929bdfc4ef090a291cd36a0845d06703d2c Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Wed, 15 Feb 2017 11:53:31 -0800 Subject: [PATCH 28/40] The variable was missing dollar sign parenthesis in the target file. --- build/Microsoft.DotNet.Cli.Publish.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.Publish.targets b/build/Microsoft.DotNet.Cli.Publish.targets index 8ebfcba7a..d9f4341d6 100644 --- a/build/Microsoft.DotNet.Cli.Publish.targets +++ b/build/Microsoft.DotNet.Cli.Publish.targets @@ -43,7 +43,7 @@ <ItemGroup> <ForPublishing Include="@(GeneratedInstallers)" /> <ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" /> - <ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" 'PUBLISH_NUPKG_TO_AZURE_BLOB' != '' " /> + <ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' " /> </ItemGroup> <ItemGroup> From 9c00966956d5e56992853a27cb142f3bc92e02be Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Tue, 14 Feb 2017 10:41:58 -0800 Subject: [PATCH 29/40] preview of single unit test for dotnet build --- src/dotnet/ForwardingApp.cs | 15 ++-- src/dotnet/ProcessStartInfoExtensions.cs | 20 ++++++ src/dotnet/commands/dotnet-build/Program.cs | 69 +++++++++++++++++-- .../dotnet-msbuild/MSBuildForwardingApp.cs | 19 +++-- .../GivenDotnetBuildInvocation.cs | 21 ++++++ 5 files changed, 120 insertions(+), 24 deletions(-) create mode 100644 src/dotnet/ProcessStartInfoExtensions.cs create mode 100644 test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs diff --git a/src/dotnet/ForwardingApp.cs b/src/dotnet/ForwardingApp.cs index 607c0f43a..2ae292b75 100644 --- a/src/dotnet/ForwardingApp.cs +++ b/src/dotnet/ForwardingApp.cs @@ -67,6 +67,11 @@ namespace Microsoft.DotNet.Cli } public int Execute() + { + return GetProcessStartInfo().Execute(); + } + + public ProcessStartInfo GetProcessStartInfo() { var processInfo = new ProcessStartInfo { @@ -83,15 +88,7 @@ namespace Microsoft.DotNet.Cli } } - var process = new Process - { - StartInfo = processInfo - }; - - process.Start(); - process.WaitForExit(); - - return process.ExitCode; + return processInfo; } public ForwardingApp WithEnvironmentVariable(string name, string value) diff --git a/src/dotnet/ProcessStartInfoExtensions.cs b/src/dotnet/ProcessStartInfoExtensions.cs new file mode 100644 index 000000000..6029f655c --- /dev/null +++ b/src/dotnet/ProcessStartInfoExtensions.cs @@ -0,0 +1,20 @@ +using System.Diagnostics; + +namespace Microsoft.DotNet.Cli +{ + internal static class ProcessStartInfoExtensions + { + public static int Execute(this ProcessStartInfo startInfo) + { + var process = new Process + { + StartInfo = startInfo + }; + + process.Start(); + process.WaitForExit(); + + return process.ExitCode; + } + } +} diff --git a/src/dotnet/commands/dotnet-build/Program.cs b/src/dotnet/commands/dotnet-build/Program.cs index 785d3b944..5618f14c5 100644 --- a/src/dotnet/commands/dotnet-build/Program.cs +++ b/src/dotnet/commands/dotnet-build/Program.cs @@ -5,21 +5,33 @@ using System.Collections.Generic; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.MSBuild; +using System.Diagnostics; +using System; +using Microsoft.DotNet.Cli; namespace Microsoft.DotNet.Tools.Build { public class BuildCommand { - public static int Run(string[] args) + private MSBuildForwardingApp _forwardingApp; + + private BuildCommand() { } + + public BuildCommand(IEnumerable<string> msbuildArgs) { - DebugHelper.HandleDebugSwitch(ref args); + _forwardingApp = new MSBuildForwardingApp(msbuildArgs); + } + + public static BuildCommand FromArgs(params string[] args) + { + var ret = new BuildCommand(); CommandLineApplication app = new CommandLineApplication(throwOnUnexpectedArg: false); app.Name = "dotnet build"; app.FullName = LocalizableStrings.AppFullName; app.Description = LocalizableStrings.AppDescription; app.ArgumentSeparatorHelpText = HelpMessageStrings.MSBuildAdditionalArgsHelpText; - app.HandleRemainingArguments = true; + app.HandleRemainingArguments = true; app.HelpOption("-h|--help"); CommandArgument projectArgument = app.Argument($"<{LocalizableStrings.ProjectArgumentValueName}>", LocalizableStrings.ProjectArgumentDescription); @@ -36,8 +48,10 @@ namespace Microsoft.DotNet.Tools.Build CommandOption noDependenciesOption = app.Option("--no-dependencies", LocalizableStrings.NoDependenciesOptionDescription, CommandOptionType.NoValue); CommandOption verbosityOption = MSBuildForwardingApp.AddVerbosityOption(app); + bool codeExecuted = false; app.OnExecute(() => { + codeExecuted = true; List<string> msbuildArgs = new List<string>(); if (!string.IsNullOrEmpty(projectArgument.Value)) @@ -93,10 +107,55 @@ namespace Microsoft.DotNet.Tools.Build msbuildArgs.AddRange(app.RemainingArguments); - return new MSBuildForwardingApp(msbuildArgs).Execute(); + ret._forwardingApp = new MSBuildForwardingApp(msbuildArgs); + + return 0; }); - return app.Execute(args); + int exitCode = app.Execute(); + if (!codeExecuted) + { + throw new NonZeroExitCodeException(exitCode); + } + + return ret; + } + + public static int Run(string[] args) + { + DebugHelper.HandleDebugSwitch(ref args); + + BuildCommand cmd; + try + { + cmd = FromArgs(args); + } + catch (NonZeroExitCodeException e) + { + return e.ExitCode; + } + + return cmd.Execute(); + } + + public ProcessStartInfo GetProcessStartInfo() + { + return _forwardingApp.GetProcessStartInfo(); + } + + public int Execute() + { + return GetProcessStartInfo().Execute(); + } + + private class NonZeroExitCodeException : Exception + { + public int ExitCode { get; private set; } + + public NonZeroExitCodeException(int exitCode) + { + ExitCode = exitCode; + } } } } diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs index 6b2b0f47f..20b17a497 100644 --- a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs +++ b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs @@ -9,6 +9,7 @@ using System.Reflection; using System.Runtime.InteropServices; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; +using System.Diagnostics; namespace Microsoft.DotNet.Tools.MSBuild { @@ -59,18 +60,16 @@ namespace Microsoft.DotNet.Tools.MSBuild environmentVariables: _msbuildRequiredEnvironmentVariables); } + public ProcessStartInfo GetProcessStartInfo() + { + return _forwardingApp + .WithEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, Telemetry.CurrentSessionId) + .GetProcessStartInfo(); + } + public int Execute() { - try - { - Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, Telemetry.CurrentSessionId); - - return _forwardingApp.Execute(); - } - finally - { - Environment.SetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName, null); - } + return GetProcessStartInfo().Execute(); } internal static CommandOption AddVerbosityOption(CommandLineApplication app) diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs new file mode 100644 index 000000000..2dcce552f --- /dev/null +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -0,0 +1,21 @@ +using Microsoft.DotNet.Tools.Build; +using System; +using System.Collections.Generic; +using System.Text; +using FluentAssertions; +using Xunit; +using System.IO; + +namespace Microsoft.DotNet.Cli.MSBuild.Tests +{ + public class GivenDotnetBuildInvocation + { + [Fact] + public void WhenNoArgsArePassedThenMsbuildInvocationIsCorrect() + { + var msbuildPath = Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.dll"); + BuildCommand.FromArgs() + .GetProcessStartInfo().Arguments.Should().Be($@"exec {msbuildPath} /m /v:m /t:Build /clp:Summary"); + } + } +} From 8ebc06da463b7474e290c9597edc7ffbdde92a08 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Tue, 14 Feb 2017 11:38:01 -0800 Subject: [PATCH 30/40] add more unit tests --- src/dotnet/ProcessStartInfoExtensions.cs | 8 ++++++- src/dotnet/commands/dotnet-build/Program.cs | 22 +++++++++---------- .../dotnet-msbuild/MSBuildForwardingApp.cs | 4 ++-- .../GivenDotnetBuildInvocation.cs | 18 +++++++-------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/dotnet/ProcessStartInfoExtensions.cs b/src/dotnet/ProcessStartInfoExtensions.cs index 6029f655c..721e0ec55 100644 --- a/src/dotnet/ProcessStartInfoExtensions.cs +++ b/src/dotnet/ProcessStartInfoExtensions.cs @@ -1,4 +1,5 @@ -using System.Diagnostics; +using System; +using System.Diagnostics; namespace Microsoft.DotNet.Cli { @@ -6,6 +7,11 @@ namespace Microsoft.DotNet.Cli { public static int Execute(this ProcessStartInfo startInfo) { + if (startInfo == null) + { + throw new ArgumentNullException(nameof(startInfo)); + } + var process = new Process { StartInfo = startInfo diff --git a/src/dotnet/commands/dotnet-build/Program.cs b/src/dotnet/commands/dotnet-build/Program.cs index 5618f14c5..d5d45be56 100644 --- a/src/dotnet/commands/dotnet-build/Program.cs +++ b/src/dotnet/commands/dotnet-build/Program.cs @@ -17,12 +17,12 @@ namespace Microsoft.DotNet.Tools.Build private BuildCommand() { } - public BuildCommand(IEnumerable<string> msbuildArgs) + public BuildCommand(IEnumerable<string> msbuildArgs, string msbuildPath = null) { - _forwardingApp = new MSBuildForwardingApp(msbuildArgs); + _forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); } - public static BuildCommand FromArgs(params string[] args) + public static BuildCommand FromArgs(string[] args, string msbuildPath = null) { var ret = new BuildCommand(); @@ -48,10 +48,8 @@ namespace Microsoft.DotNet.Tools.Build CommandOption noDependenciesOption = app.Option("--no-dependencies", LocalizableStrings.NoDependenciesOptionDescription, CommandOptionType.NoValue); CommandOption verbosityOption = MSBuildForwardingApp.AddVerbosityOption(app); - bool codeExecuted = false; app.OnExecute(() => { - codeExecuted = true; List<string> msbuildArgs = new List<string>(); if (!string.IsNullOrEmpty(projectArgument.Value)) @@ -107,15 +105,15 @@ namespace Microsoft.DotNet.Tools.Build msbuildArgs.AddRange(app.RemainingArguments); - ret._forwardingApp = new MSBuildForwardingApp(msbuildArgs); + ret._forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); return 0; }); - int exitCode = app.Execute(); - if (!codeExecuted) + int exitCode = app.Execute(args); + if (ret._forwardingApp == null) { - throw new NonZeroExitCodeException(exitCode); + throw new CodeNotExecutedException(exitCode); } return ret; @@ -130,7 +128,7 @@ namespace Microsoft.DotNet.Tools.Build { cmd = FromArgs(args); } - catch (NonZeroExitCodeException e) + catch (CodeNotExecutedException e) { return e.ExitCode; } @@ -148,11 +146,11 @@ namespace Microsoft.DotNet.Tools.Build return GetProcessStartInfo().Execute(); } - private class NonZeroExitCodeException : Exception + private class CodeNotExecutedException : Exception { public int ExitCode { get; private set; } - public NonZeroExitCodeException(int exitCode) + public CodeNotExecutedException(int exitCode) { ExitCode = exitCode; } diff --git a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs index 20b17a497..ee9e9aba8 100644 --- a/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs +++ b/src/dotnet/commands/dotnet-msbuild/MSBuildForwardingApp.cs @@ -34,7 +34,7 @@ namespace Microsoft.DotNet.Tools.MSBuild private readonly IEnumerable<string> _msbuildRequiredParameters = new List<string> { "/m", "/v:m" }; - public MSBuildForwardingApp(IEnumerable<string> argsToForward) + public MSBuildForwardingApp(IEnumerable<string> argsToForward, string msbuildPath = null) { if (Telemetry.CurrentSessionId != null) { @@ -55,7 +55,7 @@ namespace Microsoft.DotNet.Tools.MSBuild } _forwardingApp = new ForwardingApp( - GetMSBuildExePath(), + msbuildPath ?? GetMSBuildExePath(), _msbuildRequiredParameters.Concat(argsToForward.Select(Escape)), environmentVariables: _msbuildRequiredEnvironmentVariables); } diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index 2dcce552f..93ff61d82 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -1,21 +1,21 @@ using Microsoft.DotNet.Tools.Build; -using System; -using System.Collections.Generic; -using System.Text; using FluentAssertions; using Xunit; -using System.IO; namespace Microsoft.DotNet.Cli.MSBuild.Tests { public class GivenDotnetBuildInvocation { - [Fact] - public void WhenNoArgsArePassedThenMsbuildInvocationIsCorrect() + [Theory] + [InlineData(new string[] { }, @"exec <msbuildpath> /m /v:m /t:Build /clp:Summary")] + [InlineData(new string[] { "-o", "foo" }, @"exec <msbuildpath> /m /v:m /t:Build /p:OutputPath=foo /clp:Summary")] + [InlineData(new string[] { "--output", "foo" }, @"exec <msbuildpath> /m /v:m /t:Build /p:OutputPath=foo /clp:Summary")] + [InlineData(new string[] { "-o", "foo1 foo2" }, @"exec <msbuildpath> /m /v:m /t:Build ""/p:OutputPath=foo1 foo2"" /clp:Summary")] + public void WhenNoArgsArePassedThenMsbuildInvocationIsCorrect(string[] args, string expectedCommand) { - var msbuildPath = Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.dll"); - BuildCommand.FromArgs() - .GetProcessStartInfo().Arguments.Should().Be($@"exec {msbuildPath} /m /v:m /t:Build /clp:Summary"); + var msbuildPath = "<msbuildpath>"; + BuildCommand.FromArgs(args, msbuildPath) + .GetProcessStartInfo().Arguments.Should().Be(expectedCommand); } } } From 8ad8fe7e8eee2d19421fe22ee6d1088783b902e2 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Tue, 14 Feb 2017 16:23:33 -0800 Subject: [PATCH 31/40] complete dotnet-build invocation test cases --- .../GivenDotnetBuildInvocation.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index 93ff61d82..c150f66e0 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -11,7 +11,19 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests [InlineData(new string[] { "-o", "foo" }, @"exec <msbuildpath> /m /v:m /t:Build /p:OutputPath=foo /clp:Summary")] [InlineData(new string[] { "--output", "foo" }, @"exec <msbuildpath> /m /v:m /t:Build /p:OutputPath=foo /clp:Summary")] [InlineData(new string[] { "-o", "foo1 foo2" }, @"exec <msbuildpath> /m /v:m /t:Build ""/p:OutputPath=foo1 foo2"" /clp:Summary")] - public void WhenNoArgsArePassedThenMsbuildInvocationIsCorrect(string[] args, string expectedCommand) + [InlineData(new string[] { "--no-incremental" }, @"exec <msbuildpath> /m /v:m /t:Rebuild /clp:Summary")] + [InlineData(new string[] { "-f", "framework" }, @"exec <msbuildpath> /m /v:m /t:Build /p:TargetFramework=framework /clp:Summary")] + [InlineData(new string[] { "--framework", "framework" }, @"exec <msbuildpath> /m /v:m /t:Build /p:TargetFramework=framework /clp:Summary")] + [InlineData(new string[] { "-r", "runtime" }, @"exec <msbuildpath> /m /v:m /t:Build /p:RuntimeIdentifier=runtime /clp:Summary")] + [InlineData(new string[] { "--runtime", "runtime" }, @"exec <msbuildpath> /m /v:m /t:Build /p:RuntimeIdentifier=runtime /clp:Summary")] + [InlineData(new string[] { "-c", "configuration" }, @"exec <msbuildpath> /m /v:m /t:Build /p:Configuration=configuration /clp:Summary")] + [InlineData(new string[] { "--configuration", "configuration" }, @"exec <msbuildpath> /m /v:m /t:Build /p:Configuration=configuration /clp:Summary")] + [InlineData(new string[] { "--version-suffix", "mysuffix" }, @"exec <msbuildpath> /m /v:m /t:Build /p:VersionSuffix=mysuffix /clp:Summary")] + [InlineData(new string[] { "--no-dependencies" }, @"exec <msbuildpath> /m /v:m /t:Build /p:BuildProjectReferences=false /clp:Summary")] + [InlineData(new string[] { "-v", "verbosity" }, @"exec <msbuildpath> /m /v:m /t:Build /verbosity:verbosity /clp:Summary")] + [InlineData(new string[] { "--verbosity", "verbosity" }, @"exec <msbuildpath> /m /v:m /t:Build /verbosity:verbosity /clp:Summary")] + [InlineData(new string[] { "--no-incremental", "-o", "myoutput", "-r", "myruntime", "-v", "diag" }, @"exec <msbuildpath> /m /v:m /t:Rebuild /p:OutputPath=myoutput /p:RuntimeIdentifier=myruntime /verbosity:diag /clp:Summary")] + public void WhenArgsArePassedThenMsbuildInvocationIsCorrect(string[] args, string expectedCommand) { var msbuildPath = "<msbuildpath>"; BuildCommand.FromArgs(args, msbuildPath) From 531b0136eb7be510a38c1094813225af688eaf33 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Wed, 15 Feb 2017 10:38:41 -0800 Subject: [PATCH 32/40] add tests for checking filename, working dir and validation of presence of environmental variables --- src/dotnet/commands/dotnet-build/Program.cs | 8 ++-- .../NonWindowsOnlyFactAttribute.cs | 5 +- .../NonWindowsOnlyTheoryAttribute.cs | 19 ++++++++ .../WindowsOnlyFactAttribute.cs | 2 +- .../WindowsOnlyTheoryAttribute.cs | 7 ++- .../GivenDotnetBuildInvocation.cs | 46 +++++++++++++++++++ 6 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs diff --git a/src/dotnet/commands/dotnet-build/Program.cs b/src/dotnet/commands/dotnet-build/Program.cs index d5d45be56..855ba4cca 100644 --- a/src/dotnet/commands/dotnet-build/Program.cs +++ b/src/dotnet/commands/dotnet-build/Program.cs @@ -113,7 +113,7 @@ namespace Microsoft.DotNet.Tools.Build int exitCode = app.Execute(args); if (ret._forwardingApp == null) { - throw new CodeNotExecutedException(exitCode); + throw new CommandCreationException(exitCode); } return ret; @@ -128,7 +128,7 @@ namespace Microsoft.DotNet.Tools.Build { cmd = FromArgs(args); } - catch (CodeNotExecutedException e) + catch (CommandCreationException e) { return e.ExitCode; } @@ -146,11 +146,11 @@ namespace Microsoft.DotNet.Tools.Build return GetProcessStartInfo().Execute(); } - private class CodeNotExecutedException : Exception + private class CommandCreationException : Exception { public int ExitCode { get; private set; } - public CodeNotExecutedException(int exitCode) + public CommandCreationException(int exitCode) { ExitCode = exitCode; } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyFactAttribute.cs index d50d0a89e..7eda24788 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyFactAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyFactAttribute.cs @@ -1,3 +1,6 @@ +// 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.PlatformAbstractions; using Xunit; @@ -9,7 +12,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities { if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows) { - this.Skip = "This test requires windows to run"; + this.Skip = "This test requires non-Windows to run"; } } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs new file mode 100644 index 000000000..ccd7891d7 --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs @@ -0,0 +1,19 @@ +// 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.PlatformAbstractions; +using Xunit; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public class NonWindowsOnlyTheoryAttribute : TheoryAttribute + { + public NonWindowsOnlyTheoryAttribute() + { + if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows) + { + this.Skip = "This test requires non-Windows to run"; + } + } + } +} \ No newline at end of file diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs index 74318bb9e..7f9abcccb 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyFactAttribute.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities { if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) { - this.Skip = "This test requires windows to run"; + this.Skip = "This test requires Windows to run"; } } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs index d1e16f025..8a663433f 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/WindowsOnlyTheoryAttribute.cs @@ -1,4 +1,7 @@ -using Microsoft.DotNet.PlatformAbstractions; +// 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.PlatformAbstractions; using Xunit; namespace Microsoft.DotNet.Tools.Test.Utilities @@ -9,7 +12,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities { if (RuntimeEnvironment.OperatingSystemPlatform != Platform.Windows) { - this.Skip = "This test requires windows to run"; + this.Skip = "This test requires Windows to run"; } } } diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index c150f66e0..29b7d7503 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -1,6 +1,9 @@ using Microsoft.DotNet.Tools.Build; using FluentAssertions; using Xunit; +using WindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.WindowsOnlyFactAttribute; +using NonWindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.NonWindowsOnlyFactAttribute; +using System.Collections.Generic; namespace Microsoft.DotNet.Cli.MSBuild.Tests { @@ -29,5 +32,48 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests BuildCommand.FromArgs(args, msbuildPath) .GetProcessStartInfo().Arguments.Should().Be(expectedCommand); } + + [WindowsOnlyFact] + public void WhenInvokingBuildCommandOnWindowsTheDotnetIsExecuted() + { + var msbuildPath = "<msbuildpath>"; + BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo().FileName.Should().Be("dotnet.exe"); + } + + [NonWindowsOnlyFact] + public void WhenInvokingBuildCommandOnNonWindowsTheDotnetIsExecuted() + { + var msbuildPath = "<msbuildpath>"; + BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo().FileName.Should().Be("dotnet"); + } + + [Fact] + public void WhenInvokingBuildCommandItSetsEnvironmentVariables() + { + var expectedEnvironmentalVariables = new HashSet<string> { + "MSBuildExtensionsPath", + "CscToolExe", + "MSBuildSDKsPath", + "DOTNET_CLI_TELEMETRY_SESSIONID" + }; + + var msbuildPath = "<msbuildpath>"; + var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); + + foreach (var envVarName in expectedEnvironmentalVariables) + { + startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); + } + } + + [Fact] + public void WhenInvokingBuildCommandItDoesNotSetCurrentWorkingDirectory() + { + var msbuildPath = "<msbuildpath>"; + var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo().WorkingDirectory.Should().Be(""); + } } } From 27d358c88400fcc7e1f75e483da729a2d35d8fc1 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Wed, 15 Feb 2017 10:43:09 -0800 Subject: [PATCH 33/40] add EOLs in the end of files --- .../NonWindowsOnlyTheoryAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs index ccd7891d7..ca75b47dd 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/NonWindowsOnlyTheoryAttribute.cs @@ -16,4 +16,4 @@ namespace Microsoft.DotNet.Tools.Test.Utilities } } } -} \ No newline at end of file +} From 39feabd94163b5485af4e05f524b1aad1d3310a9 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Wed, 15 Feb 2017 12:28:13 -0800 Subject: [PATCH 34/40] patterns for environmental variables --- .../GivenDotnetBuildInvocation.cs | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index 29b7d7503..d360cfb32 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -49,23 +49,18 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests .GetProcessStartInfo().FileName.Should().Be("dotnet"); } - [Fact] - public void WhenInvokingBuildCommandItSetsEnvironmentVariables() + [Theory] + [InlineData("MSBuildExtensionsPath", "(?i)[\\/\\\\]netcoreapp[0-9]\\.[0-9]([\\/\\\\]|$)")] + [InlineData("CscToolExe", "(?i)[\\/\\\\](run)?csc(\\.|$)")] + [InlineData("MSBuildSDKsPath", "(?i)[\\/\\\\]\\d\\.\\d\\.\\d\\-[a-z]+\\-\\d+[\\/\\\\]sdks(\\/|\\\\|$)")] + [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID", "(^$|\\d+)")] + public void WhenInvokingBuildCommandItSetsEnvironmentVariables(string envVarName, string envVarPattern) { - var expectedEnvironmentalVariables = new HashSet<string> { - "MSBuildExtensionsPath", - "CscToolExe", - "MSBuildSDKsPath", - "DOTNET_CLI_TELEMETRY_SESSIONID" - }; - var msbuildPath = "<msbuildpath>"; var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); - foreach (var envVarName in expectedEnvironmentalVariables) - { - startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); - } + startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); + (startInfo.Environment[envVarName] ?? "").Should().MatchRegex(envVarPattern); } [Fact] From 1b7d4e32005d804a62219f1ab87743c9353f63c4 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Thu, 16 Feb 2017 13:33:09 -0800 Subject: [PATCH 35/40] split env var test --- .../GivenDotnetBuildInvocation.cs | 63 ++++++++++++++++--- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index d360cfb32..9763799bf 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -1,9 +1,11 @@ -using Microsoft.DotNet.Tools.Build; +using System.Collections.Generic; +using System.IO; +using Microsoft.DotNet.Tools.Build; using FluentAssertions; using Xunit; +using static Microsoft.DotNet.Tools.Test.Utilities.DirectoryInfoExtensions; using WindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.WindowsOnlyFactAttribute; using NonWindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.NonWindowsOnlyFactAttribute; -using System.Collections.Generic; namespace Microsoft.DotNet.Cli.MSBuild.Tests { @@ -50,17 +52,60 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests } [Theory] - [InlineData("MSBuildExtensionsPath", "(?i)[\\/\\\\]netcoreapp[0-9]\\.[0-9]([\\/\\\\]|$)")] - [InlineData("CscToolExe", "(?i)[\\/\\\\](run)?csc(\\.|$)")] - [InlineData("MSBuildSDKsPath", "(?i)[\\/\\\\]\\d\\.\\d\\.\\d\\-[a-z]+\\-\\d+[\\/\\\\]sdks(\\/|\\\\|$)")] - [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID", "(^$|\\d+)")] - public void WhenInvokingBuildCommandItSetsEnvironmentVariables(string envVarName, string envVarPattern) + [InlineData("MSBuildExtensionsPath")] + [InlineData("CscToolExe")] + [InlineData("MSBuildSDKsPath")] + [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] + public void WhenInvokingBuildCommandItSetsEnvironmentalVariables(string envVarName) { var msbuildPath = "<msbuildpath>"; var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); - startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); - (startInfo.Environment[envVarName] ?? "").Should().MatchRegex(envVarPattern); + } + + [Fact] + public void WhenInvokingBuildCommandItSetsMSBuildExtensionPathToExistingPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "MSBuildExtensionsPath"; + new DirectoryInfo(BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should() + .Exist(); + } + + [Fact] + public void WhenInvokingBuildCommandItSetsMSBuildSDKsPathToExistingPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "MSBuildSDKsPath"; + new DirectoryInfo(BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should() + .Exist(); + } + + [Fact] + public void WhenInvokingBuildCommandItSetsCscToolExePathToValidPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "CscToolExe"; + new FileInfo(BuildCommand.FromArgs(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should().NotBeNull("constructor will throw on invalid path"); + } + + [Fact] + public void WhenInvokingBuildCommandItSetsTelemetryEnvVar() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "DOTNET_CLI_TELEMETRY_SESSIONID"; + var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); + (startInfo.Environment[envVar] == null || int.TryParse(startInfo.Environment[envVar], out _)) + .Should().BeTrue("DOTNET_CLI_TELEMETRY_SESSIONID should be null or current session id"); } [Fact] From e6578eeb1437d3f4b1ab7265ed2b02db5a9a3885 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Thu, 16 Feb 2017 13:48:23 -0800 Subject: [PATCH 36/40] split msbuildforwardingapp unit tests with build invocation --- .../GivenDotnetBuildInvocation.cs | 90 +----------------- .../GivenMsbuildForwardingApp.cs | 95 +++++++++++++++++++ 2 files changed, 97 insertions(+), 88 deletions(-) create mode 100644 test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs diff --git a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs index 9763799bf..457297d45 100644 --- a/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs +++ b/test/dotnet-msbuild.Tests/GivenDotnetBuildInvocation.cs @@ -1,11 +1,6 @@ -using System.Collections.Generic; -using System.IO; -using Microsoft.DotNet.Tools.Build; +using Microsoft.DotNet.Tools.Build; using FluentAssertions; using Xunit; -using static Microsoft.DotNet.Tools.Test.Utilities.DirectoryInfoExtensions; -using WindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.WindowsOnlyFactAttribute; -using NonWindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.NonWindowsOnlyFactAttribute; namespace Microsoft.DotNet.Cli.MSBuild.Tests { @@ -28,92 +23,11 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests [InlineData(new string[] { "-v", "verbosity" }, @"exec <msbuildpath> /m /v:m /t:Build /verbosity:verbosity /clp:Summary")] [InlineData(new string[] { "--verbosity", "verbosity" }, @"exec <msbuildpath> /m /v:m /t:Build /verbosity:verbosity /clp:Summary")] [InlineData(new string[] { "--no-incremental", "-o", "myoutput", "-r", "myruntime", "-v", "diag" }, @"exec <msbuildpath> /m /v:m /t:Rebuild /p:OutputPath=myoutput /p:RuntimeIdentifier=myruntime /verbosity:diag /clp:Summary")] - public void WhenArgsArePassedThenMsbuildInvocationIsCorrect(string[] args, string expectedCommand) + public void MsbuildInvocationIsCorrect(string[] args, string expectedCommand) { var msbuildPath = "<msbuildpath>"; BuildCommand.FromArgs(args, msbuildPath) .GetProcessStartInfo().Arguments.Should().Be(expectedCommand); } - - [WindowsOnlyFact] - public void WhenInvokingBuildCommandOnWindowsTheDotnetIsExecuted() - { - var msbuildPath = "<msbuildpath>"; - BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo().FileName.Should().Be("dotnet.exe"); - } - - [NonWindowsOnlyFact] - public void WhenInvokingBuildCommandOnNonWindowsTheDotnetIsExecuted() - { - var msbuildPath = "<msbuildpath>"; - BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo().FileName.Should().Be("dotnet"); - } - - [Theory] - [InlineData("MSBuildExtensionsPath")] - [InlineData("CscToolExe")] - [InlineData("MSBuildSDKsPath")] - [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] - public void WhenInvokingBuildCommandItSetsEnvironmentalVariables(string envVarName) - { - var msbuildPath = "<msbuildpath>"; - var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); - startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); - } - - [Fact] - public void WhenInvokingBuildCommandItSetsMSBuildExtensionPathToExistingPath() - { - var msbuildPath = "<msbuildpath>"; - var envVar = "MSBuildExtensionsPath"; - new DirectoryInfo(BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo() - .Environment[envVar]) - .Should() - .Exist(); - } - - [Fact] - public void WhenInvokingBuildCommandItSetsMSBuildSDKsPathToExistingPath() - { - var msbuildPath = "<msbuildpath>"; - var envVar = "MSBuildSDKsPath"; - new DirectoryInfo(BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo() - .Environment[envVar]) - .Should() - .Exist(); - } - - [Fact] - public void WhenInvokingBuildCommandItSetsCscToolExePathToValidPath() - { - var msbuildPath = "<msbuildpath>"; - var envVar = "CscToolExe"; - new FileInfo(BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo() - .Environment[envVar]) - .Should().NotBeNull("constructor will throw on invalid path"); - } - - [Fact] - public void WhenInvokingBuildCommandItSetsTelemetryEnvVar() - { - var msbuildPath = "<msbuildpath>"; - var envVar = "DOTNET_CLI_TELEMETRY_SESSIONID"; - var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath).GetProcessStartInfo(); - (startInfo.Environment[envVar] == null || int.TryParse(startInfo.Environment[envVar], out _)) - .Should().BeTrue("DOTNET_CLI_TELEMETRY_SESSIONID should be null or current session id"); - } - - [Fact] - public void WhenInvokingBuildCommandItDoesNotSetCurrentWorkingDirectory() - { - var msbuildPath = "<msbuildpath>"; - var startInfo = BuildCommand.FromArgs(new string[0], msbuildPath) - .GetProcessStartInfo().WorkingDirectory.Should().Be(""); - } } } diff --git a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs new file mode 100644 index 000000000..b04887e2b --- /dev/null +++ b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs @@ -0,0 +1,95 @@ +using System.IO; +using Microsoft.DotNet.Tools.MSBuild; +using FluentAssertions; +using Xunit; +using static Microsoft.DotNet.Tools.Test.Utilities.DirectoryInfoExtensions; +using WindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.WindowsOnlyFactAttribute; +using NonWindowsOnlyFactAttribute = Microsoft.DotNet.Tools.Test.Utilities.NonWindowsOnlyFactAttribute; + +namespace Microsoft.DotNet.Cli.MSBuild.Tests +{ + public class GivenMsbuildForwardingApp + { + [WindowsOnlyFact] + public void DotnetExeIsExecuted() + { + var msbuildPath = "<msbuildpath>"; + new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo().FileName.Should().Be("dotnet.exe"); + } + + [NonWindowsOnlyFact] + public void DotnetIsExecuted() + { + var msbuildPath = "<msbuildpath>"; + new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo().FileName.Should().Be("dotnet"); + } + + [Theory] + [InlineData("MSBuildExtensionsPath")] + [InlineData("CscToolExe")] + [InlineData("MSBuildSDKsPath")] + [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] + public void ItSetsEnvironmentalVariables(string envVarName) + { + var msbuildPath = "<msbuildpath>"; + var startInfo = new MSBuildForwardingApp(new string[0], msbuildPath).GetProcessStartInfo(); + startInfo.Environment.ContainsKey(envVarName).Should().BeTrue(); + } + + [Fact] + public void ItSetsMSBuildExtensionPathToExistingPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "MSBuildExtensionsPath"; + new DirectoryInfo(new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should() + .Exist(); + } + + [Fact] + public void ItSetsMSBuildSDKsPathToExistingPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "MSBuildSDKsPath"; + new DirectoryInfo(new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should() + .Exist(); + } + + [Fact] + public void ItSetsCscToolExePathToValidPath() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "CscToolExe"; + new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should().NotBeNull("constructor will throw on invalid path"); + } + + [Fact] + public void ItSetsOrIgnoresTelemetrySessionId() + { + var msbuildPath = "<msbuildpath>"; + var envVar = "DOTNET_CLI_TELEMETRY_SESSIONID"; + var startInfo = new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo(); + (startInfo.Environment[envVar] == null || int.TryParse(startInfo.Environment[envVar], out _)) + .Should().BeTrue("DOTNET_CLI_TELEMETRY_SESSIONID should be null or current session id"); + } + + [Fact] + public void ItDoesNotSetCurrentWorkingDirectory() + { + var msbuildPath = "<msbuildpath>"; + var startInfo = new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo().WorkingDirectory.Should().Be(""); + } + } +} From 6f1ea62bc9b9b193d9b1564f99dc0d6dff59609b Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Thu, 16 Feb 2017 13:56:27 -0800 Subject: [PATCH 37/40] rename variable to buildCommand --- src/dotnet/commands/dotnet-build/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dotnet/commands/dotnet-build/Program.cs b/src/dotnet/commands/dotnet-build/Program.cs index 855ba4cca..5a8f9e37a 100644 --- a/src/dotnet/commands/dotnet-build/Program.cs +++ b/src/dotnet/commands/dotnet-build/Program.cs @@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Tools.Build public static BuildCommand FromArgs(string[] args, string msbuildPath = null) { - var ret = new BuildCommand(); + var buildCommand = new BuildCommand(); CommandLineApplication app = new CommandLineApplication(throwOnUnexpectedArg: false); app.Name = "dotnet build"; @@ -105,18 +105,18 @@ namespace Microsoft.DotNet.Tools.Build msbuildArgs.AddRange(app.RemainingArguments); - ret._forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); + buildCommand._forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); return 0; }); int exitCode = app.Execute(args); - if (ret._forwardingApp == null) + if (buildCommand._forwardingApp == null) { throw new CommandCreationException(exitCode); } - return ret; + return buildCommand; } public static int Run(string[] args) From ae05e8af1d37c99124ca5f76396ad6f7e31d5dd2 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher <mordotymoja@gmail.com> Date: Thu, 16 Feb 2017 14:18:23 -0800 Subject: [PATCH 38/40] remove parameterless constructor --- src/dotnet/commands/dotnet-build/Program.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/dotnet/commands/dotnet-build/Program.cs b/src/dotnet/commands/dotnet-build/Program.cs index 5a8f9e37a..b29348757 100644 --- a/src/dotnet/commands/dotnet-build/Program.cs +++ b/src/dotnet/commands/dotnet-build/Program.cs @@ -15,8 +15,6 @@ namespace Microsoft.DotNet.Tools.Build { private MSBuildForwardingApp _forwardingApp; - private BuildCommand() { } - public BuildCommand(IEnumerable<string> msbuildArgs, string msbuildPath = null) { _forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); @@ -24,8 +22,6 @@ namespace Microsoft.DotNet.Tools.Build public static BuildCommand FromArgs(string[] args, string msbuildPath = null) { - var buildCommand = new BuildCommand(); - CommandLineApplication app = new CommandLineApplication(throwOnUnexpectedArg: false); app.Name = "dotnet build"; app.FullName = LocalizableStrings.AppFullName; @@ -48,9 +44,12 @@ namespace Microsoft.DotNet.Tools.Build CommandOption noDependenciesOption = app.Option("--no-dependencies", LocalizableStrings.NoDependenciesOptionDescription, CommandOptionType.NoValue); CommandOption verbosityOption = MSBuildForwardingApp.AddVerbosityOption(app); + List<string> msbuildArgs = null; app.OnExecute(() => { - List<string> msbuildArgs = new List<string>(); + // this delayed initialization is here intentionally + // this code will not get run in some cases (i.e. --help) + msbuildArgs = new List<string>(); if (!string.IsNullOrEmpty(projectArgument.Value)) { @@ -105,18 +104,16 @@ namespace Microsoft.DotNet.Tools.Build msbuildArgs.AddRange(app.RemainingArguments); - buildCommand._forwardingApp = new MSBuildForwardingApp(msbuildArgs, msbuildPath); - return 0; }); int exitCode = app.Execute(args); - if (buildCommand._forwardingApp == null) + if (msbuildArgs == null) { throw new CommandCreationException(exitCode); } - return buildCommand; + return new BuildCommand(msbuildArgs, msbuildPath); } public static int Run(string[] args) From 0f919d7442aea9a93a37f83699abd573370d3245 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz <piotrp@microsoft.com> Date: Fri, 17 Feb 2017 02:41:41 -0800 Subject: [PATCH 39/40] fix merge --- build/Compile.targets | 60 +++++++++---------- ...Microsoft.DotNet.Cli.BundledRuntimes.props | 2 +- build/Version.props | 16 +++-- build/package/Nupkg.targets | 3 +- build/test/TestPackageProjects.targets | 4 +- 5 files changed, 45 insertions(+), 40 deletions(-) diff --git a/build/Compile.targets b/build/Compile.targets index 6b6027af4..a4a471d3e 100644 --- a/build/Compile.targets +++ b/build/Compile.targets @@ -63,36 +63,6 @@ VersionSuffix="$(CommitCount)" ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" /> - <!-- Corehostify Binaries --> - <ItemGroup Condition=" '$(OSName)' != 'win' "> - <SdkOutputChmodTargets Remove="*" /> - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe; - $(SdkOutputDirectory)/**/*.dll" > - <!-- Managed assemblies do not need execute --> - <Mode>u=rw,g=r,o=r</Mode> - </SdkOutputChmodTargets> - - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib; - $(SdkOutputDirectory)/**/*.so" > - <!-- Generally, dylibs and sos have 'x' --> - <Mode>u=rwx,g=rx,o=rx</Mode> - </SdkOutputChmodTargets> - - <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*" - Exclude="$(SdkOutputDirectory)/**/*.*" > - <!-- Executables need x --> - <Mode>u=rwx,g=rx,o=rx</Mode> - </SdkOutputChmodTargets> - </ItemGroup> - - <Chmod Condition=" '$(OSName)' != 'win' " - File="%(SdkOutputChModTargets.FullPath)" - Mode="%(SdkOutputChModTargets.Mode)" /> - - <RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json" - SectionName="runtimeTargets" - AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" /> - <RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json" SectionName="runtime" AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" /> @@ -178,6 +148,36 @@ @(CompileStageSdkDirectories); $(SharedFrameworkNameVersionPath)" /> + <!-- Corehostify Binaries --> + <ItemGroup Condition=" '$(OSName)' != 'win' "> + <SdkOutputChmodTargets Remove="*" /> + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe; + $(SdkOutputDirectory)/**/*.dll" > + <!-- Managed assemblies do not need execute --> + <Mode>u=rw,g=r,o=r</Mode> + </SdkOutputChmodTargets> + + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib; + $(SdkOutputDirectory)/**/*.so" > + <!-- Generally, dylibs and sos have 'x' --> + <Mode>u=rwx,g=rx,o=rx</Mode> + </SdkOutputChmodTargets> + + <SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*" + Exclude="$(SdkOutputDirectory)/**/*.*" > + <!-- Executables need x --> + <Mode>u=rwx,g=rx,o=rx</Mode> + </SdkOutputChmodTargets> + </ItemGroup> + + <Chmod Condition=" '$(OSName)' != 'win' " + File="%(SdkOutputChModTargets.FullPath)" + Mode="%(SdkOutputChModTargets.Mode)" /> + + <RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json" + SectionName="runtimeTargets" + AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" /> + <!-- Move the "1.0" assemblies back --> <Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')" DestinationFiles="@(NETCore10Assemblies)" /> diff --git a/build/Microsoft.DotNet.Cli.BundledRuntimes.props b/build/Microsoft.DotNet.Cli.BundledRuntimes.props index 449aaaf67..df527f812 100644 --- a/build/Microsoft.DotNet.Cli.BundledRuntimes.props +++ b/build/Microsoft.DotNet.Cli.BundledRuntimes.props @@ -17,7 +17,7 @@ <!-- Additional Shared Framework to be installed --> <PropertyGroup Condition=" '$(IncludeAdditionalSharedFrameworks)' == 'true' "> <AdditionalCoreSetupChannel>preview</AdditionalCoreSetupChannel> - <AdditionalSharedFrameworkVersion>1.0.3</AdditionalSharedFrameworkVersion> + <AdditionalSharedFrameworkVersion>1.0.4</AdditionalSharedFrameworkVersion> <AdditionalSharedHostVersion>1.0.1</AdditionalSharedHostVersion> <AdditionalHostFxrVersion>1.0.1</AdditionalHostFxrVersion> diff --git a/build/Version.props b/build/Version.props index 11e41049f..402ae0858 100644 --- a/build/Version.props +++ b/build/Version.props @@ -6,11 +6,17 @@ <ReleaseSuffix>alpha</ReleaseSuffix> <CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix> - <SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> - <VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix> - <NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion> - + <SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> + <SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</SimpleVersion> + + <VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix> + + <FullNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion> + + <NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion> + <NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion> + <SdkVersion>$(NugetVersion)</SdkVersion> - <SdkNugetVersion>$(SdkVersion)</SdkNugetVersion> + <SdkNugetVersion>$(NugetVersion)</SdkNugetVersion> </PropertyGroup> </Project> diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets index 0464b23a0..4e57d0c41 100644 --- a/build/package/Nupkg.targets +++ b/build/package/Nupkg.targets @@ -4,7 +4,6 @@ <Target Name="SetupProjectsToPack" DependsOnTargets="Init"> <PropertyGroup> - <NupkgVersionSuffix>$(CommitCount)</NupkgVersionSuffix> <ProjectsSrcDirectory>$(RepoRoot)/src</ProjectsSrcDirectory> <PackagingBuildBasePath>$(Stage2CompilationDirectory)/forPackaging</PackagingBuildBasePath> <NupkgOutputDirectory>$(PackagesDirectory)</NupkgOutputDirectory> @@ -26,7 +25,7 @@ Output="$(NupkgOutputDirectory)" ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj" ToolPath="$(Stage0Directory)" - VersionSuffix="$(ReleaseSuffix)-$(NupkgVersionSuffix)" + VersionSuffix="$(VersionSuffix)" Configuration="$(Configuration)" /> </Target> diff --git a/build/test/TestPackageProjects.targets b/build/test/TestPackageProjects.targets index 1c7a24c8a..4b7c98c80 100644 --- a/build/test/TestPackageProjects.targets +++ b/build/test/TestPackageProjects.targets @@ -32,8 +32,8 @@ <ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName> <IsTool>True</IsTool> <IsApplicable>True</IsApplicable> - <VersionPrefix>$(CliVersionPrefix)-</VersionPrefix> - <VersionSuffix>$(ReleaseSuffix)-$(TestPackageBuildVersionSuffix)</VersionSuffix> + <VersionPrefix>$(CliVersionPrefix)</VersionPrefix> + <VersionSuffix>$(VersionSuffix)</VersionSuffix> <Clean>False</Clean> <MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs> </BaseTestPackageProject> From 3ff78c64ff16b3c1000724e513255ab2bb7a31d9 Mon Sep 17 00:00:00 2001 From: Livar Cunha <livar@live.com> Date: Sat, 18 Feb 2017 22:03:36 -0800 Subject: [PATCH 40/40] Fixing the build breaks by removing duplicate RemoteAssetsFromDepsJson and by fixing VersionSuffix in some needed test packages, because now they import dirs.props and dirs.props eventually brings in VersionSuffix. --- .../dotnet-dependency-tool-invoker.csproj | 1 + .../TestPackages/dotnet-portable/dotnet-portable.csproj | 1 + .../dotnet-prefercliruntime/dotnet-prefercliruntime.csproj | 1 + build/Compile.targets | 4 ---- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj index 627218965..3d7b4134e 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj @@ -7,6 +7,7 @@ <AssemblyName>dotnet-dependency-tool-invoker</AssemblyName> <OutputType>Exe</OutputType> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback> + <VersionSuffix></VersionSuffix> </PropertyGroup> <PropertyGroup> diff --git a/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj index 65e89e284..ae9f8d61b 100644 --- a/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj +++ b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj @@ -5,6 +5,7 @@ <TargetFramework>netcoreapp1.0</TargetFramework> <AssemblyName>dotnet-portable</AssemblyName> <OutputType>Exe</OutputType> + <VersionSuffix></VersionSuffix> </PropertyGroup> <ItemGroup> diff --git a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj index a5f3b2ed6..5ee797803 100644 --- a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj +++ b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj @@ -4,6 +4,7 @@ <PropertyGroup> <TargetFramework>netcoreapp1.0</TargetFramework> <OutputType>Exe</OutputType> + <VersionSuffix></VersionSuffix> </PropertyGroup> <ItemGroup> diff --git a/build/Compile.targets b/build/Compile.targets index a4a471d3e..d82af9a49 100644 --- a/build/Compile.targets +++ b/build/Compile.targets @@ -174,10 +174,6 @@ File="%(SdkOutputChModTargets.FullPath)" Mode="%(SdkOutputChModTargets.Mode)" /> - <RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json" - SectionName="runtimeTargets" - AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" /> - <!-- Move the "1.0" assemblies back --> <Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')" DestinationFiles="@(NETCore10Assemblies)" />