Visual Studio 2010 的简单 HTML 项目类型

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11290440/
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-08-29 01:23:18  来源:igfitidea点击:

simple HTML project type for Visual Studio 2010

htmlvisual-studio-2010restvisual-studio-2012

提问by daljit

We are developing a REST based application using Visual Studio 2010, using asp.net web api and we want to host it using IIS.

我们正在使用 Visual Studio 2010 开发基于 REST 的应用程序,使用 asp.net web api,我们希望使用 IIS 托管它。

For the client side, we want to use pure html, css and javascript to access and using this REST based application.

对于客户端,我们希望使用纯 html、css 和 javascript 来访问和使用这个基于 REST 的应用程序。

But we could not find any project type HTML web application or site in VS 2010. WE do not want to use asp.net or mvc empty project.

但是我们在 VS 2010 中找不到任何项目类型的 HTML web 应用程序或站点。我们不想使用 asp.net 或 mvc 空项目。

Is there is any project type available or any other best way to do this?

是否有任何可用的项目类型或任何其他最佳方式来做到这一点?

回答by BlackSpy

Create a folder on your drive for the website. Then create an Blank Solution project (Other Project Types -> Visual Studio Solutions). Finally, right click in your solution and choose "Add -> Existing website", select file system in the Add Existing Web Site dialog, and navigate to your web site folder.

在您的驱动器上为网站创建一个文件夹。然后创建一个空白解决方案项目(其他项目类型 -> Visual Studio 解决方案)。最后,右键单击您的解决方案并选择“添加 -> 现有网站”,在“添加现有网站”对话框中选择文件系统,然后导航到您的网站文件夹。

回答by yantaq

I made a simple template. to get it:
Visit Visual Studio Gallerypage. Download the VSIX file and install it. next time when you create new project, you will see the HTMLProjectTemplate in Visual C# project type.

Another way to install the plugin:
Install directly from VS2010 > Tools > Extension Manager, search for HTMLWebsitein Online Gallery, install it. next time when you create new project, you will see the template under Visual C# project type.

我做了一个简单的模板。获取它:
访问Visual Studio Gallery页面。下载 VSIX 文件并安装它。下次创建新项目时,您将看到 Visual C# 项目类型的 HTMLProjectTemplate。 另一种安装插件的方法:直接从VS2010>工具>扩展管理器安装,在在线图库中搜索HTMLWebsite,安装它。下次创建新项目时,您将在 Visual C# 项目类型下看到模板。