System.Web.HttpPostedFileBase 没有找到 aspnetboilerplate

System.Web.HttpPostedFileBase not found with aspnetboilerplate

我正在使用样板开发 asp .net 核心 Web 应用程序并尝试使用 ODATA。在线上开始申请

//Initializes ABP framework.
app.UseAbp(options => { options.UseCastleLoggerFactory = false; });

我遇到异常:

An exception of type 'System.TypeLoadException' occurred in Abp.dll but was not handled in user code

Could not load type 'System.Web.HttpPostedFileBase' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

当我添加 AbpWebApiODataModule:

的引用时会引发此异常
[DependsOn(
        typeof(MyApplicationModule),
        typeof(IdentityModule),
        typeof(MyEntityFrameworkCoreModule),
        typeof(AbpAspNetCoreModule),
        typeof(AbpAspNetCoreSignalRModule),
        typeof(AbpWebApiODataModule)        
            )
    ]
    public class MyWebModule : AbpModule
    {

如何修复它并添加 AbpOdata?

P.S。

dotnet --version == 2.1.401

包:

    <PackageReference Include="Abp.AspNetCore.SignalR" Version="3.8.2" />
    <PackageReference Include="Abp.Web" Version="3.8.2" />
    <PackageReference Include="Abp.Web.Api" Version="3.8.2" />
    <PackageReference Include="Abp.Web.Api.OData" Version="3.8.2" />
    <PackageReference Include="Microsoft.AspNet.OData" Version="7.0.1" />
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.3" />
    <PackageReference Include="BuildBundlerMinifier" Version="2.8.391" />    
    <PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
    <PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.1.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.1.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.3" />
    <PackageReference Include="Castle.Core" Version="4.3.1" />
    <PackageReference Include="Abp.AspNetCore" Version="3.8.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.1.1" PrivateAssets="All" />   

对于 ASP.NET Core,它是 Abp.AspNetCore.OData NuGet 包。