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.

RZ10020 error after upgrading to Visual Studio 17.6

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After upgrading to Visual Studio 17.6, with dotnet 7 SDK at 7.0.302, we are seeing the following Razor errors when using @bind-Value:get

RZ10020 Attribute 'bind-Value:get' can only be used with RazorLanguageVersion 7.0 or higher

image

Expected Behavior

No errors reported.

Steps To Reproduce

No response

Exceptions (if any)

RZ10020 Attribute ‘bind-Value:get’ can only be used with RazorLanguageVersion 7.0 or higher

.NET Version

7.0.302

Anything else?

No response

Issue Analytics

  • State:open
  • Created 4 months ago
  • Reactions:6
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
djbaldwincommented, Jun 21, 2023

This issue remains in VS 17.6.4.

In a new Blazor Server project, replace index.razor with this code. The error list indicates 6 errors, however the project still runs.

@page "/"

<PageTitle>Index</PageTitle>
<h1>Bind Get Set Examples</h1>

<h2>Elements</h2>

<input type="text" @bind:get="text" @bind:set="(value) => { text = value; }" />
<input type="text" @bind:get="text" @bind:set="Set" />
<input type="text" @bind:get="text" @bind:set="SetAsync" />

<h2>Components</h2>

<InputText @bind-Value:get="text" @bind-Value:set="(value) => { text = value; }" />
<InputText @bind-Value:get="text" @bind-Value:set="Set" />
<InputText @bind-Value:get="text" @bind-Value:set="SetAsync" />

@code {
    private string text = "";

    private void Set(string value)
    {
        text = value;
    }

    private Task SetAsync(string value)
    {
        text = value;
        return Task.CompletedTask;
    }
}
2reactions
ryanbueningcommented, Jun 13, 2023

I updated to VS 17.6.3 and .NET 7.0.304, but this issue still remains. Was this intended to be fixed in those updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2022 version 17.6 Release Notes
Solution: To resolve the issue, upgrade Visual Studio to version 17.6. 2 and restart the Visual Studio.
Read more >
c# - I Update Visual Studio to 17.6.5 and After publish the ...
I was working in visual studio 2022 V 17.5.1 and every thing go fine after i update to 17.6.5 i get Error invalidoperationexception...
Read more >
Visual Studio fails after upgradeing to 17.1.1.
I was running Visual Studio 2022 ~17.0.6, then decided to update to 17.1.1. The upgrade process appeared normal and seemed to be successful....
Read more >
Error after updating VS 2022 : r/VisualStudio
I recently updated my visual studio 2022 from 17.5 to 17.6.1 (skipped 17.6 update). But after the update, it's constantly showing me error...
Read more >
MSVC 2022 17.6.x Error. Please use MSVC 17.5
Hey all, I am just trying out building blender for the first time and am running into issues that when I google for...
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