Skip to content

Instantly share code, notes, and snippets.

@punker76
Created October 7, 2016 14:50
Show Gist options
  • Save punker76/62271a1205cceeef27253fac7678cb42 to your computer and use it in GitHub Desktop.
Save punker76/62271a1205cceeef27253fac7678cb42 to your computer and use it in GitHub Desktop.
Opening a Xaml File in a shared Project
Intellisense could not be initialized due to the following error: System.ArgumentException: Empty path name is not legal.
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFileGuts(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize)
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.OpenFile(String filePath, DateTime& lastModifiedTimeUtc, Int64& fileSize)
at Microsoft.VisualStudio.Text.Implementation.TextDocumentFactoryService.CreateAndLoadTextDocument(String filePath, IContentType contentType, Boolean attemptUtf8Detection, Boolean& characterSubstitutionsOccurred)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.InitializeNewTextBufferFromFile(String fileName, Object source)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.Load(String pszFilename, UInt32 grfMode, Int32 fReadOnly, Object source)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.Load(String pszFilename, UInt32 grfMode, Int32 fReadOnly)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.LoadDocData(String pszMkDocument)
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostTextBufferService.<>c__DisplayClass38_0.<Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.IHostTextBufferProvider.GetTextBuffer>b__0()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass48_0`1.<MarshalIn>b__0()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvoke(Boolean inbound, Action action, Int32 sourceApartmentId, Int32 targetApartmentId, Int32 originId, WaitHandle aborted)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvokeInbound(Action action, Int32 targetApartmentId)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostTextBufferService.Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.IHostTextBufferProvider.GetTextBuffer(IHostSourceItem item)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationContextHost..ctor(IServiceProvider serviceProvider, IHostSourceItem sourceItem, ITypeResolver typeResolver)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext& fileContext)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.CreateSource(IVsTextLines textLines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment