WebApi2 in visual studio 2012

后端 未结 5 1732
南旧
南旧 2021-02-18 17:07

How can I create a project that uses WebApi2 in visual studio 2012?

Do I have to create with a blank project or do I have to create a MVC project?

I don\'t want

5条回答
  •  心在旅途
    2021-02-18 17:57

    As far as I know, Web API 2 is equal to the 5.0.0-beta2, so you can just pull that from NuGet as described by Olav.

    However, if you've installed the VS2012.2 update, you can start with a Web API template, not just with a MVC template. Start a new project, select MVC and then select the Web API template. It won't add that much, just a few example controllers and some configuration files tailored for Web API.

    For specific VS2013 features like they've shown in some Build video's: I'm afraid you would need the 2013 Preview in order to use those.

提交回复
热议问题