ASP.NET MVC Error on Creating a new project - asp.net-mvc-5

I get this error when trying to create a new ASP.NET and ASP.NET MVC project in Visual Studio 2015 professional
Any one with a solution on how to fix this

Related

Old MVC templates missing

I have updated my Visual Studio to MVC 6 or ASP.NET Core 1.0. When I am trying to make new project with MVC 5 it is unable to find the old MVC 5 templates, it only sees empty templates.
How to resolve this problem and get or add MVC 5 templates?

How do I add a reference to my Model(s) to a unit test project for MVC 5 in Visual Studio 2015?

Background: learning about MVC, Bootstrap, etc. So, new to doing this in Visual Studio. More of a C# backend programmer / hand-rolled html/css/js fiddler.
I'm trying to add a unit test to an MVC project, and I get the uselessly generic "A reference to 'Your Project Name' could not be added." error when I try to reference my main project so I can test against my Model classes.
Visual Studio 2015 Professional
Created new Project with File -> New Project -> Templates -> Visual C# -> Web -> ASP.NET Web Application
Selected "Web Application" from ASP.NET 5 Preview Templates
Added some code, including a class to serve as a model for Code First.
Added a Unit Test project under the Solution folder by right-clicking and choosing Add -> New Project, under the Visual C# folder for the templates I picked Test -> Unit Test Project. The targeted framework at the top was set to .NET Framework 4.5.2
Googling around suggested that I had a target framework mismatch. I don't know how to check the target framework on a MVC project I guess, the Project Properties window lists Application and Solution DNX SDK version ( set to 1.0.0-beta5, platform .NET Framework ) but doesn't tell me what framework I'm targeting.
How I can utilize Microsoft's unit testing framework with this kind of project?
In Visual Studio, open the Package Manager Console (TOOLS > Nuget Package Manager > Package Manager Console) and type the following command:
Update-Package
This will update and 'level' all packages of both projects and any version mismatch should be fixed.

Visual Studio 2012 error .NET 4.6

Once I open a .NET 4.6 project I got this message
Configuring Web http://localhost:64886/ for ASP.NET 4.6 failed. You must manually configure this site for ASP.NET 4.5 in order for the site to run correctly. ASP.NET 4.6 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.6 in order for your site to run correctly.
And I'm sure that .NET 4.6 is installed on my computer
Actually it isn't .Net framework problem. It's Visual studio problem.
You can install that visual studio 2012 update and it will work smoothly.
The details of the update can be found here https://www.microsoft.com/en-us/download/details.aspx?id=44907

MVC5 project template for Visual Studio 2012

I'd like to get started with ASP.NET MVC 5 using Visual Studio 2012. I've installed the "ASP.NET And Web Tools 2013 for Visual Studio 2012, but this "only" gives me an "Empty ASP.NET MVC 5 Project" template.
For MVC4 web projects, I can select different kinds of Web applications (like "Standard", "Internet", "Intranet" etc.). And I've seen screenshots with similar options for Visual Studio 2013.
Are there any project templates (for VS2012) which allow me to do the same for MVC5 applications?
It seems that "currently" there is only included the Empty Project template, and MS officially hasn't released all other templates for VS2012. For ASP.NET MVC 5 you can use the scafolding to add the Controllers, Views etc. This is the same for WebAPI templates.
ASP.NET MVC 5 template
We added a new MVC 5 template. It references
the latest MVC 5 NuGet packages, and you can use scaffolding to add
controllers and views.
Also see the RELEASE NOTES
Not sure if you are interested in this answer, but I have a tutorial that will not only get your empty MVC 5 project working with Bundling, a controller, jQuery, jQuery UI, Modernizr and more, but it will walk you through installing Zurb's Foundation 5, a responsive Framework which I have working with Sass in MVC 5. It's all here:
http://httpjunkie.com/2013/158/install-zurbs-foundation-5-in-net-mvc-5/
The problem many have ran into is that Visual Studio 2012 only allows you to start from a blank MVC 5 project, so I will help you get the NuGet installed which is pretty similar to the instructions in the NuGet package with a few minor changes; however, it does not take into consideration that you will be installing from Visual Studio 2012 using a Blank MVC 5 project. If you would like to use Foundation 5 with MVC 4 Web Application template just omit the Bootstrap uninstall and the NuGet package should work fine, but if you need to use MVC 5 and you don’t have Visual Studio 2013, you will need to build the Home Controller, Bundling class, modify the Global.asax.cs as well as other quirky little things. So lets get started.
I spent a good part of a few hours getting it all working.
I just ran across this and going through it now. It seems to be spot on as well as really answering the posters question.
http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/
Use VS2013 express, which has the latest templates, generate the scaffolded project (not empty), then go back to VS2012 and do your work.

Cannot create Visual Studio 2012 MVC4 WebAPI project

I have installed visual studio 2012 ultimate. I tried to create new project - MVC4 - WebAPI. I got the error message "The system cannot find the file specified. (Exception from HRESULT:0x80070002)"
I have reinstalled vs 2012 and repair mode also. I still cannot rid of this error message.
Any advise?
Download ASP.NET Web tools 2012.2 from
http://www.asp.net/downloads and install it
I am quite positive you should be able to create ASP.NET MVC projects using Visual Studio 2012.

Resources