koviroli
koviroli

Reputation: 1453

Layout does not exists in ASP.NET MVC 4 project

I have a project at my company that was developed more than year ago. It is an ASP.NET MVC 4 project. It worked well about a year ago, since that nobody touched it.

I wanna compile it now and it says: enter image description here

It uses .NET Framework 4.5 and MVC 4.

I tried to create a new project with same properties : .NET Framework 4.5 but MVC 5 and it works well.

I use Visual Studio 2017 Pro.

Installed ASP.NET MVC 4 for Visual Studio, but still the same problem.

enter image description here

I have reference to System.Web and System.Web.Mvc too.

enter image description here

What could I do? I don't wanna modify project or any source code.

Upvotes: 0

Views: 163

Answers (2)

Nick Mehrdad Babaki
Nick Mehrdad Babaki

Reputation: 12495

Right click on your project on solution explorer, on the menu you should see Manage NuGet Packages Click it. Then you see manage NuGet with three tabs, Browse, install and updates. Click on the updates tab and update all packages. then if you rebuild your project, you shouldn't have any issue.

Upvotes: 0

npo
npo

Reputation: 1060

I had something similar trying to open an old project. Try opening it with an older version of visual studio. Mine was slightly older i had to use vs 2012, maybe that helps :)

Upvotes: 1

Related Questions