TFS 2017 doesn't build Fakes targets

筅森魡賤 提交于 2019-12-07 14:21:08

问题


I have a TFS 2017 Update 2 on-prem server with VS 2017 Enterprise installed. Our Build contains a Unit-Testing project which contains a Fakes assembly and works locally on the dev machines. When build on TFS, the build fails with

The type or namespace name 'Fakes' does not exist in the namespace 'Our.Product' (are you missing an assembly reference?)

(i.e. misses/fails to generate the Our.Product.Assembly.Fakes.dll file)

I have additionally set up Fakes as suggested here.

What baffles me is that there are no mentions of Fakes in the build log (except for the error itself and the paths where MSBuild looks for the file), even with debug verbosity. He doesn't event try to generate the Fakes assembly.

Are there other steps I need to take? We use the vNext build definitions.

Update: This is the build step that works now, before the /tv:15.0 /p:VisualStudioVersion=15.0 were not there.


回答1:


Update

Use the latest version for msbuild arguments such as /tv:15.0 /p:VisualStudioVersion=15.0 could solve this issue.


First try to use build service account RDP to remote build agent and manually run the build to see if the assembly generated.

This will narrow down if it's related to your environment on the build agent. Make sure it's the same as your locally dev machines.

If the assembly is also generated, then the issue may related to your build definition settings. Check if you are using the right msbuild version. For vNext build, also enable verbose Debug Mode with system.debug=true



来源:https://stackoverflow.com/questions/45035838/tfs-2017-doesnt-build-fakes-targets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!