Keo*_*oki 4 nuget asp.net-web-api
我在 Visual Studio 2012 中创建了一个新的 Web Api 项目,我意识到它是用一堆 NuGet 包创建的……我真的需要所有这些包吗?我可以删除其中一些吗?这是已安装的软件包列表:
<packages>
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="jQuery" version="1.8.2" targetFramework="net45" />
<package id="jQuery.UI.Combined" version="1.8.24" targetFramework="net45" />
<package id="jQuery.Validation" version="1.10.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Providers.Core" version="1.2" targetFramework="net45" />
<package id="Microsoft.AspNet.Providers.LocalDB" version="1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.HelpPage" version="4.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OData" version="4.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="4.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Data.Edm" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Ajax" version="2.0.30116.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="2.0.30116.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
<package id="WebGrease" version="1.3.0" targetFramework="net45" />
</packages>
Run Code Online (Sandbox Code Playgroud)
提前致谢
简而言之,不,你没有。当您在 VS 中选择 Web Api 模板时,它假定您需要很多包(和文件夹)。我通常从一个空的 asp.net 应用程序开始,然后使用 NuGet 添加我需要的包。这是我的样子:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Cors" version="5.2.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi" version="5.2.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.2" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net451" />
</packages>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1489 次 |
| 最近记录: |