0

我成功地在我的网络应用程序中安装了 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 控制器时,我得到以下信息:

在此处输入图像描述

它添加的控制器来自 Web API Beta(带有“命名空间控制器”)

我正在使用 VWD 2010。

我怎样才能让它正常工作?

编辑: 无法卸载...

在此处输入图像描述

4

1 回答 1

0

如果尚未安装,请尝试使用 NuGet 进行安装

于 2012-08-30T15:14:40.650 回答