From 4520c6498aa542ca6cf1a4158d996f789014ed2d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2020 17:55:52 -0800 Subject: [PATCH] [release/3.1] Update dependencies from dotnet/extensions (dotnet/aspnetcore-tooling#1496) * Update dependencies from https://github.com/dotnet/extensions build 20200115.6 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20065.6 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20065.6 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20065.6 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20065.6 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20065.6 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20064.4 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/dotnet/extensions build 20200115.7 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20065.7 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20065.7 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20065.7 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20065.7 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20065.7 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20064.4 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/dotnet/extensions build 20200115.8 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20065.8 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20065.8 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20065.8 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20065.8 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20065.8 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20065.7 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/dotnet/extensions build 20200115.9 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20065.9 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20065.9 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20065.9 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20065.9 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20065.9 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20065.9 (parent: Microsoft.Extensions.Logging) * Update dependencies from https://github.com/dotnet/extensions build 20200116.2 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20066.2 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20066.2 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20066.2 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20066.2 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20066.2 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20066.1 (parent: Microsoft.Extensions.Logging) * Add System.Text.Json to nuget.config * Update dependencies from https://github.com/dotnet/extensions build 20200116.3 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20066.3 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20066.3 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20066.3 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20066.3 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20066.3 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20066.1 (parent: Microsoft.Extensions.Logging) * fix nuget.config * Update dependencies from https://github.com/dotnet/extensions build 20200116.5 - Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.1.2-servicing.20066.5 - Microsoft.AspNetCore.Testing - 3.1.2-servicing.20066.5 - Microsoft.Extensions.CommandLineUtils.Sources - 3.1.2-servicing.20066.5 - Microsoft.Extensions.NonCapturingTimer.Sources - 3.1.2-servicing.20066.5 - Microsoft.Extensions.HashCodeCombiner.Sources - 3.1.2-servicing.20066.5 - Microsoft.Extensions.Logging - 3.1.2 Dependency coherency updates - Microsoft.NETCore.App.Runtime.win-x64 - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.Extensions.DependencyModel - 3.1.2 (parent: Microsoft.Extensions.Logging) - Microsoft.NETCore.App.Internal - 3.1.2-servicing.20066.6 (parent: Microsoft.Extensions.Logging) * fixup nuget.config * Rely on regular restores for RID-specific package restores (dotnet/aspnetcore-tooling#1502) * Rely on regular restores for RID-specific package restores * Pin the runtime to a previously shippped version in SDK tests * Update src/Razor/test/testapps/Directory.Build.targets Co-authored-by: William Godbe Co-authored-by: Pranav K \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/5fd301284eb58f9402374cf8f5a1b06440dc511e --- .../StaticWebAssetsIntegrationTest.cs | 11 ++--- ...AppWithPackageAndP2PReferenceAndRID.csproj | 41 +++++++++++++++++++ .../Program.cs | 13 ++++++ .../test/testassets/Directory.Build.targets | 6 ++- .../RestoreTestProjects.csproj | 1 + 5 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/AppWithPackageAndP2PReferenceAndRID.csproj create mode 100644 src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/Program.cs diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/StaticWebAssetsIntegrationTest.cs b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/StaticWebAssetsIntegrationTest.cs index cbaf6d7633..905d31f970 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/StaticWebAssetsIntegrationTest.cs +++ b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/StaticWebAssetsIntegrationTest.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.CommandLineUtils; using Xunit; using Xunit.Abstractions; @@ -83,15 +84,15 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileDoesNotExist(result, PublishOutputPath, "AppWithPackageAndP2PReference.StaticWebAssets.xml"); } - [Fact] - [InitializeTestProject("AppWithPackageAndP2PReference", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })] + [ConditionalFact] + [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] + [InitializeTestProject("AppWithPackageAndP2PReferenceAndRID", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })] public async Task Publish_CopiesStaticWebAssetsToDestinationFolder_PublishSingleFile() { - var runtimeIdentifier = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "win-x64" : (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "osx-x64" : "linux-x64"); - var result = await DotnetMSBuild("Publish", $"/restore /p:PublishSingleFile=true /p:RuntimeIdentifier={runtimeIdentifier}"); + var result = await DotnetMSBuild("Publish", $"/restore /p:PublishSingleFile=true /p:ReferenceLocallyBuiltPackages=true"); Assert.BuildPassed(result); - var publishOutputPath = GetRidSpecificPublishOutputPath(runtimeIdentifier); + var publishOutputPath = GetRidSpecificPublishOutputPath("win-x64"); Assert.FileExists(result, publishOutputPath, Path.Combine("wwwroot", "_content", "ClassLibrary", "js", "project-transitive-dep.js")); Assert.FileExists(result, publishOutputPath, Path.Combine("wwwroot", "_content", "ClassLibrary", "js", "project-transitive-dep.v4.js")); Assert.FileExists(result, publishOutputPath, Path.Combine("wwwroot", "_content", "ClassLibrary2", "css", "site.css")); diff --git a/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/AppWithPackageAndP2PReferenceAndRID.csproj b/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/AppWithPackageAndP2PReferenceAndRID.csproj new file mode 100644 index 0000000000..d657733943 --- /dev/null +++ b/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/AppWithPackageAndP2PReferenceAndRID.csproj @@ -0,0 +1,41 @@ + + + + $(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\ + + + + $(DefaultNetCoreTargetFramework) + win-x64 + $(MSBuildThisFileDirectory)..\TestPackageRestoreSource\ + $(RestoreAdditionalProjectSources);$(RuntimeAdditionalRestoreSources) + + + + + + + + + + false + + + + + + + + + + + + $(RepositoryRoot)artifacts\bin\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\$(Configuration)\netstandard2.0\ + + + + + + + + diff --git a/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/Program.cs b/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/Program.cs new file mode 100644 index 0000000000..dc3ac4e250 --- /dev/null +++ b/src/Razor/test/testassets/AppWithPackageAndP2PReferenceAndRID/Program.cs @@ -0,0 +1,13 @@ + +namespace AppWithP2PReference +{ + public class Program + { + public static void Main(string[] args) + { + // Just make sure we have a reference to the MvcShim + var t = typeof(Microsoft.AspNetCore.Mvc.IActionResult); + System.Console.WriteLine(t.FullName); + } + } +} diff --git a/src/Razor/test/testassets/Directory.Build.targets b/src/Razor/test/testassets/Directory.Build.targets index 4e299bd016..c2b36add81 100644 --- a/src/Razor/test/testassets/Directory.Build.targets +++ b/src/Razor/test/testassets/Directory.Build.targets @@ -2,7 +2,11 @@ - $(MicrosoftNETCoreApp31PackageVersion) + + $(MicrosoftNETCoreAppRefPackageVersion) 99.9 diff --git a/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj b/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj index 90b54c171b..3d29b2038c 100644 --- a/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj +++ b/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj @@ -10,6 +10,7 @@ +