question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running dotnet watch with a EditForm component with @bind-Value breaks with error "condition `<disabled>' not met"

See original GitHub issue

Running 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

https://github.com/ShoarW/BlazorHotReloadPreview4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
pranavkmcommented, Jun 3, 2021

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.

0reactions
pranavkmcommented, Jun 4, 2021

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found