locked
"Document failed to open"

    Question

  • I'm getting this error in just one of my projects.  Others are fine.  When trying to open a XAML file in Visual Studio, this appears in a message box.  In the designer view, I get the long exception message below.  Even if I turn off the design surface, this blocks me from getting IntelliSense in the text editor.

    System.IO.FileLoadException
    Assembly is still being loaded. (Exception from HRESULT: 0x80131016)
    
    Server stack trace: 
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.WaitForCompletion(BlockingCall call)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Invoke(BlockingCall call)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerView.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerView.get_Element()
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerView.get_Element()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerView.Microsoft.Expression.DesignHost.IDesignerView.get_Element()
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateDesignerViewInfo(FrameworkName targetFramework, IsolationInformation isolationInformation, IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
    
    

     


    Robert Levy
    Sunday, September 25, 2011 3:40 PM

Answers

  • Robert, since this is specific to one of your project, it would be useful to see what is going on there. If you cannot share publicly, please feel free to share it with me at unnir at microsoft dot com, along with repro steps on how I could try to reproduce this issue.

    Thanks,
    Unni


    Unni Ravindranathan, Program Manager, Microsoft Expression This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Robert_Levy Tuesday, September 27, 2011 3:13 AM
    Sunday, September 25, 2011 10:28 PM

All replies

  • Robert, since this is specific to one of your project, it would be useful to see what is going on there. If you cannot share publicly, please feel free to share it with me at unnir at microsoft dot com, along with repro steps on how I could try to reproduce this issue.

    Thanks,
    Unni


    Unni Ravindranathan, Program Manager, Microsoft Expression This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Robert_Levy Tuesday, September 27, 2011 3:13 AM
    Sunday, September 25, 2011 10:28 PM
  • Same problem here. And the problem starts when referencing portable class libraries, but not all. I have 4 of these in my solution, but when referencing one of them, the problems start to come (make sure to restart VS to reproduce).

    Still figuring out what the difference is between those class libraries that work, and the one that's causing these problems.

    Monday, October 03, 2011 11:23 AM
  • Ok, got it. It has something to do with the access modifiers on my classes and methods. I have abstract base class with a protected method, and an instance class that derives from that base class. If I reference this library in my Metro app, after some time (maybe after reloading the project or restarting Visual Studio, not sure), the problem starts.

    Symptoms: while waiting for intellisense to popup, a popup message appears saying: "The document failed to open.".

    Resolution: remove the reference, unload the portable class library from the solution, rebuild, and intellisense works again.

     

    Hope this helps.

    Monday, October 03, 2011 12:33 PM
  • have the same effect.

    Project compiles and runs

    Sunday, November 27, 2011 3:47 PM