Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from c01b984fe9

This commit is contained in:
John Luo 2020-01-22 17:44:26 -08:00 committed by GitHub
commit 9cf7425328
25 changed files with 71 additions and 40 deletions

View File

@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
"; ";
var output = context.CodeWriter.GenerateCode(); var output = context.CodeWriter.GenerateCode();
Assert.Equal(expected, output); Assert.Equal(expected, output, ignoreLineEndingDifferences: true);
} }
} }
} }

View File

@ -82,7 +82,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X
// Arrange // Arrange
var content = @" var content = @"
@* some comment *@ @* some comment *@
@page @page
"; ";
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create(content, "Test.cshtml")); var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create(content, "Test.cshtml"));
@ -363,7 +363,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X
{ {
PageDirective.Register(builder); PageDirective.Register(builder);
} }
private static DocumentIntermediateNode CreateIRDocument(RazorEngine engine, RazorCodeDocument codeDocument) private static DocumentIntermediateNode CreateIRDocument(RazorEngine engine, RazorCodeDocument codeDocument)
{ {
for (var i = 0; i < engine.Phases.Count; i++) for (var i = 0; i < engine.Phases.Count; i++)

View File

@ -82,7 +82,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
// Arrange // Arrange
var content = @" var content = @"
@* some comment *@ @* some comment *@
@page @page
"; ";
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create(content, "Test.cshtml")); var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create(content, "Test.cshtml"));

View File

@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
Pass.Engine = Engine; Pass.Engine = Engine;
} }
private DefaultRazorProjectEngine ProjectEngine { get; } private DefaultRazorProjectEngine ProjectEngine { get; }
private RazorEngine Engine { get; } private RazorEngine Engine { get; }
@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true); Assert.Equal(expected, block.Content, ignoreLineEndingDifferences: true);
} }
// See: https://github.com/aspnet/AspNetCore/issues/6480 // See: https://github.com/dotnet/aspnetcore/issues/6480
[Fact] [Fact]
public void Execute_RewritesHtml_HtmlAttributePrefix() public void Execute_RewritesHtml_HtmlAttributePrefix()
{ {

View File

@ -5120,7 +5120,7 @@ namespace Test
CompileToAssembly(generated); CompileToAssembly(generated);
} }
[Fact] // https://github.com/aspnet/Blazor/issues/597 [Fact] // https://github.com/dotnet/blazor/issues/597
public void Regression_597() public void Regression_597()
{ {
// Arrange // Arrange
@ -5186,7 +5186,7 @@ namespace Test
CompileToAssembly(generated); CompileToAssembly(generated);
} }
[Fact] // https://github.com/aspnet/Blazor/issues/772 [Fact] // https://github.com/dotnet/blazor/issues/772
public void Regression_772() public void Regression_772()
{ {
// Arrange // Arrange
@ -5224,7 +5224,7 @@ Welcome to your new app.
d => Assert.Equal("RZ1035", d.Id)); d => Assert.Equal("RZ1035", d.Id));
} }
[Fact] // https://github.com/aspnet/Blazor/issues/773 [Fact] // https://github.com/dotnet/blazor/issues/773
public void Regression_773() public void Regression_773()
{ {
// Arrange // Arrange

View File

@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
Assert.Contains(typeof(IDoCoolThings), component.GetType().GetInterfaces()); Assert.Contains(typeof(IDoCoolThings), component.GetType().GetInterfaces());
} }
[Fact] // Regression test for https://github.com/aspnet/Blazor/issues/453 [Fact] // Regression test for https://github.com/dotnet/blazor/issues/453
public void DeclarationConfiguration_FunctionsBlockHasLineMappings_MappingsApplyToError() public void DeclarationConfiguration_FunctionsBlockHasLineMappings_MappingsApplyToError()
{ {
// Arrange & Act 1 // Arrange & Act 1

View File

@ -23,7 +23,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
<PackageReference Include="Moq" Version="$(MoqPackageVersion)" /> <PackageReference Include="Moq" Version="$(MoqPackageVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(TEST_NewtonsoftJsonPackageVersion)" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -121,7 +121,7 @@ Delta: Gamma: Beta: Test B
var actual = builder.ToString(); var actual = builder.ToString();
Assert.Equal(expected, actual); Assert.Equal(expected, actual, ignoreLineEndingDifferences: true);
} }
} }
} }

View File

@ -30,7 +30,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. --> <!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
<RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot> <RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1</_RazorSdkTasksTFM> <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp5.0</_RazorSdkTasksTFM>
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM> <_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly> <RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
</PropertyGroup> </PropertyGroup>
@ -516,7 +516,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</Target> </Target>
<!-- <!--
Temporarary workaround for https://github.com/aspnet/AspNetCore/issues/6859. This can be removed after a VS insertion with a newer copy of the DesignTime targets. Temporarary workaround for https://github.com/dotnet/aspnetcore/issues/6859. This can be removed after a VS insertion with a newer copy of the DesignTime targets.
--> -->
<ItemGroup> <ItemGroup>
<Content Update="$(_RazorComponentInclude)"> <Content Update="$(_RazorComponentInclude)">

View File

@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
internal static partial class BuildVariables internal static partial class BuildVariables
{ {
private static string _msBuildPath = string.Empty; private static string _msBuildPath = string.Empty;
private static string _microsoftNETCoreApp31PackageVersion = string.Empty; private static string _MicrosoftNETCoreApp50PackageVersion = string.Empty;
private static string _microsoftNetCompilersToolsetPackageVersion = string.Empty; private static string _microsoftNetCompilersToolsetPackageVersion = string.Empty;
static partial void InitializeVariables(); static partial void InitializeVariables();
@ -20,12 +20,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
} }
} }
public static string MicrosoftNETCoreApp31PackageVersion public static string MicrosoftNETCoreApp50PackageVersion
{ {
get get
{ {
InitializeVariables(); InitializeVariables();
return _microsoftNETCoreApp31PackageVersion; return _MicrosoftNETCoreApp50PackageVersion;
} }
} }

View File

@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
} }
} }
// Regression test for https://github.com/aspnet/AspNetCore/issues/11315 // Regression test for https://github.com/dotnet/aspnetcore/issues/11315
[Fact] [Fact]
[InitializeTestProject("AppWithP2PReference", additionalProjects: "ClassLibrary")] [InitializeTestProject("AppWithP2PReference", additionalProjects: "ClassLibrary")]
public async Task BuildIncrementalism_CausingRecompilation_WhenApplicationPartAttributeIsGenerated() public async Task BuildIncrementalism_CausingRecompilation_WhenApplicationPartAttributeIsGenerated()
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.AssemblyHasAttribute(result, Path.Combine(OutputPath, "AppWithP2PReference.dll"), "Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute"); Assert.AssemblyHasAttribute(result, Path.Combine(OutputPath, "AppWithP2PReference.dll"), "Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute");
} }
[Fact] [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#", additionalProjects: "ClassLibrary")] [InitializeTestProject("SimpleMvcFSharp", language: "F#", additionalProjects: "ClassLibrary")]
public async Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttributeToNonCSharpProjects() public async Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttributeToNonCSharpProjects()
{ {

View File

@ -472,7 +472,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileDoesNotContain(result, razorAssemblyInfo, "Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute"); Assert.FileDoesNotContain(result, razorAssemblyInfo, "Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute");
} }
[Fact] [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#")] [InitializeTestProject("SimpleMvcFSharp", language: "F#")]
public async Task Build_SimpleMvcFSharp_NoopsWithoutFailing() public async Task Build_SimpleMvcFSharp_NoopsWithoutFailing()
{ {
@ -639,13 +639,15 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll");
} }
[Fact(Skip = "Default C# version is 7.3 for netcoreapp3.1 and later https://github.com/aspnet/AspNetCore/issues/13930")] [Fact(Skip = "Default C# version is 7.3 for netcoreapp3.1 and later https://github.com/dotnet/aspnetcore/issues/13930")]
[InitializeTestProject("SimpleMvc")] [InitializeTestProject("SimpleMvc")]
public async Task Build_ImplicitCSharp8_NullableEnforcement_WarningsDuringBuild_NoBuildServer() public async Task Build_ImplicitCSharp8_NullableEnforcement_WarningsDuringBuild_NoBuildServer()
{ {
var result = await DotnetMSBuild( var result = await DotnetMSBuild(
"Build", "Build",
"/p:Nullable=enable", // Remove /p:LangVersion=Default once we've picked up a compiler that supports .NET 5.0.
// Tracked by https://github.com/dotnet/aspnetcore/issues/13304
"/p:Nullable=enable /p:LangVersion=Default",
suppressBuildServer: true); suppressBuildServer: true);
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs"); var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");

View File

@ -215,7 +215,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
[InitializeTestProject("SimpleMvc")] [InitializeTestProject("SimpleMvc")]
public async Task IntrospectJsonContentFiles_WithExcludeConfigFilesFromBuildOutputSet() public async Task IntrospectJsonContentFiles_WithExcludeConfigFilesFromBuildOutputSet()
{ {
// Verifies that the fix for https://github.com/aspnet/AspNetCore/issues/14017 works. // Verifies that the fix for https://github.com/dotnet/aspnetcore/issues/14017 works.
var result = await DotnetMSBuild("_IntrospectContentItems", "/p:ExcludeConfigFilesFromBuildOutput=true"); var result = await DotnetMSBuild("_IntrospectContentItems", "/p:ExcludeConfigFilesFromBuildOutput=true");
Assert.BuildPassed(result); Assert.BuildPassed(result);
@ -235,8 +235,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
.Value; .Value;
var tfm = var tfm =
#if NETCOREAPP3_1 #if NETCOREAPP5_0
"netcoreapp3.1"; "netcoreapp5.0";
#else #else
#error Target framework needs to be updated. #error Target framework needs to be updated.
#endif #endif

View File

@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language); MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
#if NETCOREAPP #if NETCOREAPP
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp3.1"; MSBuildIntegrationTestBase.TargetFramework = "netcoreapp5.0";
#else #else
#error Target frameworks need to be updated #error Target frameworks need to be updated
#endif #endif

View File

@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
// Let the test app know it is running as part of a test. // Let the test app know it is running as part of a test.
"/p:RunningAsTest=true", "/p:RunningAsTest=true",
$"/p:MicrosoftNETCoreApp31PackageVersion={BuildVariables.MicrosoftNETCoreApp31PackageVersion}", $"/p:MicrosoftNETCoreApp50PackageVersion={BuildVariables.MicrosoftNETCoreApp50PackageVersion}",
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}", $"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
// Additional restore sources for projects that require built packages // Additional restore sources for projects that require built packages

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{ {
public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture> public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture>
{ {
private static readonly string TFM = "netcoreapp3.1"; private static readonly string TFM = "netcoreapp5.0";
public PackIntegrationTest(BuildServerTestFixture buildServer) public PackIntegrationTest(BuildServerTestFixture buildServer)
: base(buildServer) : base(buildServer)

View File

@ -329,7 +329,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml"); Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
} }
[Fact] [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#")] [InitializeTestProject("SimpleMvcFSharp", language: "F#")]
public async Task Publish_SimpleMvcFSharp_NoopsWithoutFailing() public async Task Publish_SimpleMvcFSharp_NoopsWithoutFailing()
{ {
@ -434,7 +434,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
var result = await DotnetMSBuild("Publish", "/p:NoBuild=true"); var result = await DotnetMSBuild("Publish", "/p:NoBuild=true");
Assert.BuildFailed(result); Assert.BuildFailed(result);
Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp3.1/SimpleMvc.dll because it couldn't be found. Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp5.0/SimpleMvc.dll because it couldn't be found.
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.dll"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.dll");
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");

View File

@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
public ITestOutputHelper Output { get; private set; } public ITestOutputHelper Output { get; private set; }
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/17233")] [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/17233")]
[InitializeTestProject("AppWithPackageAndP2PReference",language: "C#", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })] [InitializeTestProject("AppWithPackageAndP2PReference",language: "C#", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })]
public async Task Build_GeneratesStaticWebAssetsManifest_Success_CreatesManifest() public async Task Build_GeneratesStaticWebAssetsManifest_Success_CreatesManifest()
{ {
@ -188,7 +188,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileDoesNotExist(result, IntermediateOutputPath, "staticwebassets", "AppWithPackageAndP2PReference.StaticWebAssets.xml"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "staticwebassets", "AppWithPackageAndP2PReference.StaticWebAssets.xml");
} }
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/17233")] [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/17233")]
[InitializeTestProject("AppWithPackageAndP2PReference",language: "C#", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })] [InitializeTestProject("AppWithPackageAndP2PReference",language: "C#", additionalProjects: new[] { "ClassLibrary", "ClassLibrary2" })]
public async Task Rebuild_Success_RecreatesManifestAndCache() public async Task Rebuild_Success_RecreatesManifestAndCache()
{ {

View File

@ -7,7 +7,7 @@
This is also a partial workaround for https://github.com/Microsoft/msbuild/issues/2661 - this project This is also a partial workaround for https://github.com/Microsoft/msbuild/issues/2661 - this project
has netcoreapp dependencies that need to be built first. has netcoreapp dependencies that need to be built first.
--> -->
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants> <DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants>
<!-- Copy references locally so that we can use them in the test. --> <!-- Copy references locally so that we can use them in the test. -->
@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
static partial void InitializeVariables() static partial void InitializeVariables()
{ {
_msBuildPath = @"$(_DesktopMSBuildPath)"; _msBuildPath = @"$(_DesktopMSBuildPath)";
_microsoftNETCoreApp31PackageVersion = "$(MicrosoftNETCoreApp31PackageVersion)"; _MicrosoftNETCoreApp50PackageVersion = "$(MicrosoftNETCoreApp50PackageVersion)";
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)"; _microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
} }
} }

View File

@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Razor.Tasks
[Fact] [Fact]
public void Resolve_Works_WhenAssemblyReferencesAreRecursive() public void Resolve_Works_WhenAssemblyReferencesAreRecursive()
{ {
// Test for https://github.com/aspnet/AspNetCore/issues/12693 // Test for https://github.com/dotnet/aspnetcore/issues/12693
// Arrange // Arrange
var resolver = new TestReferencesToMvcResolver(new[] var resolver = new TestReferencesToMvcResolver(new[]
{ {

View File

@ -14,6 +14,12 @@
<ItemGroup> <ItemGroup>
<!-- Avoid referencing the AspNetCore framework since we want the ability to target work-in-progress shims --> <!-- Avoid referencing the AspNetCore framework since we want the ability to target work-in-progress shims -->
<FrameworkReference Remove="Microsoft.AspNetCore.App" /> <FrameworkReference Remove="Microsoft.AspNetCore.App" />
<!-- RID specific installs attempts to restore runtime packs which cause cyclical dependencies .-->
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WindowsForms" />
</ItemGroup> </ItemGroup>
<PropertyGroup Condition="'$(RunningAsTest)' == ''"> <PropertyGroup Condition="'$(RunningAsTest)' == ''">

View File

@ -2,11 +2,7 @@
<Import Project="RazorTest.Introspection.targets" /> <Import Project="RazorTest.Introspection.targets" />
<PropertyGroup> <PropertyGroup>
<!-- <RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreApp50PackageVersion)</RuntimeFrameworkVersion>
The runtime version is only useful to restore and compile test projects, and not used to run tests.
We'll keep it pinned to a version that has already been shipped.
-->
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreAppRefPackageVersion)</RuntimeFrameworkVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use --> <!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion> <NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup> </PropertyGroup>

View File

@ -0,0 +1,9 @@
namespace MvcWithComponents
{
public class Test
{
public static string Foo { get; set; }
public static string Bar { get; set; }
}
}

View File

@ -1,2 +1,4 @@
@Test.Foo @* Used in a test. Don't remove *@
NavMenu content NavMenu content

View File

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Razor.TagHelpers;
// Used for testing purposes to verify multiple TagHelpers applying to a single element.
namespace SimpleMvc22.TagHelpers
{
/// <summary>
/// I made it!
/// </summary>
[HtmlTargetElement("environment")]
public class EnvironmentTagHelper : TagHelper
{
/// <summary>
/// Exclude it!
/// </summary>
public string Exclude {get; set;}
}
}