SGEN doesn't work after upgrading from VS2008 to VS2010

后端 未结 2 1129
滥情空心
滥情空心 2020-12-20 20:11

I just recently upgraded a VS2008/.NET 3.5 SP1 project to VS2010 and .NET 4. I have a post-build event which calls SGEN to generate the XmlSerializers assembly.

When

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-20 21:02

    Yes, there are two versions of sgen.exe available, one for CLR v2 assemblies, the other for CLR v4 assemblies. It bombs because you ask the v2 version of sgen.exe to process a v4 assembly.

    Check how your project gets sgen.exe started. If it is a post-build event then you'll have to tweak the path to sgen.exe. I don't see a macro or environment variable to get it right automatically, bit of an oversight.

提交回复
热议问题