You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Visual Studio 16.9.4 (and for at least a couple months before this release) VS Intellisense breaks if a Razor page is in a folder with a hyphen in the name. For example:
I have a page in a folder as follows: /Pages/Admin/Client-Accounts/Edit.cshtml
In this page the @model is not recognised - VS says: Cannot resolve symbol 'Model'
If I rename the folder to change the path to: /Pages/Admin/ClientAccounts/Edit.cshtml (ie remove hyphen in Client-Accounts) then Intellisense works fine.
There are no issues with Tag Helpers, it's only when using @model directly.
The project builds ok and the page does work fine when served via IIS but shows errors when editing and Intellisense for properties etc. is broken.
This is very similar to an old, fixed, bug here: aspnet/Mvc#6296 - although this applied to filenames only I think - but thought I'd mention in case the solution used there helps...
The text was updated successfully, but these errors were encountered:
@maxscan I'm not seeing any Cannot resolve symbol errors when trying to use VS the way you describe. It's possible we fixed this in 16.10, could you see if it still repro's for you in 16.10-preview2? If it still repros in the preview I've probably misunderstood what you're describing, could you include a snippet of the text on your page and maybe a screenshot of the page while it's errored?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
When using Visual Studio 16.9.4 (and for at least a couple months before this release) VS Intellisense breaks if a Razor page is in a folder with a hyphen in the name. For example:
I have a page in a folder as follows: /Pages/Admin/Client-Accounts/Edit.cshtml
In this page the @model is not recognised - VS says: Cannot resolve symbol 'Model'
If I rename the folder to change the path to: /Pages/Admin/ClientAccounts/Edit.cshtml (ie remove hyphen in Client-Accounts) then Intellisense works fine.
There are no issues with Tag Helpers, it's only when using @model directly.
The project builds ok and the page does work fine when served via IIS but shows errors when editing and Intellisense for properties etc. is broken.
This is very similar to an old, fixed, bug here: aspnet/Mvc#6296 - although this applied to filenames only I think - but thought I'd mention in case the solution used there helps...
The text was updated successfully, but these errors were encountered: