3
votes

According http://www.codeproject.com/Articles/38778/ASP-NET-WebForms-and-ASP-NET-MVC-in-Harmony

I did this changes to my WebForms project:

  1. Added System.Web.Mvc.dll
  2. Added System.Web.Abstractions.dll
  3. Created Controllers and View folder
  4. Added those assemblies in my debug section
  5. Added MVC, MVC.Ajax, MVC.HTML to my pages->namespaces
  6. Added Web.Routing.UrlRoutingModule as HttpModule
  7. Registered test route

But on "Getting Visual Studio to Offer MVC Items" section i dont have Unload Project Option and also i dont have csproj file. I only have .sln and .sln.DotSettings.user

I can add view but not controller, why, any suggestion? http://prntscr.com/94imo

1
thats an old tutorial. you should follow these steps: hanselman.com/blog/… - Daniel A. White
this is what iv got prntscr.com/94jh8 :( - Novkovski Stevo Bato
do you have a recent copy of nuget? - Daniel A. White
Package Manager Console Host Version 1.7.30402.9028 - Yes - Novkovski Stevo Bato

1 Answers

3
votes

Since you wrote that you don't have a csproj file I'm guessing that what you have is a WebForms Website not a WebApplication project.

I took a quick look at the tutorial you posted a link to and it seems that it isn't mentioning that step but when I was last transforming a WebForms Website into an MVC WebApplication (admittedly it was a while ago) I had to convert it to a WebForms WebApplication project first.