omsharp / BetterComments

A Visual Studio extension for better comments.
Other
70 stars 27 forks source link

Getting an error in Razor views #16

Closed fourpastmidnight closed 7 years ago

fourpastmidnight commented 7 years ago

Installed product versions

Description

When I opened a Razor view in my solution, I received a Visual Studio error dialog indicating something went wrong with an extension and to check the Activity Log. Here's a portion of the log:

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'TagAggregator'. at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GetTags(NormalizedSnapshotSpanCollection snapshotSpans) at BetterComments.CommentsTagging.CommentTagger.GetTags(NormalizedSnapshotSpanCollection spans) in C:\projects\bettercomments\BetterComments\CommentsTagging\CommentTagger.cs:line 56 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__38.MoveNext()

There are approximately 100 rows of this error recorded in the activity log.

Steps to recreate

  1. I opened a Razor view. In this case, however, this Razor view didn't even have any comments in it, C#, HTML or otherwise.

I must note, however, that even though I received the error upon activating a Razor view document, that it may not be that particular document that caused the error--especially in light of the fact that there are no comments in the activated view.

Current behavior

Please see the Activity Log snippet above.

Expected behavior

There should be no errors recorded in the Activity Log.

wiggydave10 commented 7 years ago

Can confirm I am receiving the same error under the same circumstances.

omsharp commented 7 years ago

Will look into it as soon as I get a chance.