Remove net451 targets
This commit is contained in:
parent
c4a9247f87
commit
1026198b9b
|
|
@ -1,18 +1,4 @@
|
|||
{
|
||||
"adx": {
|
||||
"rules": [
|
||||
"DefaultCompositeRule"
|
||||
],
|
||||
"packages": {
|
||||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation": {
|
||||
"exclusions": {
|
||||
"DOC_MISSING": {
|
||||
"lib/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll": "Not a class library. Docs not required for CLI tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Default": {
|
||||
"rules": [
|
||||
"DefaultCompositeRule"
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{87FEE984
|
|||
build\common.props = build\common.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86", "tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.csproj", "{9F47A520-7DAB-409D-81C8-AD351562A1A5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -43,10 +41,6 @@ Global
|
|||
{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9F47A520-7DAB-409D-81C8-AD351562A1A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9F47A520-7DAB-409D-81C8-AD351562A1A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F47A520-7DAB-409D-81C8-AD351562A1A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F47A520-7DAB-409D-81C8-AD351562A1A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -55,6 +49,5 @@ Global
|
|||
{4339FC9B-AEC6-442A-B413-A41555ED76C7} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720}
|
||||
{46C9A4B2-8B1C-451B-B670-C194901D66AC} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB}
|
||||
{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB}
|
||||
{9F47A520-7DAB-409D-81C8-AD351562A1A5} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
use assembly="System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
use assembly="System.IO.Compression.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
|
||||
use namespace="System.IO"
|
||||
use namespace="System.IO.Compression"
|
||||
use namespace="System.Linq"
|
||||
|
||||
use-standard-lifecycle
|
||||
k-standard-goals
|
||||
|
||||
#repack-x86 target='compile' if='Directory.Exists("src") && !IsLinux'
|
||||
@{
|
||||
var buildDir= Path.Combine(Directory.GetCurrentDirectory(), "artifacts", "build");
|
||||
var projectName = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation";
|
||||
var projectNupkg = Files
|
||||
.Include(Path.Combine(buildDir, projectName + "*.nupkg"))
|
||||
.Where(path => !path.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase))
|
||||
.OrderByDescending(f => f) // On local builds multiple nupkgs are generated.
|
||||
.First();
|
||||
|
||||
Log.Info("Repacking Nupkg: " + projectNupkg);
|
||||
|
||||
using (var zipArchive = ZipFile.Open(projectNupkg, ZipArchiveMode.Update))
|
||||
{
|
||||
MoveEntry(zipArchive, "lib/net451/" + projectName + ".exe", "runtimes/win7-x64/lib/net451/" + projectName + ".exe");
|
||||
MoveEntry(zipArchive, "lib/net451/" + projectName + "-x86.exe", "runtimes/win7-x86/lib/net451/" + projectName + "-x86.exe");
|
||||
zipArchive.CreateEntry("lib/net451/_._");
|
||||
}
|
||||
}
|
||||
|
||||
functions @{
|
||||
private static void MoveEntry(ZipArchive archive, string oldPath, string newPath)
|
||||
{
|
||||
var oldEntry = archive.GetEntry(oldPath);
|
||||
if (oldEntry == null)
|
||||
{
|
||||
throw new Exception(oldPath + " was not found in package.");
|
||||
}
|
||||
|
||||
var newEntry = archive.CreateEntry(newPath);
|
||||
using (var newStream = newEntry.Open())
|
||||
using (var oldStream = oldEntry.Open())
|
||||
{
|
||||
oldStream.CopyTo(newStream);
|
||||
}
|
||||
|
||||
oldEntry.Delete();
|
||||
}
|
||||
}
|
||||
|
|
@ -2,22 +2,19 @@
|
|||
<Import Project="..\..\build\common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>Build-time references required to enable Razor view compilation as part of building the application.</Description>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<PackageTags>cshtml;razor;compilation;precompilation;aspnetcore</PackageTags>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<OutputType>exe</OutputType>
|
||||
<X86ProjectDirectory>..\..\tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86\</X86ProjectDirectory>
|
||||
<!-- Include the build outputs in the build directory (and not the lib directory) -->
|
||||
<BuildOutputTargetFolder>build</BuildOutputTargetFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="build\**\*" Pack="true" PackagePath="%(Identity)" />
|
||||
<None Include="buildMultiTargeting\*" Pack="true" PackagePath="%(Identity)" />
|
||||
<None Include="$(X86ProjectDirectory)\bin\$(Configuration)\net451\$(MSBuildThisFileName)-x86.exe" Pack="true" PackagePath="lib\net451\$(MSBuildThisFileName)-x86.exe" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.2.0-*" />
|
||||
<ProjectReference Include="$(X86ProjectDirectory)$(MSBuildThisFileName)-x86.csproj" PrivateAssets="true" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='net451'" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\common.targets" />
|
||||
<PropertyGroup Condition="'$(MvcRazorRunCommand)'==''">
|
||||
<MvcRazorRunCommand Condition="'$(PlatformTarget)'=='x86'">$(OutputPath)$(MSBuildThisFileName)-x86.exe</MvcRazorRunCommand>
|
||||
<MvcRazorRunCommand Condition="'$(PlatformTarget)'!='x86'">$(OutputPath)$(MSBuildThisFileName).exe</MvcRazorRunCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target
|
||||
Name="MvcRazorPrecompile"
|
||||
DependsOnTargets="_ResolveInputArguments"
|
||||
Inputs="$(MSBuildThisFileFullPath);@(MvcRazorFilesToCompile);@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePath);$(MSBuildAllProjects);"
|
||||
Outputs="$(_MvcRazorOutputFullPath)">
|
||||
|
||||
<CallTarget Targets="_CreateResponseFileForMvcRazorPrecompile" />
|
||||
|
||||
<ItemGroup Condition="'$(PlatformTarget)'=='x86'">
|
||||
<FilesToCopy Include="$(OutputPath)$(AssemblyName).exe.config">
|
||||
<Destination>$(OutputPath)$(MSBuildThisFileName)-x86.exe.config</Destination>
|
||||
</FilesToCopy>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(PlatformTarget)'!='x86'">
|
||||
<FilesToCopy Include="$(OutputPath)$(AssemblyName).exe.config" Condition="">
|
||||
<Destination>$(OutputPath)$(MSBuildThisFileName).exe.config</Destination>
|
||||
</FilesToCopy>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(FilesToCopy)"
|
||||
DestinationFiles="%(Destination)" />
|
||||
|
||||
<Message
|
||||
Text="Executing Razor view precompilation."
|
||||
Importance="Low" />
|
||||
|
||||
<Exec
|
||||
Command="$(MvcRazorRunCommand) @"$(_MvcRazorResponseFilePath)""
|
||||
WorkingDirectory="$(MSBuildProjectDirectory)"/>
|
||||
|
||||
<Message
|
||||
Text="Razor view compilation for $(MSBuildProjectName) -> $(_MvcRazorOutputFullPath)"
|
||||
Importance="High" />
|
||||
|
||||
<Delete Files="%(FilesToCopy.Destination)" />
|
||||
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<PropertyGroup>
|
||||
<ExecArgs>--runtimeconfig "$(ProjectRuntimeConfigFilePath)"</ExecArgs>
|
||||
<ExecArgs>$(ExecArgs) --depsfile "$(ProjectDepsFilePath)"</ExecArgs>
|
||||
<ExecArgs>$(ExecArgs) "$(MSBuildThisFileDirectory)../../lib/netcoreapp1.1/$(MSBuildThisFileName).dll"</ExecArgs>
|
||||
<ExecArgs>$(ExecArgs) "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll"</ExecArgs>
|
||||
<ExecArgs>$(ExecArgs) @"$(_MvcRazorResponseFilePath)"</ExecArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0.
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
**********************************************************************************
|
||||
Target: ResolveRazorTargetFramework
|
||||
Outputs the Razor target framework used by tooling to the console.
|
||||
**********************************************************************************
|
||||
-->
|
||||
<Target Name="ResolveRazorTargetFramework">
|
||||
<MSBuild Projects="$(MSBuildProjectFile)"
|
||||
Targets="ResolveRazorTargetFramework"
|
||||
Properties="TargetFramework=$(TargetFrameworks.Split(';')[0])">
|
||||
</MSBuild>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -2,13 +2,10 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Xunit;
|
||||
|
|
@ -25,18 +22,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[ConditionalTheory]
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux,
|
||||
SkipReason = "https://github.com/NuGet/Home/issues/4243, https://github.com/NuGet/Home/issues/4240")]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX,
|
||||
SkipReason = "https://github.com/NuGet/Home/issues/4243, https://github.com/NuGet/Home/issues/4240")]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task ConsumingClassLibrariesWithPrecompiledViewsWork(RuntimeFlavor flavor)
|
||||
public async Task ConsumingClassLibrariesWithPrecompiledViewsWork()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_WorksForViewsUsingRelativePath(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_WorksForViewsUsingRelativePath()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
@ -38,12 +35,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_WorksForViewsUsingDirectoryTraversal(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_WorksForViewsUsingDirectoryTraversal()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
|
|
@ -19,14 +16,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_RunsConfiguredCompilationCallbacks(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_RunsConfiguredCompilationCallbacks()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
@ -40,12 +34,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_UsesConfiguredParseOptions(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_UsesConfiguredParseOptions()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// 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 Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
@ -22,14 +21,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task ApplicationWithCustomInputFiles_Works(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task ApplicationWithCustomInputFiles_Works()
|
||||
{
|
||||
var expectedText = "Hello Index!";
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
// Arrange
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
|
@ -44,9 +40,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task MvcRazorFilesToCompile_OverridesTheFilesToBeCompiled(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task MvcRazorFilesToCompile_OverridesTheFilesToBeCompiled()
|
||||
{
|
||||
// Arrange
|
||||
var expectedViews = new[]
|
||||
|
|
@ -55,7 +50,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
"/Views/Home/Index.cshtml",
|
||||
};
|
||||
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
@ -71,9 +66,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public void MvcRazorFilesToCompile_SpecificallyDoesNotPublishFilesToBeCompiled(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public void MvcRazorFilesToCompile_SpecificallyDoesNotPublishFilesToBeCompiled()
|
||||
{
|
||||
// Arrange
|
||||
var viewsNotPublished = new[]
|
||||
|
|
@ -87,7 +81,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
"NotIncluded.cshtml",
|
||||
};
|
||||
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
var viewsDirectory = Path.Combine(deploymentResult.ContentRoot, "Views", "Home");
|
||||
|
|
|
|||
|
|
@ -20,11 +20,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationWithParseErrorsFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public void PublishingPrintsParseErrors(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public void PublishingPrintsParseErrors()
|
||||
{
|
||||
var indexPath = Path.Combine(Fixture.ApplicationPath, "Views", "Home", "Index.cshtml");
|
||||
var viewImportsPath = Path.Combine(Fixture.ApplicationPath, "Views", "Home", "About.cshtml");
|
||||
|
|
@ -34,7 +31,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
viewImportsPath + " (1): A space or line break was encountered after the \"@\" character. Only valid identifiers, keywords, comments, \"(\" and \"{\" are valid at the start of a code block and they must occur immediately following \"@\" with no space in between.",
|
||||
|
||||
};
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
// Act & Assert
|
||||
Assert.Throws<Exception>(() => deployer.Deploy());
|
||||
|
|
@ -49,7 +46,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public class ApplicationWithParseErrorsFixture : ApplicationTestFixture
|
||||
{
|
||||
public ApplicationWithParseErrorsFixture()
|
||||
|
|
@ -59,9 +55,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public TestSink TestSink { get; } = new TestSink();
|
||||
|
||||
protected override ILogger CreateLogger(RuntimeFlavor flavor)
|
||||
protected override ILogger CreateLogger()
|
||||
{
|
||||
return new TestLoggerFactory(TestSink, enabled: true).CreateLogger($"{ApplicationName}:{flavor}");
|
||||
return new TestLoggerFactory(TestSink, enabled: true).CreateLogger($"{ApplicationName}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
// 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.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
|
|
@ -19,27 +16,24 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static IEnumerable<object[]> ApplicationWithTagHelpersData
|
||||
public static TheoryData ApplicationWithTagHelpersData
|
||||
{
|
||||
get
|
||||
{
|
||||
var urls = new[]
|
||||
return new TheoryData<string>
|
||||
{
|
||||
"ClassLibraryTagHelper",
|
||||
"LocalTagHelper",
|
||||
"NuGetPackageTagHelper",
|
||||
};
|
||||
|
||||
return Enumerable.Zip(urls, RuntimeFlavors.SupportedFlavors, (a, b) => new object[] { a, b });
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ApplicationWithTagHelpersData))]
|
||||
public async Task Precompilation_WorksForViewsThatUseTagHelpers(string url, RuntimeFlavor flavor)
|
||||
public async Task Precompilation_WorksForViewsThatUseTagHelpers(string url)
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -37,16 +37,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ILogger Logger { get; private set; }
|
||||
|
||||
public IApplicationDeployer CreateDeployment(RuntimeFlavor flavor)
|
||||
public IApplicationDeployer CreateDeployment()
|
||||
{
|
||||
PrepareForDeployment(flavor);
|
||||
var deploymentParameters = GetDeploymentParameters(flavor);
|
||||
PrepareForDeployment();
|
||||
var deploymentParameters = GetDeploymentParameters();
|
||||
return ApplicationDeployerFactory.Create(deploymentParameters, Logger);
|
||||
}
|
||||
|
||||
public virtual void PrepareForDeployment(RuntimeFlavor flavor)
|
||||
public virtual void PrepareForDeployment()
|
||||
{
|
||||
Logger = CreateLogger(flavor);
|
||||
Logger = CreateLogger();
|
||||
|
||||
if (!_isRestored)
|
||||
{
|
||||
|
|
@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
public virtual DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor)
|
||||
public virtual DeploymentParameters GetDeploymentParameters()
|
||||
{
|
||||
var tempRestoreDirectoryEnvironment = new KeyValuePair<string, string>(
|
||||
NuGetPackagesEnvironmentKey,
|
||||
|
|
@ -72,11 +72,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
var deploymentParameters = new DeploymentParameters(
|
||||
ApplicationPath,
|
||||
ServerType.Kestrel,
|
||||
flavor,
|
||||
RuntimeFlavor.CoreClr,
|
||||
RuntimeArchitecture.x64)
|
||||
{
|
||||
PublishApplicationBeforeDeployment = true,
|
||||
TargetFramework = flavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1",
|
||||
#if NETCOREAPP1_1
|
||||
TargetFramework = "netcoreapp1.1",
|
||||
#else
|
||||
#error the target framework needs to be updated.
|
||||
#endif
|
||||
Configuration = "Release",
|
||||
EnvironmentVariables =
|
||||
{
|
||||
|
|
@ -95,11 +99,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
return deploymentParameters;
|
||||
}
|
||||
|
||||
protected virtual ILogger CreateLogger(RuntimeFlavor flavor)
|
||||
protected virtual ILogger CreateLogger()
|
||||
{
|
||||
return new LoggerFactory()
|
||||
.AddConsole()
|
||||
.CreateLogger($"{ApplicationName}:{flavor}");
|
||||
.CreateLogger($"{ApplicationName}");
|
||||
}
|
||||
|
||||
protected virtual void Restore()
|
||||
|
|
|
|||
|
|
@ -1,39 +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.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
{
|
||||
public static class RuntimeFlavors
|
||||
{
|
||||
public static IEnumerable<RuntimeFlavor> SupportedFlavors
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return RuntimeFlavor.CoreClr;
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
yield return RuntimeFlavor.Clr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData
|
||||
{
|
||||
get
|
||||
{
|
||||
var theory = new TheoryData<RuntimeFlavor>();
|
||||
foreach (var item in SupportedFlavors)
|
||||
{
|
||||
theory.Add(item);
|
||||
}
|
||||
|
||||
return theory;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,5 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
return streamReader.ReadToEnd().Replace("\r", "").Replace("\n", "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,9 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
||||
|
|
@ -23,11 +21,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_CanEmbedViewSourcesAsResources(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_CanEmbedViewSourcesAsResources()
|
||||
{
|
||||
// Arrange
|
||||
var expectedViews = new[]
|
||||
|
|
@ -37,7 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests
|
|||
"/Views/Home/Index.cshtml",
|
||||
};
|
||||
var expectedText = "Hello Index!";
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
var assemblyPath = Path.Combine(
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Home Page - SimpleApp</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css" />
|
||||
<meta name="x-stylesheet-fallback-test" content="" class="sr-only" /><script>!function(a,b,c,d){var e,f=document,g=f.getElementsByTagName("SCRIPT"),h=g[g.length-1].previousElementSibling,i=f.defaultView&&f.defaultView.getComputedStyle?f.defaultView.getComputedStyle(h):h.currentStyle;if(i&&i[a]!==b)for(e=0;e<c.length;e++)f.write('<link href="'+c[e]+'" '+d+"/>")}("position","absolute",["\/lib\/bootstrap\/dist\/css\/bootstrap.min.css"], "rel=\u0022stylesheet\u0022 ");</script>
|
||||
<link rel="stylesheet" href="/css/site.min.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">SimpleApp</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/Home/About">About</a></li>
|
||||
<li><a href="/Home/Contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
|
||||
AspNetCore._Views_Home_Index_cshtml, SimpleAppDesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2016 - SimpleApp</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js">
|
||||
</script>
|
||||
<script>(window.jQuery||document.write("\u003Cscript src=\u0022\/lib\/jquery\/dist\/jquery.min.js\u0022\u003E\u003C\/script\u003E"));</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js">
|
||||
</script>
|
||||
<script>(window.jQuery && window.jQuery.fn && window.jQuery.fn.modal||document.write("\u003Cscript src=\u0022\/lib\/bootstrap\/dist\/js\/bootstrap.min.js\u0022\u003E\u003C\/script\u003E"));</script>
|
||||
<script src="/js/site.min.js"></script>
|
||||
|
||||
|
||||
|
||||
AspNetCore._Views_Shared__Layout_cshtml, SimpleAppDesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Hello from Index: AspNetCore._Views_Home_Index_cshtml, SimpleAppMvc11.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
|
||||
AspNetCore._Views_Shared__Layout_cshtml, SimpleAppMvc11.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
|
|
@ -1 +0,0 @@
|
|||
AspNetCore._Views_Home_Index_cshtml, SimpleAppX86DesktopOnly.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
|
|
@ -1,48 +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.Server.IntegrationTesting;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
{
|
||||
public class SimpleAppDesktopOnlyTest : IClassFixture<SimpleAppDesktopOnlyTest.SimpleAppDesktopOnlyTestFixture>
|
||||
{
|
||||
public SimpleAppDesktopOnlyTest(SimpleAppDesktopOnlyTestFixture fixture)
|
||||
{
|
||||
Fixture = fixture;
|
||||
}
|
||||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipConditionAttribute(OperatingSystems.Linux)]
|
||||
[OSSkipConditionAttribute(OperatingSystems.MacOSX)]
|
||||
public async Task Precompilation_WorksForSimpleApps()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(RuntimeFlavor.Clr))
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
// Act
|
||||
var response = await Fixture.HttpClient.GetStringWithRetryAsync(
|
||||
deploymentResult.ApplicationBaseUri,
|
||||
Fixture.Logger);
|
||||
|
||||
// Assert
|
||||
TestEmbeddedResource.AssertContent("SimpleAppDesktopOnly.Home.Index.txt", response);
|
||||
}
|
||||
}
|
||||
|
||||
public class SimpleAppDesktopOnlyTestFixture : ApplicationTestFixture
|
||||
{
|
||||
public SimpleAppDesktopOnlyTestFixture()
|
||||
: base("SimpleAppDesktopOnly")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,14 +18,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_WorksForSimpleApps(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_WorksForSimpleApps()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -7,23 +7,20 @@ using Xunit;
|
|||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
{
|
||||
public class SimpleAppWithAssemblyRenameTest : IClassFixture<SimpleAppWithAssemblyRenameTest.SimpleAppWithAssemblyRenameTestFixture>
|
||||
public class SimpleAppWithAssemblyRenameTest : IClassFixture<SimpleAppWithAssemblyRenameTest.TestFixture>
|
||||
{
|
||||
public SimpleAppWithAssemblyRenameTest(SimpleAppWithAssemblyRenameTestFixture fixture)
|
||||
public SimpleAppWithAssemblyRenameTest(TestFixture fixture)
|
||||
{
|
||||
Fixture = fixture;
|
||||
}
|
||||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task Precompilation_WorksForSimpleApps(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task Precompilation_WorksForSimpleApps()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
@ -37,16 +34,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
public class SimpleAppWithAssemblyRenameTestFixture : ApplicationTestFixture
|
||||
public class TestFixture : ApplicationTestFixture
|
||||
{
|
||||
public SimpleAppWithAssemblyRenameTestFixture()
|
||||
public TestFixture()
|
||||
: base("SimpleAppWithAssemblyRename")
|
||||
{
|
||||
}
|
||||
|
||||
public override DeploymentParameters GetDeploymentParameters(RuntimeFlavor flavor)
|
||||
public override DeploymentParameters GetDeploymentParameters()
|
||||
{
|
||||
var parameters = base.GetDeploymentParameters(flavor);
|
||||
var parameters = base.GetDeploymentParameters();
|
||||
parameters.ApplicationName = "NewAssemblyName";
|
||||
return parameters;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,48 +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.Server.IntegrationTesting;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
{
|
||||
public class SimpleAppX86DesktopOnlyTest : IClassFixture<SimpleAppX86DesktopOnlyTest.SimpleAppX86DesktopOnlyFixture>
|
||||
{
|
||||
public SimpleAppX86DesktopOnlyTest(SimpleAppX86DesktopOnlyFixture fixture)
|
||||
{
|
||||
Fixture = fixture;
|
||||
}
|
||||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux)]
|
||||
[OSSkipCondition(OperatingSystems.MacOSX)]
|
||||
public async Task Precompilation_WorksForSimpleApps()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(RuntimeFlavor.Clr))
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
// Act
|
||||
var response = await Fixture.HttpClient.GetStringWithRetryAsync(
|
||||
deploymentResult.ApplicationBaseUri,
|
||||
Fixture.Logger);
|
||||
|
||||
// Assert
|
||||
TestEmbeddedResource.AssertContent("SimpleAppX86DesktopOnly.Home.Index.txt", response);
|
||||
}
|
||||
}
|
||||
|
||||
public class SimpleAppX86DesktopOnlyFixture : ApplicationTestFixture
|
||||
{
|
||||
public SimpleAppX86DesktopOnlyFixture()
|
||||
: base("SimpleAppX86DesktopOnly")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Server.IntegrationTesting;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
||||
|
|
@ -18,14 +15,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public async Task PrecompiledAssembliesUseSameStrongNameAsApplication(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public async Task PrecompiledAssembliesUseSameStrongNameAsApplication()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
public ApplicationTestFixture Fixture { get; }
|
||||
|
||||
public static TheoryData SupportedFlavorsTheoryData => RuntimeFlavors.SupportedFlavorsTheoryData;
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public void Precompilation_PreventsRefAssembliesFromBeingPublished(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public void Precompilation_PreventsRefAssembliesFromBeingPublished()
|
||||
{
|
||||
// Arrange
|
||||
using (var deployer = Fixture.CreateDeployment(flavor))
|
||||
using (var deployer = Fixture.CreateDeployment())
|
||||
{
|
||||
// Act
|
||||
var deploymentResult = deployer.Deploy();
|
||||
|
|
@ -34,13 +31,12 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SupportedFlavorsTheoryData))]
|
||||
public void PublishingWithOption_AllowsPublishingRefAssemblies(RuntimeFlavor flavor)
|
||||
[Fact]
|
||||
public void PublishingWithOption_AllowsPublishingRefAssemblies()
|
||||
{
|
||||
// Arrange
|
||||
Fixture.PrepareForDeployment(flavor);
|
||||
var deploymentParameters = Fixture.GetDeploymentParameters(flavor);
|
||||
Fixture.PrepareForDeployment();
|
||||
var deploymentParameters = Fixture.GetDeploymentParameters();
|
||||
deploymentParameters.PublishEnvironmentVariables.Add(
|
||||
new KeyValuePair<string, string>("MvcRazorExcludeRefAssembliesFromPublish", "false"));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
<MvcRazorEmbedViewSources>true</MvcRazorEmbedViewSources>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -22,6 +19,5 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.2.0-*" />
|
||||
<PackageReference Include="TagHelperSamples.Bootstrap" Version="1.1.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ namespace ApplicationWithTagHelpers.Controllers
|
|||
|
||||
public IActionResult LocalTagHelper() => View();
|
||||
|
||||
public IActionResult NuGetPackageTagHelper() => View();
|
||||
|
||||
public IActionResult About() => Content("About content");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
@addTagHelper *, TagHelperSamples.Bootstrap
|
||||
|
||||
@GetType().AssemblyQualifiedName
|
||||
<modal id="simpleModal"
|
||||
title="Modal Title">
|
||||
<modal-body>
|
||||
<h4>Something happened</h4>
|
||||
<p>Something happened</p>
|
||||
</modal-body>
|
||||
</modal>
|
||||
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
|
||||
<TargetFramework>netstandard1.6</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Runtime" Version="1.2.0-*" />
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0-z$([System.DateTime]::UtcNow.Ticks)</Version>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorOutputPath Condition="'$(TargetFramework)'!=''">obj\precompiled\$(TargetFramework)</MvcRazorOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
<MvcRazorEmbedViewSources>true</MvcRazorEmbedViewSources>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace SimpleApp.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public IActionResult Index() => View();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using System.IO;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace SimpleApp
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net451</TargetFramework>
|
||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<OutputType>Exe</OutputType>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation">
|
||||
<Version>1.2.0-*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.2.0-*" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SimpleApp
|
||||
{
|
||||
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: "default",
|
||||
template: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
@GetType().AssemblyQualifiedName
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - SimpleApp</title>
|
||||
|
||||
<environment names="Development">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
</environment>
|
||||
<environment names="Staging,Production">
|
||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"
|
||||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">SimpleApp</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li>
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2016 - SimpleApp</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<environment names="Development">
|
||||
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
<environment names="Staging,Production">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
|
||||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js"
|
||||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
|
||||
</script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
|
||||
@RenderSection("scripts", required: false)
|
||||
@GetType().AssemblyQualifiedName
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
@using SimpleApp
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
|
@ -2,10 +2,8 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>NewAssemblyName</AssemblyName>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace SimpleApp.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public IActionResult Index() => View();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using System.IO;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace SimpleApp
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net451</TargetFramework>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<OutputType>Exe</OutputType>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation">
|
||||
<Version>1.2.0-*</Version>
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.2.0-*" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SimpleApp
|
||||
{
|
||||
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: "default",
|
||||
template: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
@GetType().AssemblyQualifiedName
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'RazorViewCompilation.sln'))\build\common-testapps.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp1.1;net451</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyOriginatorKeyFile>../../build/Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||
<RuntimeIdentifier Condition="!$(TargetFramework.StartsWith('netcoreapp'))">win7-x64</RuntimeIdentifier>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PublishWIthEmbedViewSources
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StrongNamedApp", "StrongNamedApp\StrongNamedApp.csproj", "{88903BE5-0676-4667-8160-B24646E0B76E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAppDesktopOnly", "SimpleAppDesktopOnly\SimpleAppDesktopOnly.csproj", "{A0B0A141-A32B-4F33-B85F-5CA8C107105F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAppWithAssemblyRename", "SimpleAppWithAssemblyRename\SimpleAppWithAssemblyRename.csproj", "{3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}"
|
||||
EndProject
|
||||
Global
|
||||
|
|
@ -55,10 +53,6 @@ Global
|
|||
{88903BE5-0676-4667-8160-B24646E0B76E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88903BE5-0676-4667-8160-B24646E0B76E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88903BE5-0676-4667-8160-B24646E0B76E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A0B0A141-A32B-4F33-B85F-5CA8C107105F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3AAF7A48-333C-4D1A-A12B-A3B77DEADF4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\build\common.props" />
|
||||
<PropertyGroup>
|
||||
<Description>Build-time references required to enable Razor view compilation as part of building the application.</Description>
|
||||
<TargetFrameworks>net451</TargetFrameworks>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<OutputType>exe</OutputType>
|
||||
<ViewCompilationProjectPath>..\..\src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation</ViewCompilationProjectPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(ViewCompilationProjectPath)\*.cs;" />
|
||||
<Compile Include="$(ViewCompilationProjectPath)\Internal\*.cs;" />
|
||||
<Compile Include="$(ViewCompilationProjectPath)\Properties\*.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="1.2.0-*" />
|
||||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.2.0-*" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue