Visual Studio 2012的MVC5项目模板。

时间:2023-01-17 11:14:12

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.

我想从ASP开始。NET MVC 5使用Visual Studio 2012。我已经安装了“ASP。2013年Visual Studio 2012的网络和网络工具,但这“只”给了我一个“空的ASP”。NET MVC 5项目“模板”。

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.

对于MVC4 web项目,我可以选择不同类型的web应用程序(如“标准”、“Internet”、“Intranet”等)。我也看过类似于2013年Visual Studio的屏幕截图。

Are there any project templates (for VS2012) which allow me to do the same for MVC5 applications?

是否有任何项目模板(VS2012)允许我对MVC5应用程序进行相同的操作?

4 个解决方案

#1


15  

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.

看起来“目前”只包含了空的项目模板,而MS官方还没有发布VS2012的所有其他模板。ASP。NET MVC 5可以使用scaf来添加控制器、视图等等。这对于WebAPI模板来说也是一样的。

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.

ASP。我们添加了一个新的MVC 5模板。它引用最新的MVC 5 NuGet包,您可以使用scaffolding来添加控制器和视图。

Also see the RELEASE NOTES

还请参阅发行说明。

Visual Studio 2012的MVC5项目模板。

#2


10  

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:

不确定这个答案如果你感兴趣,但是我有一个教程,不仅会让你空MVC 5项目与捆绑合作,一个控制器,jQuery,jQuery UI,Modernizr和更多的,但它将指导您完成安装5 Zurb开发的基础,一个响应框架我处理Sass MVC 5。都在这里了:

http://httpjunkie.com/2013/158/install-zurbs-foundation-5-in-net-mvc-5/

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.

很多人遇到的问题是Visual Studio 2012只允许您从一个空白的MVC 5项目开始,所以我将帮助您获得NuGet安装,它与NuGet包中的说明非常类似,有一些细微的变化;但是,它没有考虑到您将使用一个空白的MVC 5项目从Visual Studio 2012中安装。如果你想使用基础5 4 MVC Web应用程序模板只是省略了引导卸载和NuGet包应该工作很好,但是如果你需要使用MVC 5和你没有Visual Studio 2013中,您需要构建主控制器,捆绑类,修改asax。cs以及其他一些古怪的小东西。我们开始。

I spent a good part of a few hours getting it all working.

我花了好几个小时的时间把所有的工作都做完了。

#3


3  

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/

http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/

#4


0  

Use VS2013 express, which has the latest templates, generate the scaffolded project (not empty), then go back to VS2012 and do your work.

使用VS2013 express,它有最新的模板,生成脚手架项目(不是空的),然后返回到VS2012并完成您的工作。

#1


15  

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.

看起来“目前”只包含了空的项目模板,而MS官方还没有发布VS2012的所有其他模板。ASP。NET MVC 5可以使用scaf来添加控制器、视图等等。这对于WebAPI模板来说也是一样的。

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.

ASP。我们添加了一个新的MVC 5模板。它引用最新的MVC 5 NuGet包,您可以使用scaffolding来添加控制器和视图。

Also see the RELEASE NOTES

还请参阅发行说明。

Visual Studio 2012的MVC5项目模板。

#2


10  

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:

不确定这个答案如果你感兴趣,但是我有一个教程,不仅会让你空MVC 5项目与捆绑合作,一个控制器,jQuery,jQuery UI,Modernizr和更多的,但它将指导您完成安装5 Zurb开发的基础,一个响应框架我处理Sass MVC 5。都在这里了:

http://httpjunkie.com/2013/158/install-zurbs-foundation-5-in-net-mvc-5/

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.

很多人遇到的问题是Visual Studio 2012只允许您从一个空白的MVC 5项目开始,所以我将帮助您获得NuGet安装,它与NuGet包中的说明非常类似,有一些细微的变化;但是,它没有考虑到您将使用一个空白的MVC 5项目从Visual Studio 2012中安装。如果你想使用基础5 4 MVC Web应用程序模板只是省略了引导卸载和NuGet包应该工作很好,但是如果你需要使用MVC 5和你没有Visual Studio 2013中,您需要构建主控制器,捆绑类,修改asax。cs以及其他一些古怪的小东西。我们开始。

I spent a good part of a few hours getting it all working.

我花了好几个小时的时间把所有的工作都做完了。

#3


3  

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/

http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/

#4


0  

Use VS2013 express, which has the latest templates, generate the scaffolded project (not empty), then go back to VS2012 and do your work.

使用VS2013 express,它有最新的模板,生成脚手架项目(不是空的),然后返回到VS2012并完成您的工作。