Open mph911 opened 8 years ago
I believe this is a failure in the editor extension, which augments the code editor with contract information such as adding preconditions and postconditions to method signature tooltips. Usually it results in an error message, which you can dismiss and carry on using VS although I've also experienced a few crashes in VS itself. The only workaround I know of is to disable or uninstall the extension via the Installed tab of the Extensions and Updates dialog. Disabling the editor extension will not affect the static checker or binary rewriter.
Code Contracts failed with the following Error Message:
AugmentQuickInfoSession failed System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs. Parametername: position bei Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) bei ContractAdornments.IntellisenseContractsHelper.GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, ITextSnapshot snapshot, SyntaxTree parseTree) bei ContractAdornments.QuickInfoSource.<>c__DisplayClass1.<AugmentQuickInfoSession>b__0() bei UtilitiesNamespace.Logger.PublicEntry(Action action, String entryName) 7:50.186 Code Contracts Editor Extensions 1.9.10714.2 14.0.25123.0 Visual Studio failed. 7:50.201 AugmentQuickInfoSession failed System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs. Parametername: position bei Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) bei ContractAdornments.IntellisenseContractsHelper.GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, ITextSnapshot snapshot, SyntaxTree parseTree) bei ContractAdornments.QuickInfoSource.<>c__DisplayClass1.<AugmentQuickInfoSession>b__0() bei UtilitiesNamespace.Logger.PublicEntry(Action action, String entryName) 7:56.679 Code Contracts Editor Extensions 1.9.10714.2 14.0.25123.0 Visual Studio failed. 7:56.679 AugmentQuickInfoSession failed System.ArgumentOutOfRangeException: Das angegebene Argument liegt außerhalb des gültigen Wertebereichs. Parametername: position bei Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) bei ContractAdornments.IntellisenseContractsHelper.GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, ITextSnapshot snapshot, SyntaxTree parseTree) bei ContractAdornments.QuickInfoSource.<>c__DisplayClass1.<AugmentQuickInfoSession>b__0() bei UtilitiesNamespace.Logger.PublicEntry(Action action, String entryName) 7:56.679 Code Contracts Editor Extensions 1.9.10714.2 14.0.25123.0 Visual Studio failed. 7:56.679
I am not sure if Code Contracts is somehoe hampered due to this failure.
Hope to get a hint how to prevent!
Cheers, Peter