diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest22NetFx.cs b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest22NetFx.cs index 0e95335b42..263e20747c 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest22NetFx.cs +++ b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTest22NetFx.cs @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InitializeTestProject(TestProjectName)] - public async Task PublishingProject_CopyToOutputDirectoryFiles() + public async Task PublishingProject_CopyToPublishDirectoryItems() { TargetFramework = "net461"; @@ -51,17 +51,18 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests var result = await DotnetMSBuild("Publish"); Assert.BuildPassed(result); - // No cshtml files should be in the build output directory - Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml"); // refs shouldn't be produced by default Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "refs"), "*.dll"); + + // Views shouldn't be produced by default + Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml"); } [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InitializeTestProject(TestProjectName)] - public async Task PublishingProject_CopyToOutputDirectoryFiles_WithCopyRefAssembliesToPublishDirectory() + public async Task Publish_IncludesRefAssemblies_WhenCopyRefAssembliesToPublishDirectoryIsSet() { TargetFramework = "net461"; diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTestLegacy.cs b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTestLegacy.cs index 2c8cf9e865..f72de92966 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTestLegacy.cs +++ b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildIntegrationTestLegacy.cs @@ -152,6 +152,24 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } } + [Fact] + public async Task PublishingProject_CopyToPublishDirectoryItems() + { + using (CreateTestProject()) + { + // Build + var result = await DotnetMSBuild("Publish"); + + Assert.BuildPassed(result); + + // refs shouldn't be produced by default + Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "refs"), "*.dll"); + + // Views shouldn't be produced by default + Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml"); + } + } + [Fact] public virtual async Task Publish_IncludesRefAssemblies_WhenCopyRefAssembliesToPublishDirectoryIsSet() { diff --git a/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj b/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj index 4111cbd4dc..b7ae27c5e0 100644 --- a/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj +++ b/src/Razor/test/testassets/RestoreTestProjects/RestoreTestProjects.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Razor/test/testassets/SimpleMvc22NetFx/SimpleMvc22NetFx.csproj b/src/Razor/test/testassets/SimpleMvc22NetFx/SimpleMvc22NetFx.csproj index ab338c85c3..ba2f97732b 100644 --- a/src/Razor/test/testassets/SimpleMvc22NetFx/SimpleMvc22NetFx.csproj +++ b/src/Razor/test/testassets/SimpleMvc22NetFx/SimpleMvc22NetFx.csproj @@ -12,7 +12,6 @@ full -