-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Visual Studio error displaying .razor file #11486
Comments
Since this file is in aspnet/AspNetCore-Tooling, my feeling is this probably should be moved to that repo. Thoughts @NTaylorMullen @mkArtakMSFT ? |
This is definitely a tooling issue; however, we track issues here in AspNetCore 😄. That being said this is the first public report of this issue that we've had. We have another internal report of this issue tracking the work as well. I've marked the bug with the appropriate labels and will leave it to triage to decide when to tackle this. |
I am getting this consistently when opening .razor files in Components.sln. Version 16.2.0 Preview 4.0 [29018.194.d16.2stg] SDK: 3.0.100-preview6-012264 |
@BrennanConroy, can you also include the actual error message and stack trace? |
Encountered an error during adding a Code Container: Some or all identity references could not be translated.
|
Interesting, so your casing is busted (notice how first part starts with |
From the command line (in the . .\activate.ps1 environment), cd to Components folder, then "./Components.sln" |
Ah, so if you do pwd do you see a lower case |
Yeah |
Wait |
Yes, those are both true |
I have the same problem, Stack trace:
I see the case difference on the source folder |
I get an invalid operation exception in Visual Studio 2019 Preview, .NET Core 3 preview 4 when opening a .razor file. VS renders the text as white only and intellisense does not work.
When I check the error log:
System.InvalidOperationException: The file 'C:/Users/jerry/Desktop/vs/MetroLock/MetroLock/Pages/FetchData.razor' is not a descendent of the base path 'C:/Users/jerry/desktop/vs/MetroLock/MetroLock' ...
In the two paths, one of the "Desktop" is capitalized, the other is not. This is fixed by moving my project to a lower case only directory. I looked really quick at the file DefaultRazorProjectFileSystem.cs and one possible fix would be on line 53
if (!absolutePath.StartsWith(absoluteBasePath))
could be changed to:
if (!absolutePath.StartsWith(absoluteBasePath, StringComparison.OrdinalIgnoreCase))
I hope this helps,
Thanks!
The text was updated successfully, but these errors were encountered: