user2281858
user2281858

Reputation: 1997

Use web api 2 in visual studio 2010

How can I use web api 2 in Visual Studio 2010.

Is there any way I can use web api 2 in VS 2010?

Can somebody please help or guide?

Upvotes: 0

Views: 1606

Answers (1)

Sibeesh Venu
Sibeesh Venu

Reputation: 21719

If you want to include Framework version 4, you can follow these steps. In Visual Studio 2010 to add a project of type ASP.NET MVC Web API we can:

1 - Have .NET Framework 4 & ASP.NET MVC 4 installed.

2 - Add a new project and select MVC 4

( on this screen there is no Web API template which is where many users may expect to see it )

enter image description here

3 - Select the Web API Template

enter image description here

You can see the answer here

But in your case, you need to install framework version 4.5. Each version of Visual Studio prior to Visual Studio 2010 is tied to a specific .NET framework. Visual Studio 2010 and beyond allow for targeting of prior framework versions but cannot be used for future releases. You must use Visual Studio 2012 in order to utilize .NET 4.5.

But one user has found a scenario where we can use framework version 4.5 in VS 2010, please see the answer of David Woodward here. If you can install VS 2012, it will be much easier since you don't need to download and install anything else.

Upvotes: 1

Related Questions