Closed
Description
Error Message
Microsoft.AspNetCore.Razor.Language.IntegrationTests.RazorIntegrationTestBase+CompilationFailedException : Compilation failed: \n/dir/subdir/Test/UniqueName.cshtml(3,24): error CS0246: The type or namespace name 'TItem' could not be found (are you missing a using directive or an assembly reference?)\n(11,5): hidden CS8019: Unnecessary using directive.\n(13,5): hidden CS8019: Unnecessary using directive.\n(12,5): hidden CS8019: Unnecessary using directive.\n(10,5): hidden CS8019: Unnecessary using directive.\n\n\nFile :\n// <auto-generated/>\n#pragma warning disable 1591\n#pragma warning disable 0414\n#pragma warning disable 0649\n#pragma warning disable 0169\n\nnamespace Test\n{\n #line hidden\n using System;\n using System.Collections.Generic;\n using System.Linq;\n using System.Threading.Tasks;\n using Microsoft.AspNetCore.Components;\n public partial class UniqueName : Microsoft.AspNetCore.Components.ComponentBase\n {\n #pragma warning disable 1998\n protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)\n {\n }\n #pragma warning restore 1998\n#nullable restore\n#line 2 "/dir/subdir/Test/UniqueName.cshtml"\n \n [Parameter] public TItem Item { get; set; }\n\n#line default\n#line hidden\n#nullable disable\n }\n}\n#pragma warning restore 1591\n\n
Stacktrace
at Microsoft.AspNetCore.Razor.Language.IntegrationTests.RazorIntegrationTestBase.CompileToAssembly(CompileToCSharpResult cSharpResult, Boolean throwOnFailure) in /_/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs:line 305
at Microsoft.AspNetCore.Razor.Language.IntegrationTests.RazorIntegrationTestBase.CompileToCSharp(String cshtmlRelativePath, String cshtmlContent, Boolean throwOnFailure, String fileKind, String cssScope) in /_/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs:line 217
at Microsoft.AspNetCore.Razor.Language.IntegrationTests.ComponentDiscoveryIntegrationTest.ComponentDiscovery_CanFindComponent_WithTypeParameter() in /_/src/Razor/Microsoft.AspNetCore.Razor.Language/test/IntegrationTests/ComponentDiscoveryIntegrationTest.cs:line 91