Are all of the ASP.NET MVC 4 RC assemblies really necessary for a ASP.NET WebAPI RC deployment?

后端 未结 1 1310
礼貌的吻别
礼貌的吻别 2021-02-03 10:02

When I created a \"Empty WebAPI\" project in Visual Studio 2010, several of the new assemblies to support the MVC web pages were added as references (an example of the few in th

相关标签:
1条回答
  • 2021-02-03 10:54

    No, you don't need all those assemblies.

    I always prefer to build my Web API projects from scratch. I don't use the templates. I simply create an empty ASP.NET Project and add the Microsoft.AspNet.WebApi NuGet package.

    Here are the references that seem to only be needed:

    Microsoft.CSharp
    Microsoft.Web.Infrastructure   // Microsoft.Web.Infrastructure NuGet package
    Newtonsoft.Json                // Newtonsoft.Json NuGet package
    System.Net.Http                // Microsoft.Net.Http NuGet package
    System.Net.Http.Formatting     // Microsoft.AspNet.WebApi.Client NuGet package
    System.Net.Http.WebRequest     // Microsoft.Net.Http NuGet package
    System.Web.DynamicData
    System.Web.Entity
    System.Web.ApplicationServices
    System.ComponentModel.DataAnnotations
    System
    System.Data
    System.Core
    System.Data.DataSetExtensions
    System.Web.Extensions
    System.Web.Http                // Microsoft.AspNet.WebApi.Core NuGet package
    System.Web.Http.WebHost        // Microsoft.AspNet.WebApi.WebHost NuGet package
    System.Xml.Linq
    System.Drawing
    System.Web
    System.Xml
    System.Configuration
    System.Web.Services
    System.EnterpriseServices
    
    0 讨论(0)
提交回复
热议问题