Update samples and tests to target netcoreapp2.1

This commit is contained in:
Pranav K 2017-11-15 11:03:08 -08:00
parent 02850d48dd
commit 7f1a987ada
55 changed files with 125 additions and 82 deletions

View File

@ -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" />

View File

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

View File

@ -1,2 +1,2 @@
version:2.1.0-preview1-15551
commithash:8fad9553b48533fddbb16a423ea55b9710ea2e63
version:2.1.0-preview1-15567
commithash:903e3104807b1bb8cddd28bdef205b1e2dc021d1

View File

@ -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)" />

View File

@ -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);
}
}

View File

@ -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)
{
}

View File

@ -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();

View File

@ -17,6 +17,6 @@ namespace FunctionalTests
{
}
protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.Clr);
protected override DeploymentParameters GetDeploymentParameters() => base.GetDeploymentParameters(RuntimeFlavor.Clr, "net461");
}
}

View File

@ -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();

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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