SGEN failure: An attempt was made to load an assembly with an incorrect format in VS2008

前端 未结 4 1475
逝去的感伤
逝去的感伤 2021-02-07 12:30

I was able to find several similar questions asked and answered, but none of the answers or exact conditions applied to my situation.

  1. I have a .NET 3.5 project bei
4条回答
  •  一向
    一向 (楼主)
    2021-02-07 13:09

    While turning serialization assembly off, will solve the problem, it is just workaround - in the end you'll pay for it with slower start up time. The problem is you have to call sgen.exe from x64 SDK (if you're targeting x64). If you're using msbuild, set correct path to sgen like this:

    
    

提交回复
热议问题