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 @@
+