Sunday, 18 January 2015

Strange SGEN issue

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. Debugger\SGEN

I recently faced this strange compilation issue. It was strange because the compilation failed in release mode only. Things compiled and ran fine in debug mode. After reading through the internet about the issue, i figured that compilation process was trying to run "SGEN.exe" in order to create an assembly that contains XML serializers for the types contained in the targeted project. It turned out that the issue was with one of the dependency assemblies referred in the project as it was built against .NET framework version 2.0. Given that my implementation was not targeting any serialization requirements, i simply turned off the option in project properties and things started to work just fine.


No comments:

Post a Comment