我正在使用样板开发asp .net核心Web应用程序,并尝试使用ODATA。在在线启动应用程序
//Initializes ABP framework.
app.UseAbp(options => { options.UseCastleLoggerFactory = false; });
我要例外:
Abp.dll中发生了类型为'System.TypeLoadException'的异常 但未在用户代码中处理
无法从程序集中加载类型'System.Web.HttpPostedFileBase' 'System.Web,版本= 4.0.0.0,文化=中性, 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" />