Am I doing anything wrong? The project run and build without any problem in both VS and latest RBS.
I´m getting the following render error :
Radzen.Server.CompilationFailedException:
C:\Users\~\TestAppRBS\Client\Pages\Testpage.razor(166,49): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List<TestAppRBS.Client.Foo>' to 'System.Collections.Generic.HashSet<TestAppRBS.Client.Foo>'
C:\Users\~\TestAppRBS\Client\Pages\Testpage.razor(169,16): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List<TestAppRBS.Client.Foo>' to 'System.Collections.Generic.HashSet<TestAppRBS.Client.Foo>'
at Radzen.Server.ProjectContext.Compile(Compilation compilation, AssemblyLoadContext context)
at Radzen.Server.ProjectContext.Compile(Compilation compilation)
at Radzen.Server.ProjectServer.Compile(String fileName, String source, RazorProjectEngine projectEngine)
at Radzen.Server.ProjectServer.CompilePage(String fileName, String source, RazorProjectEngine engine)
at Radzen.Server.ProjectServer.Render(String fileName, String source)
at Radzen.Server.ProgramController.Render(RenderRequest request)
The Testpage.razor.cs file:
namespace TestAppRBS.Client.Pages
{
public partial class Testpage
{
public HashSet<Foo> FooItems { get; set; } = new HashSet<Foo>();
protected override async Task OnInitializedAsync()
{
List<Foo> x = new List<Foo>{
new Foo("Bar1"),
new Foo("Bar2"),
new Foo("Bar3")
};
FooItems = x.ToHashSet();
}
}
}
And the Testpage.razor file:
@page "/testpage"
<PageTitle>Testpage</PageTitle>
<div class="row">
<div class="col-12">
<RadzenText Text="Testpage" TextStyle="TextStyle.H3" TagName="TagName.H1" />
</div>
</div>