2012-08-30 47 views
0

我成功地在我的web应用程序中安装了asp.net web api包。ASP.NET Web API包问题

PM> install-package aspnetwebapi 
Attempting to resolve dependency 'Microsoft.AspNet.WebApi (≥ 4.0.20710.0 && < 4.1)'. 

Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0 && < 4.1)'. 
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'. 
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0 && < 4.1)'. 
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0 && < 4.1)'. 
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0 && < 2.1)'. 
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'. 
You are downloading Microsoft.AspNet.WebApi from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/MVC_4_eula_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. 
Successfully installed 'Microsoft.AspNet.WebApi 4.0.20710.0'. 
You are downloading AspNetWebApi from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/MVC_4_eula_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. 
Successfully installed 'AspNetWebApi 4.0.20710.0'. 
Successfully added 'Microsoft.Web.Infrastructure 1.0.0.0' to ProductConfiguration. 
Successfully added 'Microsoft.Net.Http 2.0.20710.0' to ProductConfiguration. 
Successfully added 'Newtonsoft.Json 4.5.8' to ProductConfiguration. 
Successfully added 'Microsoft.AspNet.WebApi.Client 4.0.20710.0' to ProductConfiguration. 
Successfully added 'Microsoft.AspNet.WebApi.Core 4.0.20710.0' to ProductConfiguration. 
Successfully added 'Microsoft.AspNet.WebApi.WebHost 4.0.20710.0' to ProductConfiguration. 
Successfully added 'Microsoft.AspNet.WebApi 4.0.20710.0' to ProductConfiguration. 
Successfully added 'AspNetWebApi 4.0.20710.0' to ProductConfiguration. 

当我添加Web API控制器,我得到如下:

enter image description here

,并添加了控制器是从网络API测试版(带 “命名空间控制器”)

我正在使用VWD 2010.

我该如何才能正常工作?

编辑: 无法卸载...

enter image description here

+0

你能否提供更多信息? – Oppositional

+0

我编辑了我的OP,更具体的信息? – Rivka

回答

0

尝试使用的NuGet安装,而不是如果您还没有

+0

有通知有更新可用。尝试更新但出现错误“值不能为空。参数名称:v1”。 – Rivka

+0

尝试卸载并重新安装NuGet – Jay

+0

然后重新安装web api包?我最初安装它与nuget ... – Rivka