Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC 4 project not recognized in Visual Studio 2017 RC

I have an older ASP.NET MVC 4 project in our solution. I just installed Visual Studio 2017 RC Community Edition (VisualStudio/public.d15rel/15.0.26020.0). We have been using VS2015 successfully.

When I load the solution in VS2017RC, I get the error:

The application which this project type is based on was not found.

I've re-installed ASP.NET MVC 4 after installing VS2017RC, but it didn't help.

I plan to upgrade that to a newer version of ASP.NET MVC, but I'm hoping to use VS2017 in the mean time.

like image 773
MikeJansen Avatar asked Jan 19 '17 16:01

MikeJansen


People also ask

What are the main feature of ASP NET MVC 4 used by ASP Net Web API?

ASP.NET MVC 4 includes ASP.NET Web API, a new framework for creating HTTP services that can reach a broad range of clients including browsers and mobile devices. ASP.NET Web API is also an ideal platform for building RESTful services.


3 Answers

  1. Open the .csproj file in a text editor
  2. Find the code (may be different):
    <ProjectTypeGuids> {E3E379DF-F4C6-4180-9B81-6769533ABE47}; {349c5851-65df-11da-9384-00065b846f21}; {fae04ec0-301f-11d3-bf4b-00c04f79efbc} </ProjectTypeGuids>

  3. Delete the section {E3E379DF-F4C6-4180-9B81-6769533ABE47};

  4. Save the file and re-open the solution.

Not all MVC4 attributes (f.e. Viewbag) are recognised in Views. But at least you can open and run the project until a patch is released.

like image 123
Robin V. Avatar answered Oct 17 '22 19:10

Robin V.


RC is a "Release Candidate"; it may have known issues until the full release is ready. Your problem is one of them.

MVC4 Projects are not supported

You can keep up to date through the release notes.

like image 33
ChiefTwoPencils Avatar answered Oct 17 '22 17:10

ChiefTwoPencils


They say it's fixed, pending release (at the moment).

Here's the UserVoice ticket: https://developercommunity.visualstudio.com/content/problem/2865/cannot-load-mvc4-web-project-in-vs-2017-rc.html

like image 1
RobSiklos Avatar answered Oct 17 '22 19:10

RobSiklos