-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Razor Pages squigglies for internal PageModel implementations #9352
Comments
I believe there is a related issue in MVC views. Using @using mvc.Models
@model ErrorViewModel And namespace mvc.Models;
internal sealed class ErrorViewModel
{
} I get: This despite the fact that the generated page class is internal ( |
+1 Thank you to report this. It is sad because like you say it is "best practice" to using I hope this to be investigated and fixed - thanks guys! |
Yep... We use Also we've a number of RP-based libraries and it's a huge mess. If one uses PS: don't spin your wheels, there are no workarounds (I've tried!) - just change everything to public for now. |
We're actively working on getting this fixed. Stay tuned! |
Environment data
dotnet --info
output: 7.0.401VS Code version: 1.82.2
C# Extension version: 2.3.27
OmniSharp log
n/a
Steps to reproduce
Foo.cshtml.cs
Foo.cshtml
Expected behavior
No errors, no warnings, no squigglies.
Actual behavior
Many red squigglies in vscode. Example:
Additional context
Even though reported as errors, the app works. It's perfectly valid code.
When I change
internal
topublic
, the squigglies disappear. But I don't want to do that, as the code I've written is best practice.The above example is simplistic. For a real RP page, of non-trivial length, the entire editor is filled with red squigglies. It's completely unusable.
The text was updated successfully, but these errors were encountered: