Running dotnet watch with a EditForm component with @bind-Value breaks with error "condition `<disabled>' not met"
See original GitHub issueRunning my project I’ve noticed that the hot reload will exit/crash if it finds a <EditForm> with a @bind-Value inside of it.
Files looks like
<EditForm Model="@Login" OnValidSubmit="HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />
<InputText @bind-Value="Login.Email" />
<InputText @bind-Value="Login.Password" />
<button class="btn btn btn-lg btn-primary" type="submit">Sign in One</button>
</EditForm>
@code {
private LoginResult Login = new LoginResult();
private int currentCount = 0;
private void IncrementCount()
{
currentCount += 30;
}
private void HandleValidSubmit()
{
Navigation.NavigateTo("/");
}
}
Crashes with when navigating to the page
* Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1373, condition `<disabled>' not met
dotnet.6.0.0-preview.4.21253.7.js:1:18291
Downgrading the preview packages to Preview 3 (not the SDK) will not crash the application.
I have created a reproduction of the issue here - You will need Preview4 and latest Visual Studio Preview
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Weird errors problem with dotnet watch with blazor/wasm.
I start the API part with CTRL+F5, and I start the Blazor part from the Windows terminal with dotnet watch (because I want...
Read more >Posts
At this point we can run the Blazor app using dotnet watch or Visual Studio ... I concluded that I would need to...
Read more >Using Blazor WebAssembly, SignalR and C# 9 to create ...
In this tutorial, we will put Blazor WebAssembly under test by building a small real time survey application leveraging SignalR for its real ......
Read more >Blazor by example
One of the big problems with javascript comes when APIs change and suddenly the frontend code is broken (because something changed name, or...
Read more >JetBrains Rider .NET Watch Run Configuration Plugin
Changing parameters to methods breaks contracts, requiring a restart; Configuration code that's run once typically requires a restart; Changes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have a targeted fix that prevents the exception from AssemblyLoad event. Once that is resolved you run in to https://github.com/dotnet/runtime/issues/51855.
No trimmer’s running during development. More specifically, nothing in the code explicitly creates and loads a dynamically loaded assembly. Perhaps the presence of the anonymous lambda causes one to load and that has different semantics?