VS Community Preview 16.1.0 - Razor Components intellisense errors
See original GitHub issueDescribe the bug
Regression with VS Community Preview 16.1.0 that was not present in previous Preview release. When authoring Razor Components the “Errors” window and Intellisense both show the same compilation “errors” that are not errors. The project still builds and runs despite those errors. See screenshot of error window:
These false compilation errors were not present in previous VS Community preview release.
To Reproduce
Steps to reproduce the behavior:
- Install VS Community Preview 16.1.0
- Use Razor Components “example” project that shipped with previous release of VS Community Preview (the project with the “Counter” page and “Fetch Data” weather forecasts page). I.e. the code:
@page "/counter"
@using WebApplication1.Services
@inject WeatherForecastService ForecastService
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button>
@functions {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
}
}
- Build the project. You will see the false compilation errors
- Project builds successfully and can be run with no issues
Expected behavior
False compilation errors should not be present in the “Errors” window nor as red wavy lines in the main “Code Editor” window
Additional context
These issues were not present in previous VS Community Preview release
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top Results From Across the Web
VS Community Preview 16.1.0 - Razor Components ...
VS Community Preview 16.1.0 - Razor Components intellisense errors ... When authoring Razor Components the "Errors" window and Intellisense ...
Read more >Razor Intellisense Issues In VS 2019 (v16.1.6 & .net core ...
Hi,. I have a clean install of VS 2019 (16.1.6) and am using .net core 3 Preview 7, when i create a standard...
Read more >Blazor and Visual Studio's Intellisense
When I open my Blazor solution in Visual Studio, Intellisense will show false errors for references to Blazor components, and will successfully ...
Read more >Visual Studio 2019 version 16.1 Release Notes
Get the latest features, bug fixes, and support for Visual Studio 2019 v16.1. Download today.
Read more >Reference and Intellisense problems with Blazor projects ...
TL;DR: when working on a Blazor project in VS 2022 I get random errors where references to namespaces and components don't work and...
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
Updating to Preview 4 fixed this for me, using the same VS 16.1 Preview 1 version.
Thanks for contacting us folks. We believe this is now fix in our nightly releases and will be released as part of the next preview release.