Build/Test Issues

VS 2017 and VS SDK

Started by fsdschmidt on 6,032 views

Hi!

we build and tested our solution successfully with VS 2015. Now, we switched to VS 2017 and have some trouble with VS SDK tools. We suspect MSBuild could not find the CreatePkgDef.exe, because if we start the tool manually from command line all is fine. Do you have any ideas?

Creating intermediate PkgDef file.
Using "CreatePkgDef" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\VSSDK\Microsoft.VsSDK.Build.Tasks.dll".
Can not find the tools for VS SDK.
/out="obj\Debug\HoloDeck.Client.CommonLibPackage.latest.pkgdef" /codebase /i="..."
The "CreatePkgDef" task failed unexpectedly.
System.InvalidOperationException: Der Prozess kann nicht gestartet werden, da ein Dateiname nicht angegeben wurde. (Cannot start process because a file name has not been provided.)
bei System.Diagnostics.Process.Start()
bei Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
bei Microsoft.VsSDK.Build.Tasks.CreatePkgDef.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
bei Microsoft.Build.Utilities.ToolTask.Execute()
bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Thanks,
Micha
Hi Micha,

Check that there aren't any files being implicitly referenced on a relative path through the build system. If there is a tool that is required by the build tasks that is stored near your project/solution structure, you might need to specifically include it for NCrunch. See here for more details - http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies.

I've had previous situations where the 'Copy referenced assemblies to workspace' was required for VS SDK projects. You might want to turn this on to see if this helps. Compatibility mode is also worth trying.

Finally, it's my experience that in most cases, the VS SDK tools don't need to be used in your test environment. You may get better results just by turning them off. Adding a Condition="'$(NCrunch)' != '1'" to the MSBuild <Import> tags responsible for referencing the SDK should do the trick.
Hi Remco,

thanks for your fast support. Disabling VS SDK tools did the trick for us too. Now all is fine with VS 2017 and VS SDK.

Micha

Post a reply

Log in to reply.