yysun/Git-Source-Control-Provider

Exception when viewing object from SQL Server Object Explorer

RandScullard opened this issue · 0 comments

In Visual Studio 2012, in the SQL Server Object Explorer window, I right-clicked a table constraint and chose the View Code command. The following exception occurred:

System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetDirectoryName(String path)
   at GitScc.Diff.DiffUpdateBackgroundParser..ctor(ITextBuffer textBuffer, ITextBuffer documentBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IGitCommands commands)
   at GitScc.Diff.ViewModel.DiffMarginViewModel..ctor(DiffMargin margin, IWpfTextView textView, ITextDocumentFactoryService textDocumentFactoryService, IGitCommands gitCommands)
   at GitScc.Diff.DiffMargin..ctor(IWpfTextView textView, DiffMarginFactory factory)
   at GitScc.Diff.DiffMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin)
   at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__2(IWpfTextViewMarginProvider mp)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)

Since a SQL object doesn't have a path in the usual sense, I can see why NormalizePath wouldn't like it.