VS2010 crashes intermittently with System.ArgumentException: value does not fall within expected range
The following error appears in Activity Monitor Log.xml file
System.ArgumentException: The value is not in the expected range. at Microsoft.VisualStudio.Web.CSS.ICSSLineTokenizer.TokenizeLine (ICSSTokenFactory factory, Int32 lLine) at Microsoft.VisualStudio.Web.CSS.Implementation.CSSColorizer.Microsoft.VisualStudio.Text.Classification.IClassifier.GetClassificationSpp VisualStudio.Text.Classification.Implementation.ClassifierTagger.d_0.MoveNext () in Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.d_16.MoveNext ()
In the source column, it says "Editor or Editor Extension"
This does not happen every time, but on average once a day. If I reboot it everything is fine. This happens in any part of the code, be it a css file or cs or aspx file. Can anyone please help?
As a consequence, I got the Resharper error below in the Activity Monitor XML file.
Unable to load one or more of the requested types. Get the LoaderExceptions property for more information. C: \ Program Files \ JetBrains \ ReSharper \ v7.0 \ Bin \ JetBrains.Platform.ReSharper.VisualStudio.v11.dll
and
Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop.11.0, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C: \ Program Files \ JetBrains \ ReSharper \ v7.0 \ Bin \ JetBrains.Platform.ReSharper.VisualStudio.v11.dll
Guys, I'm not an expert programmer, just a beginner and newbie at StackOverFlow. So please forgive me if I am posting to the wrong place or website. If anyone can be kind enough to state this. \ Thanks.
source to share
The ArgumentException is not your fault; which indicates a bug in Visual Studio or whatever extension you added. Make sure you have installed the service pack and all updates.
The JetBrains issue implies that you have a version of ReSharper that supports Visual Studio 2012 installed. If Resharper works for you, I would venture to assume such an exception is normal during startup if you are using an older version of VS than the highest version maintained by Resharper.
source to share