wh1sp3r
wh1sp3r

Reputation: 1692

The name <object name> does not exists in the current context

Most questions are related with old version of ASP.NET MVC. My question is related to latest .NET Core build on Framework 4.6. I created a console application and standard class library. I installed all libraries needed for running WEB on .NET Core.

Everything is working fine, views are compiled fine and debugging views also working. Unfortunately, Visual Studio shows the following on any object in view:

The name does not exists in the current context.

How can I get rid of these red underlines?

enter image description here

I am using this technique: Running ASP.NET Core MVC as a Console Application Project without .NET Core SDK

Upvotes: 4

Views: 1192

Answers (1)

Ricardo Peres
Ricardo Peres

Reputation: 14535

This error occurred in the initial versions of .NET Core and the tooling for Visual Studio: Basically it was as if we were running release (not debug) build. Please upgrade to the latest versions, including Visual Studio 2015 Update 3, and .NET Core tooling.

Upvotes: 0

Related Questions