在Visual Studio中启动WebAPI项目的最干净方法(无视图) [英] Cleanest way to start a WebAPI project in Visual Studio (NO VIEWS)

查看:297
本文介绍了在Visual Studio中启动WebAPI项目的最干净方法(无视图)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

删除Visual Studio API模板通常附带的所有其他功能的最干净方法是什么,如果只想拥有WebAPI服务就不需要像Views之类的东西?

What's the cleanest way to remove all extras that normally come with Visual Studio API Template, things like Views and other stuff that are not needed if you just want to have a WebAPI service??

我假设VIEWS文件夹用于MVC视图...也许我错了,并且拥有运行中的API都是必需的.

I'm assuming that the folder VIEWS is for MVC Views ...maybe I'm wrong and it's all needed to have a running APIs.

推荐答案

  1. 启动Visual Studio
  2. 转到File-> New Project-> ASP.NET MVC 4 Web Application.
  3. 点击确定
  4. 然后选择空"而不是"Web API"
  1. Launch Visual Studio
  2. go to File -> New Project -> ASP.NET MVC 4 Web Application.
  3. Click OK
  4. then select "Empty" instead of "Web API"

不会包含任何其他内容,例如视图".

That will not have any extras such as Views.

这篇关于在Visual Studio中启动WebAPI项目的最干净方法(无视图)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆