Blog

TDS How-To: Fix the TDS .targets import setting when it’s not valid

August 02, 2016 | Kliment Klimentov

When using Visual Studio on a restricted machine, a scenario may manifest wherein TDS can’t be installed on the default location

(MSBuildExtensionsPath = C:\Program Files (x86)\MSBuild)

As a consequence, the TDS .targets import setting inside the .scproj files

(<ImportProject="$(MSBuildExtensionsPath)\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets" />)
are not valid.

In order to work around this restriction, one can add the path to the .targets file inside the SafeImports registry, which is located in

"HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\MSBuild\SafeImports"
(this path is for VS 2010).

After adding the key, Visual Studio will have to be restarted and the devenv /setup command may have to be run from command prompt.