Skip to content
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

Intellisense breaking in Razor pages with hyphen in folder name #4857

Closed
maxscan opened this issue Apr 15, 2021 · 3 comments
Closed

Intellisense breaking in Razor pages with hyphen in folder name #4857

maxscan opened this issue Apr 15, 2021 · 3 comments
Assignees
Milestone

Comments

@maxscan
Copy link

maxscan commented Apr 15, 2021

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...

@NTaylorMullen
Copy link
Contributor

If this is broken in the old editor as well then no-op and put back to triage

@NTaylorMullen NTaylorMullen self-assigned this Apr 29, 2021
@ryanbrandenburg ryanbrandenburg self-assigned this Apr 30, 2021
@ryanbrandenburg
Copy link
Contributor

@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?

@NTaylorMullen NTaylorMullen removed their assignment Apr 30, 2021
@ghost
Copy link

ghost commented May 24, 2021

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.

See our Issue Management Policies for more information.

@ghost ghost closed this as completed May 27, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2021
@dotnet dotnet unlocked this conversation Oct 8, 2021
@allisonchou allisonchou transferred this issue from dotnet/aspnetcore Oct 8, 2021
@allisonchou allisonchou added this to the 17.0-Preview2 milestone Oct 8, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 7, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants