Skip to content

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

@ShoarW

Description

@ShoarW

Running my project I've noticed that the hot reload will exit/crash if it finds a 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

Metadata

Metadata

Assignees

Labels

area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIbugThis issue describes a behavior which is not expected - a bug.feature-hot-reloadThis issue is related to the Hot Reload feaature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions