添加了以下代码
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.0.0.0" />
</dependentAssembly>
这没有用,也尝试了下面的代码没用
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
答案 0 :(得分:0)
您是否尝试过NuGet?
Install-Package System.ComponentModel.Annotations