Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Merge tool with .cshtml file crashes Visual Studio with RC1 tools #293

Closed
jeffpapp opened this issue Nov 20, 2015 · 78 comments
Closed

Merge tool with .cshtml file crashes Visual Studio with RC1 tools #293

jeffpapp opened this issue Nov 20, 2015 · 78 comments
Assignees

Comments

@jeffpapp
Copy link

If I use the merge tool in VS 2015 while trying to resolve conflicts from a Git merge it will fail on some .cshtml files. This didn't seem to happen before installing the newer RC 1 tools this week.

I'm seeing this error message in C:\Users\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml

  <entry>
    <record>562</record>
    <time>2015/11/20 23:37:50.833</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>
  </entry>

Here is the info from About VS in case that is helpful

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

Visual Basic 2015   00322-50050-03692-AA603
Microsoft Visual Basic 2015

Visual C# 2015   00322-50050-03692-AA603
Microsoft Visual C# 2015

Visual C++ 2015   00322-50050-03692-AA603
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC)   14.1.11116.0
ASP.NET and Web Tools 2015 (RC)

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1   14.0.11112.0
Azure App Service Tools v2.7.1

CodeMaid   v0.8.1
CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, PHP, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

Written by Steve Cadwallader, for more information visit http://www.codemaid.net/

Common Azure Tools   1.6
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure HDInsight HQL Service   2.0.2600.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.2600.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.7
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.7.30818.1601

NuGet Package Manager   3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50730.0
Microsoft SQL Server Data Tools

WakaTime   1.0


Web Analyzer   1.4.48
Provides static analysis directly in Visual Studio for JavaScript, TypeScript, JSX, CSS and more

Web Essentials 2015   0.5.197
Adds many useful features to Visual Studio for web developers.

@BillHiebert
Copy link

@ToddGrun

@slaneyrw
Copy link

I can confirm it's happening with me as well... same exception dump. I'm doing a conflict resolution using source from TFS.

To make matters worse, it's crashing VS2015 when it launches the comparer.

However, a critical issue is that I can no longer open ANY cshtml file, VS2015 pops a message box "Object reference not set to an instance of an object" or "The operation cannot be completed".

I can open them using another editor, like XML (Text) Editor. It appears the HTML Editor is causing the issue

@trichards57
Copy link

I'm also having problems with the merge tool and cshtml, though I don't get a crash, I just get "Failed to start the configured compare tool." The tool works with everything else in the project, and works on the file if I rename it to something that isn't .cshtml. The annotate tool also doesn't work, and that crashes Visual Studio.

@trichards57
Copy link

A little more information related to the HTML Editor crash:

The HTML Editor only seems to crash when there are Razor elements in code file. For example:

@model IEnumerable<SomeClass>

<div>This is some HTML content with Razor</div>

Causes a crash while:

<div>This is some HTML content without Razor</div>
<div>Some more content</div>

Does not.

@slaneyrw Does this match your experience?

@ToddGrun
Copy link

OK, I'm able to repro. Going to start taking a look into this.

@suddenelfilio
Copy link

same issue here. after vs.net 2015 update 1 update

@sayedihashimi
Copy link
Contributor

TFS: 168882
I've added this to our internal TFS, we will reply back here soon.

@ToddGrun
Copy link

ToddGrun commented Dec 1, 2015

Checked in a fix for this

@ToddGrun ToddGrun closed this as completed Dec 1, 2015
@suddenelfilio
Copy link

How can we get this fix?

@madskristensen
Copy link
Contributor

This issue has been fixed and checked in. It will be in the next release of the ASP.NET and Web Tools tooling update. We don't yet know if that will be RC2 or if there will be canary (weekly updates) builds released before that

@cirelli
Copy link

cirelli commented Dec 2, 2015

I need it working, urgently.
How to downgrade to the last version?

@ToddGrun
Copy link

ToddGrun commented Dec 2, 2015

Does setting Tools->Options->Text Editor->Html->Advanced->Extension Management->Identify Helpful Extensions to false work around the issue for you?

@cirelli
Copy link

cirelli commented Dec 2, 2015

Worked, thanks.

@santiagohdzb
Copy link

This is happening to me too, I'm using VS2015 Enterprise with Update 1 :S

ActivityLog.xml

  <entry>
    <record>843</record>
    <time>2015/12/03 15:53:40.472</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>
  </entry>

Visual Studio Info

Microsoft Visual Studio Enterprise 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA204
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA204
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA204
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA204
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ESN   00322-80000-00000-AA204
Windows Phone SDK 8.0 - ESN

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.11120.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1   14.0.11112.0
Azure App Service Tools v2.7.1

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50730.0
Microsoft SQL Server Data Tools

TypeScript   1.7.4.0
TypeScript for Microsoft Visual Studio

@AlexTo
Copy link

AlexTo commented Dec 4, 2015

Same problem with Visual Studio 2015 Update 1 RTM. When I click "Merge Changes in Tool", VS crashes and restart.

826 2015/12/04 01:55:59.728 Error Editor or Editor Extension System.ArgumentNullException: Value cannot be null. Parameter name: key at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at Microsoft.VisualStudio.Html.Package.Extensions.ExtensionsManager.OnTextViewCreated(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.VisualStudio.Html.Package.Commands.Html.VsHtmlTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.<>c__DisplayClass24_0.<OnTextViewConnected>b__0(Object sender, EventArgs eventArgs) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)

@QwerTech
Copy link

+1

1010 ERROR System.ArgumentNullException: Value cannot be null. Parameter name: key at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at Microsoft.VisualStudio.Html.Package.Extensions.ExtensionsManager.OnTextViewCreated(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.VisualStudio.Html.Package.Commands.Html.VsHtmlTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.<>c__DisplayClass24_0.b__0(Object sender, EventArgs eventArgs) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers) Editor or Editor Extension 2015/12/10 14:09:25.059

@EddieDL
Copy link

EddieDL commented Dec 16, 2015

+1

When can we expect a fix?

FYI - the workaround from @ToddGrun worked for me.

Does setting Tools->Options->Text Editor->Html->Advanced->Extension Management->Identify Helpful Extensions to false work around the issue for you?

@mike-compeat
Copy link

The workaround from @ToddGrun worked for me also.

@fuzzzerd
Copy link

While waiting for the updated tooling to drop; the fix @ToddGrun suggested worked for me as well.

@jonrandahl
Copy link

Phew! Thanks everyone, the fix suggested by @ToddGrun worked for me too!

@Poonaka
Copy link

Poonaka commented Jan 8, 2016

Thanks @ToddGrun 👍

@mittork
Copy link

mittork commented Jan 20, 2016

The workaround from @ToddGrun just works partially. I can open my .cshtml files again, but TFS compare still throws "Error occurred during difference operation: Cannot execute the configured tool.". When can we expect a fix?

@Zache
Copy link

Zache commented Jan 20, 2016

@ToddGrun is my hero!

@danuw
Copy link

danuw commented Jan 20, 2016

Workaround does not work for me either... Should that be working in combination to some other assumption pre-requisite please?
For it happens straight in the solution explorer when I try and open a .cshtml file with using statement inside...
Happened after I installed WebCompiler and uninstalling it and restarting the solution did not solve it...

@angeliquejw
Copy link

Ran into this issue when attempting to merge a conflict in VS. Thankfully, @ToddGrun's workaround has saved the day.

@Willjobs94
Copy link

It is also happening to me

@Willjobs94
Copy link

The @ToddGrun's workaround worked for me! Thanks @ToddGrun

@KJoergensen
Copy link

KJoergensen commented Apr 8, 2016

I have tried @ToddGrun's work-around, and it worked for a while. The bug seems to be back however. I still have @ToddGrun's suggestion on, but merging still crashes VS.

@vmandic
Copy link

vmandic commented Apr 12, 2016

Thanks @ToddGrun, saved me on VS2015 Update 1!

@aju31a
Copy link

aju31a commented Apr 12, 2016

This problem was even in VS2015 Update 2
but @ToddGrun's solution worked like a charm for me
Thanks Todd

@brentlyjdavid
Copy link

+1 for in VS 2015 Update 2, disabling the extensions tool, worked at least for this particular merge.

Please notify whoever owns the extension or just remove it all together. I've asked it to stop notifying me with the 'dont ask again' and that never works either.

Thanks for the workaround @ToddGrun.

have a good one.

@viewtance
Copy link

VS2015 version 14.0.25123.00 Update 2 also with this issue, but the method from @ToddGrun not working for me, is any other approach to fix?

@adam-dorin
Copy link

@ToddGrun 👍 thx man ! your workaround worked for me also/

@sfmskywalker
Copy link

@ToddGrun Dude you saved my evening. Cheers!

@RClendenon
Copy link

I am using Visual Studio 2015 Update 2 with Microsoft ASP.NET and Web Tools version 14.1.20203.0 on Windows 10 and this is still an issue. The workaround provided by @ToddGrun works for me.

@oising
Copy link

oising commented Apr 29, 2016

Running update 2 on vs2015, same crash, but thankfully the workaround works. I'm merging a regular .html file, not even a cshtml.

System.ArgumentNullException: Value cannot be null. Parameter name: key at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at Microsoft.VisualStudio.Html.Package.Extensions.ExtensionsManager.OnTextViewCreated(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.VisualStudio.Html.Package.Commands.Html.VsHtmlTextViewConnectionListener.OnTextViewGotAggregateFocus(ITextView textView, ITextBuffer textBuffer) at Microsoft.Web.Editor.Controller.TextViewConnectionListener.<>c__DisplayClass24_0.<OnTextViewConnected>b__0(Object sender, EventArgs eventArgs) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)

@vcsjones
Copy link

vcsjones commented May 2, 2016

Echoing what @oising said - same exception, same work around works. Running a Fully up-to-date VS2015 with Update 2.

Given that this issue is already closed, can we re-open it or create a new issue for tracking purposes?

@oising
Copy link

oising commented May 2, 2016

@vcsjones @madskristensen Agreed. I don't know why this is closed. It's not fixed in update 2.

@tomexou
Copy link

tomexou commented May 6, 2016

Change the value from true to false as below:
image

After set false, VS2015 update 2 will not be crashed on opening *.chtml files any more.

@oising
Copy link

oising commented May 10, 2016

If they can't fix this issue after two point releases, I suggest they take the easier route and update the text from "Identify Helpful Extensions" to "Crash when merging files", and default it to False.

;-)

On a more serious note, @madskristensen -- why is this closed? The issue is still trivially reproducible in update 2.

@tsfinley
Copy link

@tomexou Your solution worked for me. Thank you for posting it.

@alanmcbee-fsl
Copy link

@tomexou @ToddGrun The workaround solved a problem trying to resolve a markdown (.md) merge conflict in VS2015 update 2. Looking forward to a permanent fix...

@baxterworks
Copy link

Ping - any chance of reopening this?

@madskristensen
Copy link
Contributor

The fix for this issue was released in the new ASP.NET Core RC2 tooling

@gordonglas
Copy link

Just ran into this issue and installing ASP.NET Core RC2 tooling for visual studio 2015 fixed it for me. I'm no longer getting an error that crashes visual studio when opening the merge tool. Thanks @madskristensen

@MarcAir
Copy link

MarcAir commented May 18, 2016

ping any update on correction?

@madskristensen
Copy link
Contributor

@MarcusPozzan It's fixed in the .NET Core Tooling Preview 1 for Visual Studio 2015

@flaviodamaiajr
Copy link

Thanks @ToddGrun ! It worked!

@falconmick
Copy link

how is this still a problem...

@improwise
Copy link

improwise commented Aug 19, 2016

This just confirm my impression that VS2015 is probably the biggest piece of crap software I've ever used. VS 2015 is by far the worst version so far and each update only seem to make it even worse. And I've been using it since 1997 so I have lots of Visual Studio versions to compare it with. We are seriously considering giving up on .NET all together as there as just so many problems these days :(

And why is this case closed when the problem is obviously still there??

@brentlyjdavid
Copy link

@improwise I'm not sure it's that bad. These guys do an amazing job with a product that has been through so many different iterations. It's practically impossible to have something completely bug free. Users will be users. We use .net all the time and don't have 'so many problems these days' However, you are always more than welcome to create your own product, plus, there's always notepad++.
that NEVER crashes.

Happy Coding

@improwise
Copy link

improwise commented Aug 20, 2016

@brentdavid2008 Main problem is that it seems to get worse with every attempt to fix something. The Update packages seem to cause as many problems as they fix. Merge crashing, save buttons not working, frequent crashes, memory consumption increasing, lots of freezes and delays and so on. Even copy & paste does not working sometimes! Even my colleagues that has always praised Visual Studio as the best IDE (I used to be one of them) have now kind of given up on VS2015 and many has gone back to Visual Studio 2013 just to get some real work done and not just trying to figure out workaround to IDE problems constantly. I really hope MS gets their act together here...

And I completely agree on Notepad++, had VS2015 been anything close to that, I would be very very happy :)

@residentx10
Copy link

Get the community edition not the RC...jeez. RC is a release candidate.
Your wrong for even posting this issue :-)

On Sat, Aug 20, 2016 at 12:42 PM, improwise notifications@github.com
wrote:

@brentdavid2008 https://github.com/brentdavid2008 Main problem is that
it seems to get worse with every attempt to fix something. The Update
packages seem to cause as many problems as they fix. Merge crashing, save
buttons not working, even copy & paste not working sometimes. Even my
colleagues that has always praised Visual Studio as the best IDE (I used to
be one of them) have now kind of given up on VS2015 and many has gone back
to Visual Studio 2013 just to get some real work done and not just trying
to figure out workaround to IDE problems constantly. I really hope MS gets
their act together here...

And I completely agree on Notepad++, had VS2015 been anything close to
that, I would be very very happy :)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#293 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AI2CpONv5SQsWj5Gg0dANnFKglew_Hveks5qhy5qgaJpZM4GmyhV
.

@improwise
Copy link

Not sure who you are referring to, if it is me I run Visual Studio Update 3 Patch 1 but was lead hear as I was googling to try to to solve one of the many problems with VS2015.

@adeoluwagbemiga
Copy link

adeoluwagbemiga commented Sep 25, 2016

This suggestion from @ToddGrun worked for me:

Tools->Options->Text Editor->Html->Advanced->Extension Management->Identify Helpful Extensions to false is a work around the issue.
Thanks @ToddGrun

@voyager18
Copy link

The issue is still present in Visual Studio 2015 Update 3. The solution offered by @ToddGrun is already valid and it has worked for me.

@lrazak
Copy link

lrazak commented Nov 16, 2016

I still got this bug in Visual Studio 2015 Professional Update 3. I installed.NET Core 1.0.1 - VS 2015 Tooling Preview 2 and this fixed the issue for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests