WCF compilation error on CI server: Microsoft.VisualStudio.ServiceModel.targets not found

前端 未结 7 1530
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 13:39

I am getting this error on my CI server:

error MSB4019: The imported project \"C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\WCF\\Microsoft.V

7条回答
  •  梦谈多话
    2021-02-12 14:14

    Well this ruined my morning, but let's not allow it to ruin anyone else's. I couldn't find this information anywhere else. You need to copy a few files from a development machine with VS Pro 2012.

    As aphexddb mentions, you need to copy some targets from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\WCF to the same location on your CI server.

    This then references an assembly called Microsoft.VisualStudio.ServiceModel.Core. You can find this assembly in either the GAC or in the IDE directory at C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.

    Copy this to your CI server and execute gacutil.exe -i Microsoft.VisualStudio.ServiceModel.Core.dll

    This was enough to fix it for me.

    This isn't the first time I found targets missing from my VS express install in my CI server. I can't help but feel that there is some sort of package I can download from somewhere that fills all this in. Does anyone know of such a thing? If not, perhaps we should create one.

提交回复
热议问题