I want using external logins so I installed Oauth by package manager:
PM> Install-Package Microsoft.AspNet.WebPages.OAuth
Then I got this error after installed it then I install razor:
PM> Install-Package Microsoft.AspNet.Razor
But I still have this exception. Further more my application is an asp.net application and not a MVC application. Thanks for help.
[FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
Microsoft.Web.WebPages.OAuth.PreApplicationStartCode.Start() +0
Another option is to update the Microsoft.AspnNet.Mvc NuGet package. Be careful, because NuGet update does not update the Web.Config. You should update all previous version numbers to updated number. For example if you update from asp.net MVC 4.0.0.0 to 5.0.0.0, then this should be replaced in the Web.Config:
Update using NuGet Package Manager Console in Visual Studio
Update-Package -reinstall Microsoft.AspNet.Mvc
Apologies in advance for this lo-tech suggestion, but another option, which finally worked for me after battling NuGet for several hours, is to re-create a new empty project, Web API in my case, and just copy the guts of your old, now-broken project into the new one. Took me about 15 minutes.
You have upgraded to Razor 3. Remember that VS 12 (until update 4) doesn't support it. Install The Razor 3 from nuget or downgrade it through these step
geekswithblogs.net/anirugu/archive/2013/11/04/how-to-downgrade-razor-3-and-fix-the-issue-that.aspx