Build error “An attempt was made to load an assembly with an incorrect format ” after upgrade net framework 4.5.2 to 4.7.1

前端 未结 3 475
轮回少年
轮回少年 2021-01-12 03:30

We are trying to update the framework of our program. We currently have it in version 4.5.2 and we want to update it to version 4.7.1

We have changed all the csproj

3条回答
  •  无人共我
    2021-01-12 03:53

    UPDATE: As Josh suggests below, now that 4.7.2 is available, upgrade to that .NET version for the best resolution of this problem.

    If stuck with 4.7.1: This probably isn't addressing the root of the problem, but if you want to get over this for the moment, then find the offending project and edit its settings (rclick project, 'Properties', then 'Build' tab.)

    Set 'Generate serialization assemblies' to 'Off' for Release mode.

    If it still complains, try adding the following s to your .csproj file (e.g. towards the bottom, just inside the enclosing root tag:

    
        
          
        
        
      
      
        
          
        
        
      
    

提交回复
热议问题