How to set SGEN toolpath in Msbuild to target 3.5 framework

后端 未结 5 430
时光取名叫无心
时光取名叫无心 2020-11-29 07:58

I\'ve just upgraded a project from VS2008 to VS2010 but I\'m still targeting the 3.5 framework.

In my project file I have a custom task to run SGEN to generate my X

5条回答
  •  感动是毒
    2020-11-29 08:09

    I have solved this by manually configuring the ToolPath to point to the old (version 2.0.50727.3038) version of sgen.exe

    On my machine, this is in: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

    I changed the ToolPath attribute to be:

    ToolPath="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"
    

    and this solved the problem.

    It seems, by default, it's running the new 4.0 framework version in: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

    Hope this helps somebody else.

提交回复
热议问题