我们有一个应用程序是 .netcore 3.1 - 一个控制台应用程序。
这使用了 Microsoft 的 3rd 方库,该库在内部创建了一个调度程序。
在 net472 输出类型下这有效,但是在 netcore31 输出类型下会发生以下错误:
System.TypeLoadException: 'Could not load type 'System.Windows.Threading.Dispatcher' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.'
有关信息:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
有谁知道是否有一种方法可以使这项工作无需更改到 .net 框架,这会导致许多其他问题,主要与从其他应用程序接收序列化消息有关,这些应用程序具有源自 .net 核心的序列化方案3.1.