C# System.TypeLoadException:无法加载类型';System.Web.HttpUtility';来自组件';Microsoft.AspNetCore.Http.Abstractions,版本=3.0.1.0,
我的asp.net core 3.0应用程序中出现以下错误C# System.TypeLoadException:无法加载类型';System.Web.HttpUtility';来自组件';Microsoft.AspNetCore.Http.Abstractions,版本=3.0.1.0,,c#,asp.net-core-3.0,.net-core-3.0,C#,Asp.net Core 3.0,.net Core 3.0,我的asp.net core 3.0应用程序中出现以下错误 System.TypeLoadException: Could not load type 'System.Web.HttpUtility' from assembly 'Microsoft.AspNetCore.Http.Abstractions, Version=3.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. 我的应用程序项目文件如下所示 <Projec
System.TypeLoadException: Could not load type 'System.Web.HttpUtility' from assembly 'Microsoft.AspNetCore.Http.Abstractions, Version=3.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
我的应用程序项目文件如下所示
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<RuntimeIdentifiers>ubuntu.16.04-x64;ubuntu.16.10-x64;win-x64;win10-x64;win10-x86;debian-x64;debian.8-x64;debian.9-x64;win81-x64;ubuntu.18.04-x64;</RuntimeIdentifiers>
<ServerGarbageCollection>true</ServerGarbageCollection>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="3.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
</ItemGroup>
</Project>
netcoreapp3.0
..\docker-compose.dcproj
Linux
ubuntu.16.04-x64;ubuntu.16.10-x64;win-x64;win10-x64;win10-x86;debian-x64;debian.8-x64;debian.9-x64;win81-x64;ubuntu.18.04-x64;
真的
真的
我最终删除了HttpUtility代码并使用了其他解决方法我最终删除了HttpUtility代码并使用了其他解决方法