Skip to content

Exception when viewing object from SQL Server Object Explorer #115

Open
@RandScullard

Description

@RandScullard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions