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.
Related
For an angular project every tutorial on web, indicates to use Visual Studio Code. I am familiar with visual studio environment for like ten years besides there will be more project in my solution. Visual studio code is fine for an angular project but what about other projects in my solution? like services or class libraries.
So i decided to use visual studio 2017 rather than visual studio code. But i couldnt decide which template to choose for angular project, a website or spa template? And is there a way to run an angular project on nodejs just clicking run button.
I would really recommend using the Angular CLI if possible. The CLI adds tooling for testing and AOT among other things that will save you a lot of time in the future.
here is an article about using the CLI with Visual Studio in an MVC app it may give you more info on specifics that you have.
http://candordeveloper.com/2017/04/12/how-to-use-angular-cli-with-visual-studio-2017/
There are some excellent custom templates available for Visual Studio. I personally use this one for Visual Studio 2015. However, I am sure it would work for Visual Studio 2017.
https://marketplace.visualstudio.com/items?itemName=Drag13.Angular2WebTemplate
You can try out the new templates available via "dotnet new" such as "dotnet new angular" You can find out more here: https://dotnetcore.gaprogman.com/2017/04/20/dotnet-new-angular-single-page-application-setup-and-how-the-template-works/
I recently installed a fresh copy of Windows 7 ultimate, because of one reason: The windows recent update to .Net framework 4.5 made my MVC 3 and 4 disappear off the New -> Website template list and only exists in New -> Project option in Visual studio 2012 Pro. I never had this before, it's only the recent "Security" updates and few others all related to .Net framework 4.5 made this magical thing to happen. I don't understand why? Before the Windows "Security" update of 4.5 I was able to see all the MVC templates (3,4) off the New -> Website Template, leaving only two Web option related to Razor 1 and Razor 2, and others few others completely unrelated to MVC.
Please don't direct me to these links,
http://social.msdn.microsoft.com/Forums/vstudio/en-US/efe91261-c52a-44bd-9fe7-199d86ed9733/visual-studio-2012-not-displaying-net-framework-45-or-mvc-project-templates
and Visual Studio 2012 - no MVC project template, no 4.5
Because I have already tried those.
FYI: Re-installation, completely removed and re-installed a fresh copy, uninstalled all Visual studios 2008, 2010, 2012, and then re-installed one by one, and rebooted after every installation, Did not work.
Everything has to do with the Latest windows Update! Anyone else have this problem?
I'm evaluating single-page application frameworks, and I've just downloaded and installed the various templates from ScottGu's page.
However, when I attempt to create a "New ASP.NET MVC 4 Project", as detailed on the Durandal page, here, I see only the default, Visual Studio-installed templates.
I've checked in C:\Users\me\AppData\Local\Microsoft\VisualStudio\11.0\Extensions, and I can see a directory (called eislr0na.wgk) containing the Durandal bits. I've deleted the .cache files in the Extensions folder and restarted Visual Studio.
But, I can't see any of the single-page templates in the dialog box.
What's the problem?
In order to use the new templates you must have the Visual Studio 2012.2 update installed.
In the Visual Studio 2012 RC, I can't install Web Developer Tools properly. None of my ASP .NET MVC project will load in VS2012, and I can't create new ones. The option for ASP .NET MVC projects is simply not there, as shown below.
Furthermore, I can't pick any other framework than the .NET Framework 4 and earlier. I can't seem to pick .NET 4.5, but that may be because it's just an addition to .NET 4.0. That I don't know.
I'm running Windows 8 Release Preview, which should have .NET 4.5 RC installed already, so that shouldn't be the problem. Furthermore, if I click "I want to download more .NET redistributables", I'm taken to a site which says that Visual Studio 2012 RC has that included already.
I can't seem to download MVC 4.5 and install it separately. This is because they claim that it's included already in VS2012 as well.
When I try to click "Modify installation" in my Visual Studio 2012 RC installer, I see the following.
What's interesting here is that "Web developer tools" is never checked. If I check it and click "Update" and reboot, it's unchecked again, and it seems as if this whole feature is missing. I suppose that's really the cause of the problem.
I tried reinstalling Visual Studio 2012 RC entirely by first removing it, then rebooting, and then re-installing it. Running a setup repair doesn't work either.
I have managed to find no other examples of such a problem so far anywhere.
Can you help me?
Edit 1
I just found another weird symptom. Whenever I want to make a "Windows Metro Style" application, it doesn't work either, coming up with this message.
Like I said before, this may indeed be because it's not detecting that I have .NET 4.5 installed already, but I'm not sure. All I know is that I can't pick .NET 4.5 from the frameworks list at all.
On the ISO, I extracted the packages/WPT folder. Inside are all of the installers for the Web tooling components. I uninstalled and then reinstalled everything that had vs11 in the name and it worked!
In Visual Studio 2010 SP1, there is an option on the right-click menu on a web project to Add Deployable Assemblies. Phil Haack blogged about it here.
In Visual Studio 11 beta and Visual Studio 2012, this option appears to be missing. Thankfully, you can easily round trip solutions between VS 2010 and VS 11 so I could just open the solution in VS 2010 to add the MVC assemblies to the _bin_deployableAssemblies folder.
Is it just my installation thats broken or do I need to install anything else to get this working?
The Add Deployable Assemblies dialog was a feature that enabled you to deploy MVC or Web Pages projects. It was necessary because in older versions all the assemblies were installed into the GAC on your dev machine but you wouldn't necessarily know if that was the case on the server. Thus this tooling gesture that made your project bin-deployable.
Starting with MVC 3 Tools Update we are now using Nuget package references, which means that your project is automatically bin-deployable. Since the tooling gesture is no longer necessary it was removed from VS 11.