VS2008/.NET 3.5 SP1 프로젝트를 VS2010 및 .NET 4로 최근에 업그레이드했습니다. SGEN을 호출하여 XmlSerializers 어셈블리를 생성하는 빌드 후 이벤트가 있습니다.VS2008에서 VS2010으로 업그레이드 한 후 SGEN이 작동하지 않습니다.
실행할 때마다 다음 오류가 발생합니다.
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\sgen.exe" /debug /force /verbose /c:"platform:x86" "C:\path\to\SomeAssembly.dll"
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: An attempt was made to load an assembly with an incorrect format: c:\path\to\someassembly.dll.
- Could not load file or assembly 'file:///c:\path\to\someassembly.dll'
or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
If you would like more help, please type "sgen /?".
SGEN을 명령 줄에서 실행해도 동일한 오류가 발생하지만 문제가 무엇인지 파악할 수 없습니다. 어떤 아이디어?