Visual Studio 2013 - VB.NET MVC 5 模板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20558088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 16:07:24  来源:igfitidea点击:

Visual Studio 2013 - VB.NET MVC 5 Template

vb.netasp.net-mvc-5visual-studio-2013

提问by Jatin

I cannot locate a vb.net MVC5 Template in VS2013 Ultimate (just installed).

我在 VS2013 Ultimate(刚刚安装)中找不到 vb.net MVC5 模板。

回答by Rion Williams

An important thing to remember is that ASP.NET in Visual Studio 2013 has migrated to "One ASP.NET" which consists of a single Web Application environment that supports all of the major development technologies (Web Forms, MVC, Web API, etc.).

需要记住的重要一点是,Visual Studio 2013 中的 ASP.NET 已迁移到“One ASP.NET”,它由支持所有主要开发技术(Web 窗体、MVC、Web API 等)的单个 Web 应用程序环境组成)。

You'll just need to follow these steps to set up an MVC5 application in Visual Basic :

您只需要按照以下步骤在 Visual Basic 中设置 MVC5 应用程序:

  1. Create a New Project.
  2. Choose the ASP.NET Web Application (ensure that the Web tab is selected under Visual Basic templates within Visual Studio)
  3. In the dialog that appears, select the MVC template.
  4. Click Ok to create your MVC application.
  1. 创建一个新项目。
  2. 选择 ASP.NET Web 应用程序(确保在 Visual Studio 中的 Visual Basic 模板下选择了 Web 选项卡
  3. 在出现的对话框中,选择 MVC 模板。
  4. 单击“确定”以创建您的 MVC 应用程序。

You should see something like this in the image below :

您应该在下图中看到类似的内容:

One ASP.NET Example

一个 ASP.NET 示例

As far as an explicit MVC5 template, I'm not sure a template is currently available in Visual Studio 2013 (since it uses the One ASP.NET approach) however you may want to consider downloading the ASP.NET and Web Tools 2013.1 Update for Visual Studio 2012which adds the MVC5 Templates in Visual Studio 2012 and would allow you to explicitly use an MVC5 Template within Visual Studio 2012 :

至于显式 MVC5 模板,我不确定 Visual Studio 2013 中当前是否有模板(因为它使用 One ASP.NET 方法)但是您可能需要考虑下载ASP.NET and Web Tools 2013.1 Update for Visual Studio 2012Visual Studio 2012中添加了 MVC5 模板,并允许您在 Visual Studio 2012 中显式使用 MVC5 模板:

Hosted by imgur.com

由 imgur.com 主办

回答by Karl Anderson

  • Click New Project, then select Visual Basicon the left and select Web.
  • Verify that you have selected .NET Framework 4.5from the drop down list up top.
  • Below the framework drop down list, select ASP.NET Web Application. Name your project whatever you wish and then click OK.
  • In the New ASP.NET Projectdialog, click MVCand then click OK.
  • 单击New Project,然后选择左侧的Visual Basic并选择Web
  • 验证您是否从顶部的下拉列表中选择了.NET Framework 4.5
  • 在框架下拉列表下方,选择ASP.NET Web Application。随意命名您的项目,然后单击“确定”
  • 新建 ASP.NET 项目对话框中,单击MVC,然后单击确定

Your ASP.NET MVC 5 VB.NET web project should now load up.

您的 ASP.NET MVC 5 VB.NET Web 项目现在应该已加载。



Note: I do not believe the preview version of Visual Studio 2013 came with the VB.NET template.

注意:我不相信 Visual Studio 2013 的预览版带有 VB.NET 模板。