【问题标题】:Visual studio Sitecore TDS can not open .scproj projectVisual Studio Sitecore TDS 无法打开 .scproj 项目
【发布时间】:2016-01-09 06:58:27
【问题描述】:

我在使用 Visual Studio 时遇到问题。我正在运行 VS 2013 专业版并从 here 版本 5.1.0.24 安装 TDS(sitecore 团队开发),但是当我尝试在 Visual Studio 下创建一个新的 TDS 项目(在此捕获中名为 TDSMaster)时,我收到此错误

我正在运行 Visual Studio 2013 专业版、Windows 7 专业版。我已经安装了一些其他版本的 VS(2012、2013、2015),但在安装 VS 2013 pro 之前卸载了它们。

有人帮忙吗?

【问题讨论】:

  • 下载包含4个版本的插件。你为 VS2013 安装了正确的版本吗?

标签: c# visual-studio sitecore tds


【解决方案1】:

我终于找到了解决方案,所以我分享它以防有一天有人会遇到同样的问题。 问题是,当我出于某种原因卸载 VS 2015 社区时,它没有删除注册表中的密钥,在 VS 输出中我得到了这个异常(但每次我尝试创建项目时它都没有显示,只是有时)

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()

所以我所要做的就是按照here 的说明删除注册表中的密钥。

我按照@Richard Seal 的建议编辑我的问题

打开注册表 (regedit)
导航到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild(OS 32 位)或 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild(64 位)
在进一步备份此注册密钥之前(选择 MSBuild 密钥,然后选择文件 -> 导出)
展开 MSBuild 下的 ToolsVersions,您应该会看到 14.0 出现在 ToolsVersions 下但不在 MSBuild 下,请删除此键
如果你有 VS 运行,你应该重新启动它

【讨论】:

  • 请将您的答案标记为答案,对以后的人有帮助。此外,如果您可以在帖子中包含修复的详细信息而不仅仅是链接,那么如果链接出错,这将有所帮助。
  • 看起来他们听到了你的声音,今天发表了一篇关于同一主题的博文:hhogdev.com/blog/2016/january/…
  • 如果他们昨天这样做,他们会为我节省一天的时间:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-02-20
  • 1970-01-01
相关资源
最近更新 更多