Merge remote-tracking branch 'origin/release/2.1' into dev

This commit is contained in:
Pranav K 2018-03-26 14:09:52 -07:00
commit 07a58e90b4
No known key found for this signature in database
GPG Key ID: 1963DA6D96C3057A
11 changed files with 1 additions and 250 deletions

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.10
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 15.0.26730.03
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation", "src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj", "{4339FC9B-AEC6-442A-B413-A41555ED76C7}"
EndProject
@ -54,10 +54,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithCustomInputF
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryTagHelper", "testapps\ClassLibraryTagHelper\ClassLibraryTagHelper.csproj", "{196EF313-71CB-47A9-A77D-AACAF62881A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryWithPrecompiledViews", "testapps\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj", "{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationUsingPrecompiledViewClassLibrary", "testapps\ApplicationUsingPrecompiledViewClassLibrary\ApplicationUsingPrecompiledViewClassLibrary.csproj", "{037F4B73-75FB-4570-A38A-9109B580168C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithTagHelpers", "testapps\ApplicationWithTagHelpers\ApplicationWithTagHelpers.csproj", "{08552602-37E7-48A7-95A2-BB1A1F57C804}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPagesApp", "testapps\RazorPagesApp\RazorPagesApp.csproj", "{779BACC4-B20E-4F73-A9C7-350443CF1941}"
@ -229,30 +225,6 @@ Global
{196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x64.Build.0 = Release|Any CPU
{196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x86.ActiveCfg = Release|Any CPU
{196EF313-71CB-47A9-A77D-AACAF62881A1}.Release|x86.Build.0 = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x64.ActiveCfg = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x64.Build.0 = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x86.ActiveCfg = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Debug|x86.Build.0 = Debug|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|Any CPU.Build.0 = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x64.ActiveCfg = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x64.Build.0 = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x86.ActiveCfg = Release|Any CPU
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D}.Release|x86.Build.0 = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x64.ActiveCfg = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x64.Build.0 = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x86.ActiveCfg = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Debug|x86.Build.0 = Debug|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|Any CPU.Build.0 = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|x64.ActiveCfg = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|x64.Build.0 = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|x86.ActiveCfg = Release|Any CPU
{037F4B73-75FB-4570-A38A-9109B580168C}.Release|x86.Build.0 = Release|Any CPU
{08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08552602-37E7-48A7-95A2-BB1A1F57C804}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -342,8 +314,6 @@ Global
{559FBB83-40BC-47AF-A224-312CF8E3629B} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{8F73A290-BCE1-461A-9970-397FFBFCC902} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{196EF313-71CB-47A9-A77D-AACAF62881A1} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{68BB859F-E5D5-407E-9DFB-8CD478EFE90D} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{037F4B73-75FB-4570-A38A-9109B580168C} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{08552602-37E7-48A7-95A2-BB1A1F57C804} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{779BACC4-B20E-4F73-A9C7-350443CF1941} = {0DC7C88C-E3DB-46DF-B47E-AC5ECB2A16B7}
{996D4DEB-1701-435E-8048-1E65790C2050} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720}

View File

@ -1,42 +0,0 @@
// 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.Threading.Tasks;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
using Xunit.Abstractions;
namespace FunctionalTests
{
public class ApplicationConsumingPrecompiledViews_CoreCLR
: LoggedTest, IClassFixture<CoreCLRApplicationTestFixture<ApplicationUsingPrecompiledViewClassLibrary.Startup>>
{
public ApplicationConsumingPrecompiledViews_CoreCLR(
CoreCLRApplicationTestFixture<ApplicationUsingPrecompiledViewClassLibrary.Startup> fixture,
ITestOutputHelper output)
: base(output)
{
Fixture = fixture;
}
public ApplicationTestFixture Fixture { get; }
[Fact]
public async Task ConsumingClassLibrariesWithPrecompiledViewsWork()
{
// Arrange
using (StartLog(out var loggerFactory))
{
var deployment = await Fixture.CreateDeploymentAsync(loggerFactory);
// Act
var response = await deployment.HttpClient.GetStringWithRetryAsync(
"Manage/Home",
loggerFactory.CreateLogger(Fixture.ApplicationName));
// Assert
TestEmbeddedResource.AssertContent("ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt", response);
}
}
}
}

View File

@ -1,45 +0,0 @@
// 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.Threading.Tasks;
using Microsoft.AspNetCore.Testing.xunit;
using Microsoft.Extensions.Logging.Testing;
using Xunit;
using Xunit.Abstractions;
namespace FunctionalTests
{
[OSSkipCondition(OperatingSystems.Linux)]
[OSSkipCondition(OperatingSystems.MacOSX)]
public class ApplicationConsumingPrecompiledViews_Desktop
: LoggedTest, IClassFixture<DesktopApplicationTestFixture<ApplicationUsingPrecompiledViewClassLibrary.Startup>>
{
public ApplicationConsumingPrecompiledViews_Desktop(
DesktopApplicationTestFixture<ApplicationUsingPrecompiledViewClassLibrary.Startup> fixture,
ITestOutputHelper output)
: base(output)
{
Fixture = fixture;
}
public ApplicationTestFixture Fixture { get; }
[ConditionalFact]
public async Task ConsumingClassLibrariesWithPrecompiledViewsWork()
{
using (StartLog(out var loggerFactory))
{
// Arrange
var deployment = await Fixture.CreateDeploymentAsync(loggerFactory);
// Act
var response = await deployment.HttpClient.GetStringWithRetryAsync(
"Manage/Home",
loggerFactory.CreateLogger(Fixture.ApplicationName));
// Assert
TestEmbeddedResource.AssertContent("ApplicationConsumingPrecompiledViews.Manage.Home.Index.txt", response);
}
}
}
}

View File

@ -1,26 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>$(StandardTestAppTfms)</TargetFrameworks>
<ClassLibraryProjectPath>..\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj</ClassLibraryProjectPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(ClassLibraryProjectPath)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(MicrosoftAspNetCoreMvcPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="$(MicrosoftAspNetCoreServerKestrelPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(MicrosoftExtensionsConfigurationCommandLinePackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsolePackageVersion)" />
</ItemGroup>
<Target Name="CopyPrecompiledViewAssets" BeforeTargets="Publish">
<MSBuild Projects="$(ClassLibraryProjectPath)" Targets="MvcRazorPrecompile" Properties="TargetFramework=$(TargetFramework);Configuration=$(Configuration)" />
<ItemGroup>
<PrecompiledArtifacts Include="..\ClassLibraryWithPrecompiledViews\obj\precompiled\$(TargetFramework)\*.dll" />
</ItemGroup>
<Copy SourceFiles="@(PrecompiledArtifacts)" DestinationFolder="$(PublishDir)" />
</Target>
</Project>

View File

@ -1,26 +0,0 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace ApplicationUsingPrecompiledViewClassLibrary
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}

View File

@ -1,29 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace ApplicationUsingPrecompiledViewClassLibrary
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole();
app.UseMvc(routes =>
{
routes.MapRoute(name: "areaRoute",
template: "{area:exists}/{controller=Home}/{action=Index}");
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
}
}

View File

@ -1,10 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace ClassLibraryWithPrecompiledViews
{
[Area("Manage")]
public class HomeController : Controller
{
public IActionResult Index() => View();
}
}

View File

@ -1,9 +0,0 @@
@{
Layout = "_Layout";
}
<h1>Admin home page</h1>
@section TestSection {
Test section
}

View File

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html>
<body>
@GetType().Assembly.FullName
@RenderBody()
@RenderSection("TestSection")
</body>
</html>

View File

@ -1,15 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<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,9 +0,0 @@
namespace ClassLibraryWithPrecompiledViews
{
public class Program
{
public static void Main()
{
}
}
}