The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspnetCore' (are you missing an assembly reference?)
See original GitHub issueDescribe the bug
in blazor project, When i update the .Net Core 3.0.0.Preview4 and then changes all the .cshtml in to .razor pages i have faced this issue “The type or namespace name ‘Mvc’ does not exist in the namespace ‘Microsoft.AspnetCore’ (are you missing an assembly reference?)”
Can one help me for how to resolve this?
Expected behavior
Need to be build succeed
Screenshots
Additional context
Add any other context about the problem here.
Include the output of dotnet --info
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:54 (14 by maintainers)
Top Results From Across the Web
The type or namespace name 'Mvc' does not exist
A simple solution is to add this reference trough Nuget. The MVC library will be installed in your bin directory and, if needed,...
Read more >I'm getting this issue: the type or namespace name 'Mvc' ...
I'm getting this issue: the type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspnetCore' (are you missing an assembly reference?)...
Read more >The type or namespace 'AspNetCore' does not exist in ...
When I built my first Controller Rendering, I got the error "The type or namespace name 'AspNetCore' does not exist in the namespace...
Read more >[Solved]-The type or namespace name 'Mvc' does not exist in ...
[Solved]-The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)-Asp.Net-Mvc.
Read more >CS0234 errors on all views after creating new .NET ASP ...
CS0234 The type or namespace name 'Helpers' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same situation here. 2 projects, 1 is building fine, another fails with this error. Both are client-side Blazor projects.
@Legends
Regarding VS Preview: note that you’re quoting a comment that refers to the then-new 16.1 Preview. Regardless, Blazor preview 7 and up does require VS 16.3 Preview to fully work, because it includes some Razor tooling changes:
The “Preview Features” SDK checkbox isn’t quite the same thing. What it does is allow you to use a .NET Core 3.0 preview from a non-preview VS at all. It does not, however, include the complete tooling for Blazor.
Note that VS previews will install side-by-side with the regular VS, so while it will take some time to install and take up a fair amount of disk space, it won’t really interfere with your production stuff.