Closed
Description
Describe 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