From 872e96cfe2fe047d545de8215045d9e06c42a9b1 Mon Sep 17 00:00:00 2001 From: Mike Lorbetske Date: Mon, 23 Jan 2017 20:21:58 -0800 Subject: [PATCH 1/4] Update version of Microsoft.AspNetCore.Mvc --- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- .../commands/dotnet-new/CSharp_Web/$projectName$.csproj | 2 +- .../commands/dotnet-new/CSharp_Web1.1/$projectName$.csproj | 4 ++-- .../commands/dotnet-new/FSharp_Web/$projectName$.fsproj | 2 +- .../New3/GivenThatIWantANewAppWithSpecifiedType.cs | 4 ---- .../GivenThatTheUserIsRunningDotNetForTheFirstTime.cs | 4 ++-- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index 5c7bfc3964dc..98e6b47ada37 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -6,6 +6,6 @@ 1.0.0-alpha-20170118-3 1.0.0-alpha-20170114-1-223 15.0.0-preview-20170106-08 - 1.0.0-beta1-20170108-83 + 1.0.0-beta1-20170123-94 diff --git a/src/dotnet/commands/dotnet-new/CSharp_Web/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Web/$projectName$.csproj index 35d10cc4c216..fe8e903d9ce1 100644 --- a/src/dotnet/commands/dotnet-new/CSharp_Web/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Web/$projectName$.csproj @@ -9,6 +9,6 @@ - + diff --git a/src/dotnet/commands/dotnet-new/CSharp_Web1.1/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Web1.1/$projectName$.csproj index 17ceafd29b39..d47c2a3c406f 100644 --- a/src/dotnet/commands/dotnet-new/CSharp_Web1.1/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Web1.1/$projectName$.csproj @@ -6,9 +6,9 @@ - + - + diff --git a/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj index 6c1ac726bd3c..5d64ddfc6a06 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj @@ -20,7 +20,7 @@ - + diff --git a/test/dotnet-new.Tests/New3/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/New3/GivenThatIWantANewAppWithSpecifiedType.cs index b61565d83519..e680f6270ad3 100644 --- a/test/dotnet-new.Tests/New3/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/New3/GivenThatIWantANewAppWithSpecifiedType.cs @@ -41,10 +41,6 @@ public void TemplateRestoresAndBuildsWithoutWarnings( File.Copy("NuGet.tempaspnetpatch.config", Path.Combine(rootPath, "NuGet.Config")); } - string globalJsonPath = Path.Combine(rootPath, "global.json"); - Assert.True(File.Exists(globalJsonPath)); - Assert.Contains(Product.Version, File.ReadAllText(globalJsonPath)); - new TestCommand("dotnet") .WithWorkingDirectory(rootPath) .Execute($"restore") diff --git a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs index 9fe46af73db3..43b7fbe37a7e 100644 --- a/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs +++ b/test/dotnet.Tests/GivenThatTheUserIsRunningDotNetForTheFirstTime.cs @@ -82,7 +82,7 @@ public void ItCreatesASentinelFileUnderTheNuGetCacheFolder() { _nugetCacheFolder .Should() - .HaveFile($"{GetDotnetVersion()}.dotnetSentinel"); + .HaveFile($"{GetDotnetVersion()}.dotnetSentinel"); } [Fact] @@ -116,7 +116,7 @@ public void ItRestoresTheNuGetPackagesToTheNuGetCacheFolder() _nugetCacheFolder .GetDirectory("microsoft.aspnetcore.mvc") - .Should().HaveDirectories(new string[] { "1.0.2", "1.1.0" }); + .Should().HaveDirectories(new string[] { "1.0.2", "1.1.1" }); } private string GetDotnetVersion() From b31b2f429d1df8ae42a8f7eeedf2645f83c2edb9 Mon Sep 17 00:00:00 2001 From: Mike Lorbetske Date: Tue, 24 Jan 2017 00:43:47 -0800 Subject: [PATCH 2/4] Add NuGet feed --- NuGet.Config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.Config b/NuGet.Config index 559db7b7950d..64da20cde6dc 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -3,6 +3,7 @@ + From 131c63ae276cc253af56c63a798a33a1179d7af7 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Tue, 24 Jan 2017 02:30:24 -0800 Subject: [PATCH 3/4] Generate lzma nuget.config when needed --- NuGet.Config | 1 - .../Microsoft.DotNet.Cli.LzmaArchive.targets | 17 +++++++++++++++++ .../dotnet-cli-build/DotNetRestore.cs | 14 +++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/NuGet.Config b/NuGet.Config index 64da20cde6dc..559db7b7950d 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -3,7 +3,6 @@ - diff --git a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets index 06456c755704..f267e7394718 100644 --- a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets +++ b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets @@ -67,15 +67,31 @@ + + + <configuration> + <packageSources> + <add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" /> + </packageSources> + </configuration> + + $(NuGetPackagesArchiveProject)/Nuget.config + + + + @@ -85,6 +101,7 @@ WorkingDirectory="$(NuGetPackagesArchiveProject)/Web1.1" /> diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs index d3f1a2b4dfa3..05e531dea72a 100644 --- a/build_projects/dotnet-cli-build/DotNetRestore.cs +++ b/build_projects/dotnet-cli-build/DotNetRestore.cs @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } + get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetIgnoreMissingSources()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } } public string ConfigFile { get; set; } @@ -26,6 +26,8 @@ protected override string Args public string Packages { get; set; } public bool SkipInvalidConfigurations { get; set; } + + public bool IgnoreMissingSources { get; set; } public string Runtime { get; set; } @@ -78,6 +80,16 @@ private string GetSkipInvalidConfigurations() return null; } + + private string GetIgnoreMissingSources() + { + if (IgnoreMissingSources) + { + return "--ignore-failed-sources"; + } + + return null; + } private string GetRuntime() { From f4f325f1d51dba0c6795494e4b118fb353babb73 Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Tue, 24 Jan 2017 02:36:04 -0800 Subject: [PATCH 4/4] Cleanup --- .../Microsoft.DotNet.Cli.LzmaArchive.targets | 2 -- build_projects/dotnet-cli-build/DotNetRestore.cs | 14 +------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets index f267e7394718..a785e7b3ce99 100644 --- a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets +++ b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets @@ -91,7 +91,6 @@ WorkingDirectory="$(NuGetPackagesArchiveProject)/Web" /> @@ -101,7 +100,6 @@ WorkingDirectory="$(NuGetPackagesArchiveProject)/Web1.1" /> diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs index 05e531dea72a..d3f1a2b4dfa3 100644 --- a/build_projects/dotnet-cli-build/DotNetRestore.cs +++ b/build_projects/dotnet-cli-build/DotNetRestore.cs @@ -12,7 +12,7 @@ protected override string Command protected override string Args { - get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetIgnoreMissingSources()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } + get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } } public string ConfigFile { get; set; } @@ -26,8 +26,6 @@ protected override string Args public string Packages { get; set; } public bool SkipInvalidConfigurations { get; set; } - - public bool IgnoreMissingSources { get; set; } public string Runtime { get; set; } @@ -80,16 +78,6 @@ private string GetSkipInvalidConfigurations() return null; } - - private string GetIgnoreMissingSources() - { - if (IgnoreMissingSources) - { - return "--ignore-failed-sources"; - } - - return null; - } private string GetRuntime() {