| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751 |
- commit 7f1a987adaf246e03ffd1a58ab75b5e09b8d9b00
- Author: Pranav K <[email protected]>
- Date: Wed Nov 15 11:03:08 2017 -0800
- Update samples and tests to target netcoreapp2.1
- diff --git a/Directory.Build.props b/Directory.Build.props
- index d875d2bcb93..3ecf4afdd90 100644
- --- a/Directory.Build.props
- +++ b/Directory.Build.props
- @@ -1,4 +1,8 @@
- <Project>
- + <Import
- + Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
- + Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
- +
- <Import Project="version.props" />
- <Import Project="build\dependencies.props" />
-
- diff --git a/build/dependencies.props b/build/dependencies.props
- index 2f9e96ca984..775eb2d4d98 100644
- --- a/build/dependencies.props
- +++ b/build/dependencies.props
- @@ -4,20 +4,20 @@
- </PropertyGroup>
- <PropertyGroup Label="Package Versions">
- <InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15551</InternalAspNetCoreSdkPackageVersion>
- - <MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
- - <MicrosoftAspNetCoreHostingPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreHostingPackageVersion>
- - <MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreMvcPackageVersion>
- - <MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
- - <MicrosoftAspNetCoreRazorRuntimePackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreRazorRuntimePackageVersion>
- + <MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
- + <MicrosoftAspNetCoreHostingPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreHostingPackageVersion>
- + <MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreMvcPackageVersion>
- + <MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
- + <MicrosoftAspNetCoreRazorRuntimePackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreRazorRuntimePackageVersion>
- <MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.5.0-preview1-27498</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
- - <MicrosoftAspNetCoreServerKestrelPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreServerKestrelPackageVersion>
- - <MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-27498</MicrosoftAspNetCoreTestingPackageVersion>
- + <MicrosoftAspNetCoreServerKestrelPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreServerKestrelPackageVersion>
- + <MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-27579</MicrosoftAspNetCoreTestingPackageVersion>
- <MicrosoftBuildTasksCorePackageVersion>15.3.409</MicrosoftBuildTasksCorePackageVersion>
- - <MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
- - <MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
- - <MicrosoftExtensionsLoggingConsolePackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingConsolePackageVersion>
- - <MicrosoftExtensionsLoggingPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingPackageVersion>
- - <MicrosoftExtensionsLoggingTestingPackageVersion>2.1.0-preview1-27498</MicrosoftExtensionsLoggingTestingPackageVersion>
- + <MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-27579</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
- + <MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.1.0-preview1-27579</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
- + <MicrosoftExtensionsLoggingConsolePackageVersion>2.1.0-preview1-27579</MicrosoftExtensionsLoggingConsolePackageVersion>
- + <MicrosoftExtensionsLoggingPackageVersion>2.1.0-preview1-27579</MicrosoftExtensionsLoggingPackageVersion>
- + <MicrosoftExtensionsLoggingTestingPackageVersion>2.1.0-preview1-27579</MicrosoftExtensionsLoggingTestingPackageVersion>
- <MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
- <MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
- <XunitPackageVersion>2.3.0</XunitPackageVersion>
- diff --git a/korebuild-lock.txt b/korebuild-lock.txt
- index 86352477bbe..95f46130145 100644
- --- a/korebuild-lock.txt
- +++ b/korebuild-lock.txt
- @@ -1,2 +1,2 @@
- -version:2.1.0-preview1-15551
- -commithash:8fad9553b48533fddbb16a423ea55b9710ea2e63
- +version:2.1.0-preview1-15567
- +commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1
- diff --git a/test/Directory.Build.props b/test/Directory.Build.props
- index c867cbd1126..7ec143f84df 100644
- --- a/test/Directory.Build.props
- +++ b/test/Directory.Build.props
- @@ -1,6 +1,13 @@
- <Project>
- <Import Project="..\Directory.Build.props" />
-
- + <PropertyGroup>
- + <DeveloperBuildTestTfms>netcoreapp2.1</DeveloperBuildTestTfms>
- + <StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
- + <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">netcoreapp2.1;netcoreapp2.0</StandardTestTfms>
- + <StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
- + </PropertyGroup>
- +
- <ItemGroup>
- <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
- <PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
- diff --git a/test/FunctionalTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationConsumingPrecompiledViews_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationUsingRelativePathsTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationUsingRelativePathsTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationUsingRelativePathsTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationUsingRelativePathsTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationWithConfigureMvcTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationWithConfigureMvcTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithConfigureMvcTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationWithConfigureMvcTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationWithCustomInputFilesTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationWithCustomInputFilesTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithCustomInputFilesTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationWithCustomInputFilesTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationWithParseErrorsTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationWithParseErrorsTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithParseErrorsTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationWithParseErrorsTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationWithTagHelpersTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ApplicationWithTagHelpersTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithTagHelpersTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ApplicationWithTagHelpersTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/CopyBuildOutputToPublishDirectory_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/CopyBuildOutputToPublishDirectory_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/CopyBuildOutputToPublishDirectory_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/CopyBuildOutputToPublishDirectory_CoreCLR.cs
- diff --git a/test/FunctionalTests/CopyOutputSymbolsToPublishDirectoryTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/CopyOutputSymbolsToPublishDirectoryTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/CopyOutputSymbolsToPublishDirectoryTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/CopyOutputSymbolsToPublishDirectoryTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/Infrastructure/CoreCLRApplicationTestFixture.cs b/test/FunctionalTests/CoreCLRTests/CoreCLRApplicationTestFixture.cs
- similarity index 71%
- rename from test/FunctionalTests/Infrastructure/CoreCLRApplicationTestFixture.cs
- rename to test/FunctionalTests/CoreCLRTests/CoreCLRApplicationTestFixture.cs
- index 6f4c8625df1..d429b08de13 100644
- --- a/test/FunctionalTests/Infrastructure/CoreCLRApplicationTestFixture.cs
- +++ b/test/FunctionalTests/CoreCLRTests/CoreCLRApplicationTestFixture.cs
- @@ -7,6 +7,15 @@ namespace FunctionalTests
- {
- public class CoreCLRApplicationTestFixture<TStartup> : ApplicationTestFixture
- {
- + private const string TargetFramework =
- +#if NETCOREAPP2_0
- + "netcoreapp2.0";
- +#elif NETCOREAPP2_1
- + "netcoreapp2.1";
- +#else
- +#error Target frameworks need to be updated
- +#endif
- +
- public CoreCLRApplicationTestFixture()
- : this(typeof(TStartup).Assembly.GetName().Name, null)
- {
- @@ -17,6 +26,6 @@ namespace FunctionalTests
- {
- }
-
- - protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.CoreClr);
- + protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.CoreClr, TargetFramework);
- }
- }
- diff --git a/test/FunctionalTests/PublishForRidTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/PublishForRidTest_CoreCLR.cs
- similarity index 88%
- rename from test/FunctionalTests/PublishForRidTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/PublishForRidTest_CoreCLR.cs
- index fdbdcc96cd4..48dec3c9653 100644
- --- a/test/FunctionalTests/PublishForRidTest_CoreCLR.cs
- +++ b/test/FunctionalTests/CoreCLRTests/PublishForRidTest_CoreCLR.cs
- @@ -29,10 +29,17 @@ namespace FunctionalTests
- var applicationName = nameof(SimpleApp);
- var applicationPath = ApplicationPaths.GetTestAppDirectory(applicationName);
- var deploymentParameters = ApplicationTestFixture.GetDeploymentParameters(
- - applicationPath,
- - applicationName,
- - RuntimeFlavor.CoreClr);
- -
- + applicationPath,
- + applicationName,
- + RuntimeFlavor.CoreClr,
- +#if NETCOREAPP2_0
- + "netcoreapp2.0");
- +#elif NETCOREAPP2_1
- + "netcoreapp2.1");
- +#else
- +#error Target frameworks need to be updated
- +#endif
- +
- // Deploy for a rid that does not exist on the current platform.
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- @@ -49,7 +56,7 @@ namespace FunctionalTests
-
- // Act
- var expectedFile = Path.Combine(
- - deploymentParameters.PublishedApplicationRootPath,
- + deploymentParameters.PublishedApplicationRootPath,
- $"{applicationName}.PrecompiledViews.dll");
- Assert.True(File.Exists(expectedFile), $"Expected precompiled file {expectedFile} does not exist.");
- }
- @@ -57,7 +64,7 @@ namespace FunctionalTests
-
- private class DotNetPublishDeployer : ApplicationDeployer
- {
- - public DotNetPublishDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
- + public DotNetPublishDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
- : base(deploymentParameters, loggerFactory)
- {
- }
- diff --git a/test/FunctionalTests/PublishWithDebugTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/PublishWithDebugTest_CoreCLR.cs
- similarity index 81%
- rename from test/FunctionalTests/PublishWithDebugTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/PublishWithDebugTest_CoreCLR.cs
- index ca8658e8cfb..c66e4b68a5a 100644
- --- a/test/FunctionalTests/PublishWithDebugTest_CoreCLR.cs
- +++ b/test/FunctionalTests/CoreCLRTests/PublishWithDebugTest_CoreCLR.cs
- @@ -1,6 +1,7 @@
- // Copyright (c) .NET Foundation. All rights reserved.
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
- +using System.IO;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Server.IntegrationTesting;
- using Microsoft.Extensions.Logging.Testing;
- @@ -30,18 +31,19 @@ namespace FunctionalTests
- // Arrange
- var deployment = await Fixture.CreateDeploymentAsync(loggerFactory);
-
- - // Act
- - var response = await deployment.HttpClient.GetStringWithRetryAsync(
- - deployment.ApplicationBaseUri,
- - loggerFactory.CreateLogger(Fixture.ApplicationName));
- -
- // Assert
- - TestEmbeddedResource.AssertContent("SimpleAppTest.Home.Index.txt", response);
- + var expected = Path.Combine(deployment.ContentRoot, $"{Fixture.ApplicationName}.PrecompiledViews.dll");
- + Assert.True(File.Exists(expected), $"File {expected} does not exist.");
- }
- }
-
- public class TestFixture : CoreCLRApplicationTestFixture<SimpleApp.Startup>
- {
- + public TestFixture()
- + {
- + PublishOnly = true;
- + }
- +
- protected override DeploymentParameters GetDeploymentParameters()
- {
- var deploymentParameters = base.GetDeploymentParameters();
- diff --git a/test/FunctionalTests/PublishWithEmbedViewSourcesTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/PublishWithEmbedViewSourcesTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/PublishWithEmbedViewSourcesTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/PublishWithEmbedViewSourcesTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/RazorPagesAppTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/RazorPagesAppTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/RazorPagesAppTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/RazorPagesAppTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/SimpleAppTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/SimpleAppTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/SimpleAppTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/SimpleAppTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/SimpleAppWithAssemblyRenameTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/SimpleAppWithAssemblyRenameTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/SimpleAppWithAssemblyRenameTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/SimpleAppWithAssemblyRenameTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/StrongNamedAppTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/StrongNamedAppTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/StrongNamedAppTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/StrongNamedAppTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ViewCompilationOptionsTest_CoreCLR.cs b/test/FunctionalTests/CoreCLRTests/ViewCompilationOptionsTest_CoreCLR.cs
- similarity index 100%
- rename from test/FunctionalTests/ViewCompilationOptionsTest_CoreCLR.cs
- rename to test/FunctionalTests/CoreCLRTests/ViewCompilationOptionsTest_CoreCLR.cs
- diff --git a/test/FunctionalTests/ApplicationConsumingPrecompiledViews_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationConsumingPrecompiledViews_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationConsumingPrecompiledViews_Desktop.cs
- diff --git a/test/FunctionalTests/ApplicationUsingRelativePathsTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationUsingRelativePathsTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationUsingRelativePathsTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationUsingRelativePathsTest_Desktop.cs
- diff --git a/test/FunctionalTests/ApplicationWithConfigureMvcTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationWithConfigureMvcTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithConfigureMvcTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationWithConfigureMvcTest_Desktop.cs
- diff --git a/test/FunctionalTests/ApplicationWithCustomInputFilesTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationWithCustomInputFilesTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithCustomInputFilesTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationWithCustomInputFilesTest_Desktop.cs
- diff --git a/test/FunctionalTests/ApplicationWithParseErrorsTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationWithParseErrorsTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithParseErrorsTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationWithParseErrorsTest_Desktop.cs
- diff --git a/test/FunctionalTests/ApplicationWithTagHelpersTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ApplicationWithTagHelpersTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ApplicationWithTagHelpersTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ApplicationWithTagHelpersTest_Desktop.cs
- diff --git a/test/FunctionalTests/CopyBuildOutputToPublishDirectoryTest_Desktop.cs b/test/FunctionalTests/DesktopTests/CopyBuildOutputToPublishDirectoryTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/CopyBuildOutputToPublishDirectoryTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/CopyBuildOutputToPublishDirectoryTest_Desktop.cs
- diff --git a/test/FunctionalTests/CopyOutputSymbolsToPublishDirectoryTest_Desktop.cs b/test/FunctionalTests/DesktopTests/CopyOutputSymbolsToPublishDirectoryTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/CopyOutputSymbolsToPublishDirectoryTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/CopyOutputSymbolsToPublishDirectoryTest_Desktop.cs
- diff --git a/test/FunctionalTests/Infrastructure/DesktopApplicationTestFixture.cs b/test/FunctionalTests/DesktopTests/DesktopApplicationTestFixture.cs
- similarity index 90%
- rename from test/FunctionalTests/Infrastructure/DesktopApplicationTestFixture.cs
- rename to test/FunctionalTests/DesktopTests/DesktopApplicationTestFixture.cs
- index 7e3579a017c..a95dc59e7fa 100644
- --- a/test/FunctionalTests/Infrastructure/DesktopApplicationTestFixture.cs
- +++ b/test/FunctionalTests/DesktopTests/DesktopApplicationTestFixture.cs
- @@ -17,6 +17,6 @@ namespace FunctionalTests
- {
- }
-
- - protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.Clr);
- + protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.Clr, "net461");
- }
- }
- diff --git a/test/FunctionalTests/PublishWithDebugTest_Desktop.cs b/test/FunctionalTests/DesktopTests/PublishWithDebugTest_Desktop.cs
- similarity index 79%
- rename from test/FunctionalTests/PublishWithDebugTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/PublishWithDebugTest_Desktop.cs
- index 22c940ddbd3..0bc3ddb6ae4 100644
- --- a/test/FunctionalTests/PublishWithDebugTest_Desktop.cs
- +++ b/test/FunctionalTests/DesktopTests/PublishWithDebugTest_Desktop.cs
- @@ -1,6 +1,7 @@
- // Copyright (c) .NET Foundation. All rights reserved.
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
- +using System.IO;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Server.IntegrationTesting;
- using Microsoft.AspNetCore.Testing.xunit;
- @@ -26,6 +27,7 @@ namespace FunctionalTests
- public ApplicationTestFixture Fixture { get; }
-
- [ConditionalFact]
- + [Fact]
- public async Task PublishingInDebugWorks()
- {
- using (StartLog(out var loggerFactory))
- @@ -33,18 +35,19 @@ namespace FunctionalTests
- // Arrange
- var deployment = await Fixture.CreateDeploymentAsync(loggerFactory);
-
- - // Act
- - var response = await deployment.HttpClient.GetStringWithRetryAsync(
- - deployment.ApplicationBaseUri,
- - loggerFactory.CreateLogger(Fixture.ApplicationName));
- -
- // Assert
- - TestEmbeddedResource.AssertContent("SimpleAppTest.Home.Index.txt", response);
- + var expected = Path.Combine(deployment.ContentRoot, $"{Fixture.ApplicationName}.PrecompiledViews.dll");
- + Assert.True(File.Exists(expected), $"File {expected} does not exist.");
- }
- }
-
- - public class TestFixture : DesktopApplicationTestFixture<SimpleApp.Startup>
- + public class TestFixture : CoreCLRApplicationTestFixture<SimpleApp.Startup>
- {
- + public TestFixture()
- + {
- + PublishOnly = true;
- + }
- +
- protected override DeploymentParameters GetDeploymentParameters()
- {
- var deploymentParameters = base.GetDeploymentParameters();
- diff --git a/test/FunctionalTests/PublishWithEmbedViewSourcesTest_Desktop.cs b/test/FunctionalTests/DesktopTests/PublishWithEmbedViewSourcesTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/PublishWithEmbedViewSourcesTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/PublishWithEmbedViewSourcesTest_Desktop.cs
- diff --git a/test/FunctionalTests/RazorPagesAppTest_Desktop.cs b/test/FunctionalTests/DesktopTests/RazorPagesAppTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/RazorPagesAppTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/RazorPagesAppTest_Desktop.cs
- diff --git a/test/FunctionalTests/SimpleAppTest_Desktop.cs b/test/FunctionalTests/DesktopTests/SimpleAppTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/SimpleAppTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/SimpleAppTest_Desktop.cs
- diff --git a/test/FunctionalTests/SimpleAppWithAssemblyRenameTest_Desktop.cs b/test/FunctionalTests/DesktopTests/SimpleAppWithAssemblyRenameTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/SimpleAppWithAssemblyRenameTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/SimpleAppWithAssemblyRenameTest_Desktop.cs
- diff --git a/test/FunctionalTests/StrongNamedAppTest_Desktop.cs b/test/FunctionalTests/DesktopTests/StrongNamedAppTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/StrongNamedAppTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/StrongNamedAppTest_Desktop.cs
- diff --git a/test/FunctionalTests/ViewCompilationOptionsTest_Desktop.cs b/test/FunctionalTests/DesktopTests/ViewCompilationOptionsTest_Desktop.cs
- similarity index 100%
- rename from test/FunctionalTests/ViewCompilationOptionsTest_Desktop.cs
- rename to test/FunctionalTests/DesktopTests/ViewCompilationOptionsTest_Desktop.cs
- diff --git a/test/FunctionalTests/FunctionalTests.csproj b/test/FunctionalTests/FunctionalTests.csproj
- index 29ab9c41187..2ea5cec310d 100644
- --- a/test/FunctionalTests/FunctionalTests.csproj
- +++ b/test/FunctionalTests/FunctionalTests.csproj
- @@ -1,15 +1,21 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFramework>netcoreapp2.0</TargetFramework>
- + <TargetFrameworks>netcoreapp2.1</TargetFrameworks>
- + <TargetFrameworks Condition="'$(DeveloperBuild)'!='true'">$(TargetFrameworks);netcoreapp2.0</TargetFrameworks>
- +
- <DefineConstants>$(DefineConstants);__remove_this_to__GENERATE_BASELINES</DefineConstants>
- <DefineConstants Condition="'$(GenerateBaseLines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
- <SignAssembly>false</SignAssembly>
- <PublicSign>false</PublicSign>
- + <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
- </PropertyGroup>
-
- <ItemGroup>
- <EmbeddedResource Include="Resources\*" />
- + <Compile Include="Infrastructure\*.cs" />
- + <Compile Include="DesktopTests\*.cs" Condition="'$(TargetFramework)'=='net461'" />
- + <Compile Include="CoreCLRTests\*.cs" Condition="'$(TargetFramework)'=='netcoreapp2.0' OR '$(TargetFramework)'=='netcoreapp2.1'" />
- </ItemGroup>
-
- <ItemGroup>
- diff --git a/test/FunctionalTests/Infrastructure/ApplicationTestFixture.cs b/test/FunctionalTests/Infrastructure/ApplicationTestFixture.cs
- index 051f4cf2b65..56e988e05fc 100644
- --- a/test/FunctionalTests/Infrastructure/ApplicationTestFixture.cs
- +++ b/test/FunctionalTests/Infrastructure/ApplicationTestFixture.cs
- @@ -3,6 +3,7 @@
-
- using System;
- using System.Collections.Generic;
- +using System.Threading;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Server.IntegrationTesting;
- using Microsoft.Extensions.Logging;
- @@ -12,7 +13,7 @@ namespace FunctionalTests
- public abstract class ApplicationTestFixture : IDisposable
- {
- private const string DotnetCLITelemetryOptOut = "DOTNET_CLI_TELEMETRY_OPTOUT";
- - private readonly object _deploymentLock = new object();
- + private static readonly SemaphoreSlim _deploymentLock = new SemaphoreSlim(initialCount: 1);
- private Task<DeploymentResult> _deploymentTask;
- private IApplicationDeployer _deployer;
-
- @@ -30,14 +31,20 @@ namespace FunctionalTests
-
- protected abstract DeploymentParameters GetDeploymentParameters();
-
- - protected DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor)
- - => GetDeploymentParameters(ApplicationPath, ApplicationName, flavor);
- + protected DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor, string targetFramework)
- + => GetDeploymentParameters(ApplicationPath, ApplicationName, flavor, targetFramework);
-
- - public static DeploymentParameters GetDeploymentParameters(string applicationPath, string applicationName, RuntimeFlavor flavor)
- + public static DeploymentParameters GetDeploymentParameters(string applicationPath, string applicationName, RuntimeFlavor flavor, string targetFramework)
- {
- - var telemetryOptOut = new KeyValuePair<string, string>(
- - DotnetCLITelemetryOptOut,
- - "1");
- + // This determines the configuration of the the test project and consequently the configuration the src projects are most likely built in.
- + var projectConfiguration =
- +#if DEBUG
- + "Debug";
- +#elif RELEASE
- + "Release";
- +#else
- +#error Unknown configuration
- +#endif
-
- var deploymentParameters = new DeploymentParameters(
- applicationPath,
- @@ -47,16 +54,18 @@ namespace FunctionalTests
- {
- ApplicationName = applicationName,
- PublishApplicationBeforeDeployment = true,
- - TargetFramework = flavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0",
- Configuration = "Release",
- EnvironmentVariables =
- {
- - telemetryOptOut,
- + new KeyValuePair<string, string>(DotnetCLITelemetryOptOut, "1"),
- + new KeyValuePair<string, string>("SolutionConfiguration", projectConfiguration),
- },
- PublishEnvironmentVariables =
- {
- - telemetryOptOut,
- + new KeyValuePair<string, string>(DotnetCLITelemetryOptOut, "1"),
- + new KeyValuePair<string, string>("SolutionConfiguration", projectConfiguration),
- },
- + TargetFramework = targetFramework,
- };
-
- return deploymentParameters;
- @@ -74,8 +83,9 @@ namespace FunctionalTests
-
- public async Task<DeploymentResult> CreateDeploymentAsync(ILoggerFactory loggerFactory)
- {
- - lock (_deploymentLock)
- + try
- {
- + await _deploymentLock.WaitAsync(TimeSpan.FromSeconds(10));
- if (_deploymentTask == null)
- {
- var deploymentParameters = GetDeploymentParameters();
- @@ -91,6 +101,10 @@ namespace FunctionalTests
- _deploymentTask = _deployer.DeployAsync();
- }
- }
- + finally
- + {
- + _deploymentLock.Release();
- + }
-
- return await _deploymentTask;
- }
- diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj
- index 74c0b9d1611..06337dac6af 100644
- --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj
- +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
- </PropertyGroup>
-
- <ItemGroup>
- diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj
- index 9478314e473..631f5900b13 100644
- --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj
- +++ b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <ClassLibraryProjectPath>..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj</ClassLibraryProjectPath>
- </PropertyGroup>
-
- diff --git a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj
- index 85a0a8df382..f330f2386dc 100644
- --- a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj
- +++ b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
-
- diff --git a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj
- index 4aee9fb627c..f27f45283ba 100644
- --- a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj
- +++ b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- <DefineConstants>$(DefineConstants);TEST123</DefineConstants>
- </PropertyGroup>
- diff --git a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj
- index 95c4f130ad9..f9904ee7666 100644
- --- a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj
- +++ b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- <MvcRazorEmbedViewSources>true</MvcRazorEmbedViewSources>
- </PropertyGroup>
- diff --git a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj
- index 85a0a8df382..f330f2386dc 100644
- --- a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj
- +++ b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
-
- diff --git a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj
- index c6c8b6e41c1..d86ac254e60 100644
- --- a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj
- +++ b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
-
- diff --git a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj
- index f5366971887..309df3008e2 100644
- --- a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj
- +++ b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- - <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
- + <TargetFramework>netstandard2.0</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj
- index 4ba7c2f5c3b..b0e5e2f4174 100644
- --- a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj
- +++ b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj
- @@ -1,14 +1,14 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorOutputPath Condition="'$(TargetFramework)'!=''">obj\precompiled\$(TargetFramework)</MvcRazorOutputPath>
- <TestIncludeViewCompilationTargets>true</TestIncludeViewCompilationTargets>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(MicrosoftAspNetCoreMvcPackageVersion)" />
- + <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="$(MicrosoftAspNetCoreHostingPackageVersion)" />
- </ItemGroup>
-
- </Project>
- diff --git a/testapps/Directory.Build.props b/testapps/Directory.Build.props
- index 0094c38ae4a..35e9c46835d 100644
- --- a/testapps/Directory.Build.props
- +++ b/testapps/Directory.Build.props
- @@ -1,6 +1,13 @@
- <Project>
- <Import Project="..\Directory.Build.props" />
-
- + <PropertyGroup>
- + <DeveloperBuildTestAppTfms>netcoreapp2.1</DeveloperBuildTestAppTfms>
- + <StandardTestAppTfms>$(DeveloperBuildTestAppTfms)</StandardTestAppTfms>
- + <StandardTestAppTfms Condition=" '$(DeveloperBuild)' != 'true' ">netcoreapp2.1;netcoreapp2.0</StandardTestAppTfms>
- + <StandardTestAppTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestAppTfms);net461</StandardTestAppTfms>
- + </PropertyGroup>
- +
- <PropertyGroup>
- <!-- Override some repo-level properties not required for tests. -->
- <Version>1.0.0</Version>
- diff --git a/testapps/Directory.Build.targets b/testapps/Directory.Build.targets
- index a56638ed5cd..4b805513d64 100644
- --- a/testapps/Directory.Build.targets
- +++ b/testapps/Directory.Build.targets
- @@ -4,23 +4,20 @@
- <PropertyGroup>
- <_MvcViewCompilationAddDesktopReferences>false</_MvcViewCompilationAddDesktopReferences>
- <TestIncludeViewCompilationTargets Condition="'$(TestIncludeViewCompilationTargets)'==''">$(MvcRazorCompileOnPublish)</TestIncludeViewCompilationTargets>
- - <_MvcViewCompilationTasksPath>$(MSBuildThisFileDirectory)..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tasks\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tasks.dll</_MvcViewCompilationTasksPath>
- + <SolutionConfiguration Condition="'$(SolutionConfiguration)'==''">$(Configuration)</SolutionConfiguration>
- + <_MvcViewCompilationTasksPath>$(MSBuildThisFileDirectory)..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tasks\bin\$(SolutionConfiguration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tasks.dll</_MvcViewCompilationTasksPath>
- </PropertyGroup>
-
- <Import Project="..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets"
- Condition="'$(TestIncludeViewCompilationTargets)'=='true'"/>
-
- - <ItemGroup Condition="'$(TestIncludeViewCompilationTargets)'=='true'">
- - <ProjectReference Include="..\..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj" />
- - </ItemGroup>
- -
- <Target
- Name="SetMvcRazorViewCompilationBinaryPath"
- BeforeTargets="MvcRazorPrecompile"
- Condition="'$(TestIncludeViewCompilationTargets)'=='true'">
- <PropertyGroup>
- - <_MvcViewCompilationBinaryPath Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(MSBuildProjectDirectory)\$(OutputPath)Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll</_MvcViewCompilationBinaryPath>
- - <_MvcViewCompilationBinaryPath Condition="'$(TargetFramework)'=='net461'">$(MSBuildProjectDirectory)\$(OutputPath)Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe</_MvcViewCompilationBinaryPath>
- + <_MvcViewCompilationBinaryPath Condition="'$(TargetFramework)'!='net461'">$(MSBuildThisFileDirectory)..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\bin\$(SolutionConfiguration)\netcoreapp2.0\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll</_MvcViewCompilationBinaryPath>
- + <_MvcViewCompilationBinaryPath Condition="'$(TargetFramework)'=='net461'">$(MSBuildThisFileDirectory)..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\bin\$(SolutionConfiguration)\net461\win7-x86\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe</_MvcViewCompilationBinaryPath>
- </PropertyGroup>
- </Target>
- </Project>
- diff --git a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj
- index 9f3dc474900..1362dd84ec2 100644
- --- a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj
- +++ b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- <MvcRazorEmbedViewSources>true</MvcRazorEmbedViewSources>
- </PropertyGroup>
- diff --git a/testapps/RazorPagesApp/RazorPagesApp.csproj b/testapps/RazorPagesApp/RazorPagesApp.csproj
- index 9c7c5ab6b04..5ab7219211f 100644
- --- a/testapps/RazorPagesApp/RazorPagesApp.csproj
- +++ b/testapps/RazorPagesApp/RazorPagesApp.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
-
- diff --git a/testapps/SimpleApp/SimpleApp.csproj b/testapps/SimpleApp/SimpleApp.csproj
- index f5f65c45cae..f57d869aebf 100644
- --- a/testapps/SimpleApp/SimpleApp.csproj
- +++ b/testapps/SimpleApp/SimpleApp.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <RuntimeIdentifiers>win7-x86;debian-x64</RuntimeIdentifiers>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
- diff --git a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj
- index bee405d99b0..1a8db3562d4 100644
- --- a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj
- +++ b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj
- @@ -2,8 +2,7 @@
-
- <PropertyGroup>
- <AssemblyName>NewAssemblyName</AssemblyName>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
- </PropertyGroup>
-
- diff --git a/testapps/StrongNamedApp/StrongNamedApp.csproj b/testapps/StrongNamedApp/StrongNamedApp.csproj
- index d72479411d6..96917465907 100644
- --- a/testapps/StrongNamedApp/StrongNamedApp.csproj
- +++ b/testapps/StrongNamedApp/StrongNamedApp.csproj
- @@ -1,8 +1,7 @@
- <Project Sdk="Microsoft.NET.Sdk.Web">
-
- <PropertyGroup>
- - <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
- - <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
- + <TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
- <SignAssembly>true</SignAssembly>
- <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
- <MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|