3

I'm having an issue with visual studio. I'm running VS 2013 professional and installed TDS (team development for sitecore) from here version 5.1.0.24 but when I try to ceate a new TDS project (named TDSMaster in this capture) under visual studio I get this error enter image description here

I'm running Visual studio 2013 pro, windows 7 pro. I have installed some other versions of VS(2012, 2013, 2015) but uninstalled them before I install VS 2013 pro.

Anyone to help please ?

lyz
  • 548
  • 6
  • 16

1 Answers1

6

I finally found the solution, so I share it in case someone will have the same issue someday. The problem was that when I uninstalled VS 2015 community for some reason it didn't delete a key in the registery, in VS output I got this exception (but it didn't show every time I tried to create the porject, just sometimes)

Exception MSBuildToolsPath is not specified for the ToolsVersion "14.0" defined at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0", or the value specified evaluates to the empty string. (InvalidToolsetDefinitionException):
   at Microsoft.Build.BuildEngine.InvalidToolsetDefinitionException.Throw(Exception innerException, String resourceName, Object[] args)
   at Microsoft.Build.BuildEngine.ToolsetReader.ReadToolset(PropertyDefinition toolsVersion, BuildPropertyGroup globalProperties, BuildPropertyGroup initialProperties, Boolean accumulateProperties)
   at Microsoft.Build.BuildEngine.ToolsetReader.ReadEachToolset(ToolsetCollection toolsets, BuildPropertyGroup globalProperties, BuildPropertyGroup initialProperties, Boolean accumulateProperties)
   at Microsoft.Build.BuildEngine.ToolsetReader.ReadToolsets(ToolsetCollection toolsets, BuildPropertyGroup globalProperties, BuildPropertyGroup initialProperties, Boolean accumulateProperties)
   at Microsoft.Build.BuildEngine.ToolsetReader.ReadAllToolsets(ToolsetCollection toolsets, ToolsetRegistryReader registryReader, ToolsetConfigurationReader configurationReader, BuildPropertyGroup globalProperties, BuildPropertyGroup initialProperties, ToolsetDefinitionLocations locations)
   at Microsoft.Build.BuildEngine.Engine.PopulateToolsetStateMap(ToolsetDefinitionLocations locations)
   at Microsoft.Build.BuildEngine.Engine..ctor(Int32 numberOfCpus, Boolean isChildNode, Int32 parentNodeId, String localNodeProviderParameters, BuildPropertyGroup globalProperties, ToolsetDefinitionLocations locations)
   at Microsoft.Build.BuildEngine.Engine.get_GlobalEngine()
   at Microsoft.VisualStudio.Package.Utilities.InitializeMsBuildEngine(Engine existingEngine, IServiceProvider serviceProvider)
   at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreProjectPackage.Initialize()

So all what I had to do was to delete the key in the registery as explained here.

I edit my question as suggested by @Richard Seal

Open registery (regedit)
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild (OS 32 bit) or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild (64 bit)
Before you go farther back up this register key (select MSBuild key then file -> export)
Expand ToolsVersions under MSBuild, you should see 14.0 which appears under ToolsVersions but not under MSBuild, delete this key
If you have VS running you should restart it

Community
  • 1
  • 1
lyz
  • 548
  • 6
  • 16
  • 1
    Please mark your answer as the answer, it will help people in the future. Also, if you could include details of the fix in your post instead of just the link, that will help if the link ever goes bad. – Richard Seal Jan 08 '16 at 14:18
  • Looks like they heard you and today published a blog post on the same subject: http://www.hhogdev.com/blog/2016/january/tds-visual-studio-build-error.aspx – jammykam Jan 08 '16 at 18:15
  • 1
    They would have saved me a day if they did yesterday :) – lyz Jan 08 '16 at 22:39