西秀岭

导航

Error in load assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1'

可以再App.config 中追加下面申明

直接加在configuration  节点下就可以了。 

这样就可以使用最新的 5.0.0.0 版本了。

  <runtime>  
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
         <dependentAssembly>  
            <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe"  
                              publicKeyToken="b03f5f7f11d50a3a"  
                              culture="neutral" />  
            <bindingRedirect oldVersion="0.0.0.0-5.0.0.0"  
                             newVersion="5.0.0.0"/>  
         </dependentAssembly>  
      </assemblyBinding>  
   </runtime>  

  

posted on 2022-07-18 12:14  西秀岭  阅读(455)  评论(0编辑  收藏  举报