繁体   English   中英

在Visual Studio Professional 2015中使用团队资源管理器上的合并按钮的异常

[英]Exception using Merge Button on Team Explorer in Visual Studio Professional 2015

当我在Visual Studio Professional 2015中单击团队资源管理器中的合并按钮时,我收到异常。

An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file C:\Users\XXXX\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.

ActivityLog.xml的内容如下:

<record>775</record>
<time>2016/02/23 11:22:08.722</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>
    System.ArgumentNullException: Value cannot be null.&#x000D;&#x000A;Parameter name: key&#x000D;&#x000A;
    at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)&#x000D;&#x000A;
    at Microsoft.VisualStudio.Html.Package.Extensions.ExtensionsManager.OnTextViewCreated(ITextView textView, ITextBuffer textBuffer)&#x000D;&#x000A;
    at Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer)&#x000D;&#x000A;
    at Microsoft.VisualStudio.Html.Package.Commands.Html.VsHtmlTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer)&#x000D;&#x000A;
    at Microsoft.Web.Editor.Controller.TextViewConnectionListener.&lt;&gt;c__DisplayClass24_0.&lt;OnTextViewConnected&gt;b__0(Object sender, EventArgs eventArgs)&#x000D;&#x000A;
    at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
</description>

我们也遇到了这个问题。 具体来说,我们注意到VS 2015 Update 1我们无法手动合并“.JSX”文件中的冲突。 使用以下线程作为灵感: https//github.com/aspnet/Tooling/issues/293我们现在执行以下操作来解决此问题。 下面的示例适用于JSX文件,但这适用于任何基于文本的文件,只需修改文件类型的说明即可。

1)在HTML编辑器中指向.JSX文件:

  • 工具
  • 选项
  • 文本编辑器
  • 文件扩展名
  • 将jsx添加到列表中,映射到编辑器“HTML Editor”

2)禁用HTML编辑器的“识别有用扩展”:

  • 工具
  • 选项
  • 文本编辑器
  • HTML
  • 高级
  • “扩展管理” - >“识别有用的扩展” - >错误

那应该解决这个问题。 解决方法是我们欺骗VS而不寻找.JSX文件的有用扩展。 我已向MS提交了VS错误报告。

我对底层问题的猜测是,VS正在为“jsx”寻找有用的扩展,或者找不到任何有用扩展的其他文件。 结果是null ref / object未设置为实例异常。

更新::根据Mads on GitHub ,该问题已作为Visual Studio 2015.NET核心工具预览1的一部分得到修复。 感谢Burak_Karakuş的评论!

更新2 ::我已经看到这种解决办法不起作用的情况。 在那种情况下,将扩展名映射到“带编码的源代码(文本)编辑器”解决了崩溃问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM