madskristensen / WebEssentials2013

Visual Studio extension
http://vswebessentials.com
Other
944 stars 251 forks source link

System.ArgumentException: "Requested value 'Messages' was not found" on solution load #1271

Closed ashclarke closed 10 years ago

ashclarke commented 10 years ago

Hi guys,

Today a couple of us at work had a nasty encounter with an exception that caused the Web Essentials menu bar to fail to load.

For me, it was causing Visual Studio to crash completely when the project loaded. It successfully loaded, however, when I uninstalled WE.

When it crashed I was able to debug the instance and it said the error originated from MSCorLib.dll.

A colleague of mine managed to get the ActivityLog.xml from the VS 12.0 Roaming folder.

From the ActivityLog.xml:

System.ArgumentException: Requested value 'Messages' was not found. at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) at ConfOxide.MemberAccess.ScalarType`1.<.cctor>b__0(JToken jv) at ConfOxide.MemberAccess.ValuePropertyAccessor`2.FromJson(TOwner instance, JToken token) at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json) at ConfOxide.MemberAccess.NestedPropertyAccessor`2.FromJson(TOwner instance, JToken token) at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json) at ConfOxide.SettingsFileExtensions.ReadJsonFile[T](T target, String jsonPath) at MadsKristensen.EditorExtensions.Settings.SettingsStore.Load() at MadsKristensen.EditorExtensions.Settings.ProjectSettingsTextViewListener.document_FileActionOccurred(Object sender, TextDocumentFileActionEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

Both running Windows 8.1, VS 2013 Update 2 & WE 2.2. I also tried with nightly 2.2.3, but encountered the same problem.

ashclarke commented 10 years ago

I worked out that this was a solution settings issue. I posted the issue anyway for reference for anyone facing a similar issue, because I spent a day figuring it out (uninstalling, reinstalling, devenv /setup, devenv /resetuserdata, repair vs 2013, etc. etc).

Our faulting webessentials-settings.json file looked like the following:

{
  "BrowserLink": {
    "CssIgnorePatterns": "bootstrap*; reset.css; normalize.css; jquery*; toastr*; foundation*; animate*; inuit*; elements*; ratchet*; hint*; flat-ui*; 960*; skeleton*",
    "EnableMenu": true,
    "EnablePixelPushing": true,
    "ShowMenu": false
  },
  "CodeGen": {
    "CamelCasePropertyNames": true,
    "CamelCaseTypeNames": false,
    "AddTypeScriptReferencePath": true,
    "CamelCaseEnumerationValues": false
  },
  "CoffeeScript": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "LintOnBuild": false,
    "LintOnSave": true,
    "LintResultLocation": "Message",
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "WrapClosure": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Css": {
    "AdjustRelativePaths": true,
    "AutoMinify": false,
    "GzipMinifiedFiles": false,
    "ShowBrowserTooltip": true,
    "ShowInitialInherit": false,
    "ShowUnsupported": true,
    "SyncVendorValues": true,
    "ValidateEmbedImages": false,
    "ValidateOverQualifiedSelector": true,
    "ValidateStarSelector": true,
    "ValidateVendorSpecifics": true,
    "ValidateZeroUnit": true,
    "ValidationLocation": "Messages",
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true,
    "SyncBase64ImageValues": true,
    "Autoprefix": false,
    "AutoprefixerBrowsers": null
  },
  "General": {
    "AllMessagesToOutputWindow": true,
    "KeepImportantComments": true,
    "SvgPreviewPane": true
  },
  "Html": {
    "AutoMinify": false,
    "EnableAngularValidation": true,
    "EnableEnterFormat": false,
    "GzipMinifiedFiles": false,
    "ImageDropFormats": [
      {
        "HtmlFormat": "<img src=\"{0}\" alt=\"\" />",
        "Name": "Simple Image Tag"
      },
      {
        "HtmlFormat": "<div><img src=\"{0}\" alt=\"\" /></div>",
        "Name": "Enclosed in Div"
      },
      {
        "HtmlFormat": "<li id=\"item_{1}\"><img src=\"{0}\" alt=\"\" /></li>",
        "Name": "Enclosed as List Item"
      },
      {
        "HtmlFormat": "<div style=\"background-image=url('{0}')\"></div>",
        "Name": "Inline CSS"
      }
    ],
    "EnableBootstrapValidation": true,
    "EnableFoundationValidation": true,
    "MakeMinified": false,
    "OutputDirectory": null,
    "RunOnBuild": false
  },
  "JavaScript": {
    "AutoMinify": true,
    "BlockCommentCompletion": true,
    "GenerateSourceMaps": false,
    "GzipMinifiedFiles": false,
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Messages",
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true
  },
  "Less": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Markdown": {
    "AutoHyperlink": false,
    "AutoNewLines": false,
    "CompileOnBuild": false,
    "CompileOnSave": false,
    "EncodeProblemUrlCharacters": false,
    "GenerateXHTML": true,
    "LinkEmails": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictBoldItalic": false
  },
  "Sass": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true
  },
  "SweetJs": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "TypeScript": {
    "BraceCompletion": true,
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Error",
    "ShowPreviewPane": true
  },
  "LiveScript": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "WrapClosure": true,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Scss": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": false,
    "OutputStyle": "Expanded"
  },
  "Sprite": {
    "CssOutputDirectory": null,
    "IsVertical": true,
    "LessOutputDirectory": null,
    "Optimize": true,
    "RunOnBuild": false,
    "ScssOutputDirectory": null,
    "UseAbsoluteUrl": false,
    "UseFullPathForIdentifierName": true
  }
}

Something here must have changed recently and caused it to break.

ashclarke commented 10 years ago

Ok, I thought that regenerating had solved this, but about 5 minutes ago I had to reopen VS and it crashed again.

Renaming the re-generated WebEssentials-Settings.json solution item to WebEssentials-Settings.jsonno prevented the crash. The activity log xml file did not get updated this time (probably due to the crash) so I'm not able to get any info from that.

When I debug with a new instance of VS 2013, it had broken at the following exception, which is similar to the message in the first comment of this issue:

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: Requested value 'Messages' was not found.

Contents of generated settings json:

{
  "BrowserLink": {
    "CssIgnorePatterns": "bootstrap*; reset.css; normalize.css; jquery*; toastr*; foundation*; animate*; inuit*; elements*; ratchet*; hint*; flat-ui*; 960*; skeleton*",
    "EnableMenu": true,
    "EnablePixelPushing": true,
    "ShowMenu": false
  },
  "CodeGen": {
    "AddTypeScriptReferencePath": true,
    "CamelCaseEnumerationValues": false,
    "CamelCasePropertyNames": true,
    "CamelCaseTypeNames": false
  },
  "CoffeeScript": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "LintOnBuild": false,
    "LintOnSave": true,
    "LintResultLocation": "Message",
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ProcessSourceMapsForEditorEnhancements": true,
    "ShowPreviewPane": true,
    "WrapClosure": true
  },
  "Css": {
    "AdjustRelativePaths": true,
    "AutoMinify": false,
    "Autoprefix": false,
    "AutoprefixerBrowsers": null,
    "GzipMinifiedFiles": false,
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true,
    "ShowBrowserTooltip": true,
    "ShowInitialInherit": false,
    "ShowUnsupported": true,
    "SyncBase64ImageValues": true,
    "SyncVendorValues": true,
    "ValidateEmbedImages": false,
    "ValidateStarSelector": true,
    "ValidateVendorSpecifics": true,
    "ValidateZeroUnit": true,
    "ValidationLocation": "Messages"
  },
  "General": {
    "AllMessagesToOutputWindow": false,
    "KeepImportantComments": true,
    "SvgPreviewPane": true
  },
  "Html": {
    "AutoMinify": false,
    "EnableAngularValidation": true,
    "EnableBootstrapValidation": false,
    "EnableEnterFormat": false,
    "EnableFoundationValidation": false,
    "GzipMinifiedFiles": false,
    "ImageDropFormats": [
      {
        "HtmlFormat": "<img src=\"{0}\" alt=\"\" />",
        "Name": "Simple Image Tag"
      },
      {
        "HtmlFormat": "<div><img src=\"{0}\" alt=\"\" /></div>",
        "Name": "Enclosed in Div"
      },
      {
        "HtmlFormat": "<li id=\"item_{1}\"><img src=\"{0}\" alt=\"\" /></li>",
        "Name": "Enclosed as List Item"
      },
      {
        "HtmlFormat": "<div style=\"background-image=url('{0}')\"></div>",
        "Name": "Inline CSS"
      }
    ],
    "MakeMinified": false,
    "OutputDirectory": null,
    "RunOnBuild": false
  },
  "JavaScript": {
    "AutoMinify": true,
    "BlockCommentCompletion": true,
    "GenerateSourceMaps": false,
    "GzipMinifiedFiles": false,
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Messages",
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true
  },
  "Less": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ProcessSourceMapsForEditorEnhancements": true,
    "ShowPreviewPane": true,
    "StrictMath": false
  },
  "LiveScript": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ProcessSourceMapsForEditorEnhancements": true,
    "ShowPreviewPane": true,
    "WrapClosure": true
  },
  "Markdown": {
    "AutoHyperlink": false,
    "AutoNewLines": false,
    "CompileOnBuild": false,
    "CompileOnSave": false,
    "EncodeProblemUrlCharacters": false,
    "GenerateXHTML": true,
    "LinkEmails": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictBoldItalic": false
  },
  "Scss": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "OutputStyle": "Expanded",
    "ProcessSourceMapsForEditorEnhancements": false,
    "ShowPreviewPane": true
  },
  "Sprite": {
    "CssOutputDirectory": null,
    "IsVertical": true,
    "LessOutputDirectory": null,
    "Optimize": true,
    "RunOnBuild": false,
    "ScssOutputDirectory": null,
    "UseAbsoluteUrl": false,
    "UseFullPathForIdentifierName": true
  },
  "SweetJs": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ProcessSourceMapsForEditorEnhancements": true,
    "ShowPreviewPane": true
  },
  "TypeScript": {
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Error",
    "ShowPreviewPane": true
  }
}

Using: WE 2.2

ashclarke commented 10 years ago

As it feels like all I've done here recently is report bugs, I'm just going to side note this to throw in some thanks and say that I thoroughly appreciate the work that you guys have put into this extension! Used it for years and don't know what we would have done without it.

am11 commented 10 years ago

@madskristensen, will we be able to download v2.2.4 today? Please update vswebessentials feed. Thanks.

@ashclarke, I can't parse the issue right away from the description, but I would say v2.2.4 has some fixes, so please do test with that once the new nightly is released. I think, perhaps, @SLaks would be able to suggest a permanent fix.

On that note, if you can debug and grab the stack trace, it would be useful. To do that, open a second instance of VS, Debug > Attach to Process and select your instance of devenv.exe. Then open your solution. You would be able to grab the stack trace.

ashclarke commented 10 years ago

Not on 2.2.4 yet, but here's the huge debug output from the output window & stack.

System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>DefaultDomain</AppDomain><Exception><ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Requested value 'Messages' was not found.</Message><StackTrace>   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult&amp;amp; parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at ConfOxide.MemberAccess.ScalarType`1.&amp;lt;.cctor&amp;gt;b__0(JToken jv)
   at ConfOxide.MemberAccess.ValuePropertyAccessor`2.FromJson(TOwner instance, JToken token)
   at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json)
   at ConfOxide.MemberAccess.NestedPropertyAccessor`2.FromJson(TOwner instance, JToken token)
   at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json)
   at ConfOxide.SettingsFileExtensions.ReadJsonFile[T](T target, String jsonPath)
   at MadsKristensen.EditorExtensions.Settings.SettingsStore.Load()
   at MadsKristensen.EditorExtensions.EditorExtensionsPackage.&amp;lt;Initialize&amp;gt;d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&amp;lt;ThrowAsync&amp;gt;b__4(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)</StackTrace><ExceptionString>System.ArgumentException: Requested value 'Messages' was not found.
   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult&amp;amp; parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at ConfOxide.MemberAccess.ScalarType`1.&amp;lt;.cctor&amp;gt;b__0(JToken jv)
   at ConfOxide.MemberAccess.ValuePropertyAccessor`2.FromJson(TOwner instance, JToken token)
   at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json)
   at ConfOxide.MemberAccess.NestedPropertyAccessor`2.FromJson(TOwner instance, JToken token)
   at ConfOxide.SettingsExtensions.ReadJson[T](T target, JObject json)
   at ConfOxide.SettingsFileExtensions.ReadJsonFile[T](T target, String jsonPath)
   at MadsKristensen.EditorExtensions.Settings.SettingsStore.Load()
   at MadsKristensen.EditorExtensions.EditorExtensionsPackage.&amp;lt;Initialize&amp;gt;d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&amp;lt;ThrowAsync&amp;gt;b__4(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)</ExceptionString><DataItems><Data></Data></DataItems></Exception></TraceRecord>
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: Requested value 'Messages' was not found.

and the stack:

    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ThrowAsync.AnonymousMethod__4(object state) Unknown
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate method, object args, int numArgs, System.Delegate catchHandler = null)  Unknown
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()   Unknown
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)  Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()   Unknown
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()  Unknown
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)  Unknown
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = 263308, int msg = 49820, System.IntPtr wParam = 0, System.IntPtr lParam = 0, ref bool handled = false)    Unknown
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown
    WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate method, object args, int numArgs, System.Delegate catchHandler = null)  Unknown
    WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)   Unknown
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = 263308, int msg = 49820, System.IntPtr wParam = 0, System.IntPtr lParam = 0) Unknown
    [Native to Managed Transition]  
>   user32.dll!__InternalCallWinProc@20()  Unknown
    user32.dll!UserCallWinProcCheckWow()    Unknown
    user32.dll!DispatchMessageWorker()  Unknown
    user32.dll!_DispatchMessageW@4()   Unknown
    msenv.dll!52676dd8()    Unknown
    [Frames below may be incorrect and/or missing, no symbols loaded for msenv.dll] 
    msenv.dll!52676c7c()    Unknown
    msenv.dll!5269996f()    Unknown
    msenv.dll!5269989f()    Unknown
    msenv.dll!526997fe()    Unknown
    msenv.dll!526997c5()    Unknown
    msenv.dll!52699706()    Unknown
    msenv.dll!5260c629()    Unknown
    devenv.exe!2f3f0736()   Unknown
    devenv.exe!2f3f10b3()   Unknown
    ntdll.dll!7755d75c()    Unknown
    ntdll.dll!77541490()    Unknown
    devenv.exe!2f3fbd33()   Unknown
    devenv.exe!2f3f9091()   Unknown
    kernel32.dll!7711919f() Unknown
    ntdll.dll!7756a8cb()    Unknown
    ntdll.dll!7756a8a1()    Unknown
ashclarke commented 10 years ago

Just found that the settings file was updated recently, so I reverted it to an earlier version that worked (it was working the day before and that morning).

Here's the file that seems to work:

{
  "BrowserLink": {
    "CssIgnorePatterns": "bootstrap*; reset.css; normalize.css; jquery*; toastr*; foundation*; animate*; inuit*; elements*; ratchet*; hint*; flat-ui*; 960*; skeleton*",
    "EnableMenu": true,
    "EnablePixelPushing": true,
    "ShowMenu": false
  },
  "CodeGen": {
    "CamelCasePropertyNames": true,
    "CamelCaseTypeNames": false,
    "AddTypeScriptReferencePath": true,
    "CamelCaseEnumerationValues": false
  },
  "CoffeeScript": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "LintOnBuild": false,
    "LintOnSave": true,
    "LintResultLocation": "Message",
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "WrapClosure": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Css": {
    "AdjustRelativePaths": true,
    "AutoMinify": false,
    "GzipMinifiedFiles": false,
    "ShowBrowserTooltip": true,
    "ShowInitialInherit": false,
    "ShowUnsupported": true,
    "SyncVendorValues": true,
    "ValidateEmbedImages": false,
    "ValidateOverQualifiedSelector": true,
    "ValidateStarSelector": true,
    "ValidateVendorSpecifics": true,
    "ValidateZeroUnit": true,
    "ValidationLocation": "Messages",
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true,
    "SyncBase64ImageValues": true
  },
  "General": {
    "AllMessagesToOutputWindow": false,
    "KeepImportantComments": true,
    "SvgPreviewPane": true
  },
  "Html": {
    "AutoMinify": false,
    "EnableAngularValidation": true,
    "EnableEnterFormat": false,
    "GzipMinifiedFiles": false,
    "ImageDropFormats": [
      {
        "HtmlFormat": "<img src=\"{0}\" alt=\"\" />",
        "Name": "Simple Image Tag"
      },
      {
        "HtmlFormat": "<div><img src=\"{0}\" alt=\"\" /></div>",
        "Name": "Enclosed in Div"
      },
      {
        "HtmlFormat": "<li id=\"item_{1}\"><img src=\"{0}\" alt=\"\" /></li>",
        "Name": "Enclosed as List Item"
      },
      {
        "HtmlFormat": "<div style=\"background-image=url('{0}')\"></div>",
        "Name": "Inline CSS"
      }
    ],
    "EnableBootstrapValidation": true,
    "EnableFoundationValidation": true,
    "MakeMinified": false,
    "OutputDirectory": null,
    "RunOnBuild": false
  },
  "JavaScript": {
    "AutoMinify": true,
    "BlockCommentCompletion": true,
    "GenerateSourceMaps": false,
    "GzipMinifiedFiles": false,
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Error",
    "MakeMinified": true,
    "OutputDirectory": null,
    "RunOnBuild": true
  },
  "Less": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Markdown": {
    "AutoHyperlink": false,
    "AutoNewLines": false,
    "CompileOnBuild": false,
    "CompileOnSave": false,
    "EncodeProblemUrlCharacters": false,
    "GenerateXHTML": true,
    "LinkEmails": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictBoldItalic": false
  },
  "Sass": {
    "CompileOnBuild": true,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true
  },
  "SweetJs": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "TypeScript": {
    "BraceCompletion": true,
    "LintOnBuild": true,
    "LintOnSave": true,
    "LintResultLocation": "Error",
    "ShowPreviewPane": true
  },
  "LiveScript": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "GenerateSourceMaps": true,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "WrapClosure": true,
    "ProcessSourceMapsForEditorEnhancements": true
  },
  "Scss": {
    "CompileOnBuild": false,
    "CompileOnSave": true,
    "EnableChainCompilation": true,
    "GenerateSourceMaps": false,
    "MinifyInPlace": false,
    "OutputDirectory": null,
    "ShowPreviewPane": true,
    "StrictMath": false,
    "ProcessSourceMapsForEditorEnhancements": false
  },
  "Sprite": {
    "CssOutputDirectory": null,
    "IsVertical": true,
    "LessOutputDirectory": null,
    "Optimize": true,
    "RunOnBuild": false,
    "ScssOutputDirectory": null,
    "UseAbsoluteUrl": false,
    "UseFullPathForIdentifierName": true
  }
}
ashclarke commented 10 years ago

Just a shot in the dark, @am11, @madskristensen, but could the error be coming from the value for a Location property. The ArgumentException mentioned Messages. Perhaps one of the properties, such as ValidationLocation, LintResultLocation, etc. doesn't like "Messages" as a value.

I'd recommend checking out the Javascript LintResultLocation as a starting point - it was changed in one of our recent commits.

ashclarke commented 10 years ago

@am11 @madskristensen

This is quite easily reproducible for us now:

Tested in nightly 2.2.4.

Thanks guys.

am11 commented 10 years ago

Change "LintResultLocation" from "Error" to "Messages".

It should be Message without s.

am11 commented 10 years ago

@SLaks, btw, this should have singular names, in order to make it consistent with Microsoft.VisualStudio.Shell.TaskErrorCategory which we used alot:

namespace Microsoft.VisualStudio.Shell
{
    public enum TaskErrorCategory
    {
        Error = 0,
        Warning = 1,
        Message = 2,
    }
}

I think that was causing this confusion.

Also, if we make this (architectural) change at this point, it will break the existing configurations. Any way to make settings upgradable without breakage?

ashclarke commented 10 years ago

It should be Message without s.

Ah, right. I think someone got their fingers dirty in the JSON file and it must have been edited manually. I double checked the dropdown and it does indeed set the option to Message!