question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspnetCore' (are you missing an assembly reference?)

See original GitHub issue

Describe 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

bla4

Additional context

Add any other context about the problem here. Include the output of dotnet --info image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:54 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
vignatovcommented, May 1, 2019

Same situation here. 2 projects, 1 is building fine, another fails with this error. Both are client-side Blazor projects.

2reactions
chuckercommented, Aug 29, 2019

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

Visual Studio users need Visual Studio 2019 16.3 Preview 1 to use .NET Core 3.0 Preview 7.

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found