Skip to content

Test failure in ComponentDiscovery_CanFindComponent_WithTypeParameter #32592

Closed
@captainsafia

Description

@captainsafia

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

Build

https://dev.azure.com/dnceng/public/_build/results?buildId=1126709&view=results

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions