From 424024ad0c30f7c6a4be4a8cf51d3998d3044ed5 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 7 Jan 2019 13:55:18 -0800 Subject: [PATCH 1/2] Update .NET Core version, and add test to catch when ASP.NET depends on a later version than we have Fixes https://github.com/dotnet/cli/issues/10553 --- eng/Versions.props | 2 +- test/EndToEnd/ProjectBuildTests.cs | 44 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index a8df7ff28..8e7e2ff4c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -28,7 +28,7 @@ $(MicrosoftAspNetCoreAppPackageVersion) - 3.0.0-preview-27218-01 + 3.0.0-preview-27219-3 $(MicrosoftNETCoreAppPackageVersion) diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index d7ee2553e..d3717b7ba 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -61,6 +61,50 @@ namespace EndToEnd.Tests binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories); } + [Fact] + public void ItCanRunAnAppUsingTheWebSdk() + { + var directory = TestAssets.CreateTestDirectory(); + string projectDirectory = directory.FullName; + + string newArgs = "console --debug:ephemeral-hive --no-restore"; + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + string projectPath = Path.Combine(projectDirectory, directory.Name + ".csproj"); + + var project = XDocument.Load(projectPath); + var ns = project.Root.Name.Namespace; + + project.Root.Attribute("Sdk").Value = "Microsoft.NET.Sdk.Web"; + + project.Save(projectPath); + + new BuildCommand() + .WithWorkingDirectory(projectDirectory) + .Execute() + .Should().Pass(); + + var runCommand = new RunCommand() + .WithWorkingDirectory(projectDirectory); + + // Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196 + var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); + if (!string.IsNullOrEmpty(dotnetRoot)) + { + bool useX86 = RepoDirectoriesProvider.DotnetRidUnderTest.EndsWith("x86", StringComparison.InvariantCultureIgnoreCase); + runCommand = runCommand.WithEnvironmentVariable(useX86 ? "DOTNET_ROOT(x86)" : "DOTNET_ROOT", + dotnetRoot); + } + + runCommand.ExecuteWithCapturedOutput() + .Should().Pass() + .And.HaveStdOutContaining("Hello World!"); + + } + [Theory] [InlineData("console")] [InlineData("classlib")] From 7c7f7bae6aa113c2b0bcf3b699dda6ecbf561e77 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 7 Jan 2019 17:53:44 -0800 Subject: [PATCH 2/2] Disable FreeBSD leg See https://github.com/dotnet/core-sdk/issues/248 --- .vsts-ci.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 899f481d1..69bc3d15e 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -238,16 +238,17 @@ jobs: Build_Release: _BuildConfig: Release -- template: /eng/build.yml - parameters: - agentOs: FreeBSD - queue: - name: dnceng-freebsd-internal - timeoutInMinutes: 180 - matrix: - Build_Release: - _BuildConfig: Release - _AdditionalBuildParameters: '/p:DisableSourceLink=true /p:DISABLE_CROSSGEN=true' +# https://github.com/dotnet/core-sdk/issues/248 +# - template: /eng/build.yml +# parameters: +# agentOs: FreeBSD +# queue: +# name: dnceng-freebsd-internal +# timeoutInMinutes: 180 +# matrix: +# Build_Release: +# _BuildConfig: Release +# _AdditionalBuildParameters: '/p:DisableSourceLink=true /p:DISABLE_CROSSGEN=true' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - job: Copy_SDK_To_Latest