Ho recentemente aggiornato un progetto VS2008/.NET 3.5 SP1 a VS2010 e .NET 4. Ho un evento post-build che chiama SGEN per generare l'assembly XmlSerializers.SGEN non funziona dopo l'aggiornamento da VS2008 a VS2010
Ogni volta che provo a eseguirlo, ho il seguente errore.
"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 /?".
ottengo lo stesso errore di esecuzione SGEN dalla riga di comando, ma io non riesco a capire quale sia il problema. Qualche idea?