Coding笔记

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

今天使用Visual Studio 2010,在停止使用Visual Assist X扩展的时候,发现VS报错。具体错误不明,只是说可能是由某个扩展导致。如下图

依照错误提示的地址,却发现“C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\10.0”目录下并没有需要找的ActivityLog.xml文件。。。。

再看提示,明白了。运行的参数不对。

运行——CMD,进入命令行。

执行cd "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE",进入Visual Studio 2010的目录。

在执行devenv.exe /log。该命令会运行VS。

再进入C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\10.0目录,发现有ActivityLog.xml了。打开一看,部分内容如下:

  <entry>
    <record>720</record>
    <time>2012/04/27 08:50:09.316</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function VBDispatch::GetTypeLib</description>
  </entry>
  <entry>
    <record>721</record>
    <time>2012/04/27 08:50:09.319</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Leaving function VBDispatch::GetTypeLib</description>
    <guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</guid>
  </entry>
  <entry>
    <record>722</record>
    <time>2012/04/27 08:50:09.768</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ArgumentOutOfRangeException: &#x6307;&#x5B9A;&#x7684;&#x53C2;&#x6570;&#x5DF2;&#x8D85;&#x51FA;&#x6709;&#x6548;&#x503C;&#x7684;&#x8303;&#x56F4;&#x3002;&#x000D;&#x000A;&#x53C2;&#x6570;&#x540D;: end&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.SnapshotSpan..ctor(SnapshotPoint start, SnapshotPoint end)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLine.get_ExtentAsMappingSpan()&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.AdornmentLibrary.Squiggles.Implementation.SquiggleVisualManager.GetNormalizedSquiggleSpanCollections(ITextViewLine line)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.AdornmentLibrary.Squiggles.Implementation.SquiggleVisualManager.UpdateVisualsOn(IEnumerable`1 lines, Boolean removeOldSquiggles)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.AdornmentLibrary.Squiggles.Implementation.SquiggleVisualManager.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>
  <entry>
    <record>723</record>
    <time>2012/04/27 08:50:09.841</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ArgumentOutOfRangeException: &#x6307;&#x5B9A;&#x7684;&#x53C2;&#x6570;&#x5DF2;&#x8D85;&#x51FA;&#x6709;&#x6548;&#x503C;&#x7684;&#x8303;&#x56F4;&#x3002;&#x000D;&#x000A;&#x53C2;&#x6570;&#x540D;: length&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Span..ctor(Int32 start, Int32 length)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLine.get_Extent()&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMargin.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e)&#x000D;&#x000A;   &#x5728; Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description>
  </entry>

从以上内容可看出,错误的关键在这里:

<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.ArgumentOutOfRangeException: .....</description>

从错误描述来看,是参数超出有效值的范围的异常。

在出现异常之前,都是在VS中输入了半边冒号,然后输入了中文的标点符号。就报错了。

在网上找了一圈,很多人说是注册表的事,但是发现我的注册表没有问题。也就是不是这个问题。到目前,问题还是没解决,但是可以避开,就是输入中文符号之前先把冒号输全了。

有谁有解决方案可联系我。

posted on 2012-04-27 23:20  Coding笔记  阅读(1405)  评论(0编辑  收藏  举报