locked
Visual Studo 2011 XAML Designer crashed with System.UnauthorizedAccessException

    Question

  • I cannot load any XAML files in to the designer. Below is the detailed design error.


    System.UnauthorizedAccessException

    Access to the path 'D:\$RECYCLE.BIN\S-1-5-21-789336058-839522115-725345543-500' is denied.


    at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle abort, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor) at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateDesignerViewInfo(IIsolationTarget isolationTarget, IHostSourceItem item, IHostTextEditor editor, CancellationTokenSource cancelSource)


    System.UnauthorizedAccessException

    Access to the path 'D:\$RECYCLE.BIN\S-1-5-21-789336058-839522115-725345543-500' is denied.


    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.CallQueue.Invoke[T](Func`1 func, WaitHandle aborted) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor) 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.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__7(IRemoteDesignerService d) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle abort, Func`1 func)


    System.UnauthorizedAccessException

    Access to the path 'D:\$RECYCLE.BIN\S-1-5-21-789336058-839522115-725345543-500' is denied.


    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.CallQueue.Invoke[T](Func`1 func, WaitHandle aborted) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalHostShadowCopyTask.Microsoft.Expression.DesignHost.IHostShadowCopyTask.BeginShadowCopyTask(String assemblyPath) at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.CreateModernShadowCopy(IHostProject project, String assemblySourcePath) at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.ResolveShadowCopyAssembly(IHostProject project, String path) at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.ResolveAssembly(IHostProject project, String path) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(String path) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(IHostReferenceItem reference) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.UpdateAssemblyReferences(IEnumerable`1 referencesToUpdate) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver..ctor(IHostProject project, DesignerContext designerContext) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyService.<.ctor>b__0(IHostProject project) at Microsoft.Expression.Utility.Collections.SuspendableKeyedCollection`2.CreateItems(TKey key) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.Expression.Utility.Collections.SuspendableKeyedCollection`2.GetItem(TKey key) at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyService.GetProjectAssemblyResolver(IHostProject project) at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize() at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize() at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform) at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem) at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass9.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__8() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.<>c__DisplayClassa`1.<Invoke>b__9() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Call.Invoke()


    System.UnauthorizedAccessException

    Access to the path 'D:\$RECYCLE.BIN\S-1-5-21-789336058-839522115-725345543-500' is denied.


    Server stack trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator`1.AddSearchableDirsToStack(SearchData localSearchData) at System.IO.FileSystemEnumerableIterator`1.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) at Microsoft.Expression.HostUtility.ShadowCopy.LooseFilesShadowCopyStrategy.<ComputeShadowCopySources>d__6.MoveNext() at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at Microsoft.Expression.HostUtility.ShadowCopy.HostShadowCopyTask.RealizeShadowCopyStrategy(ShadowCopyStrategy[] newStrategies) at Microsoft.Expression.HostUtility.ShadowCopy.HostShadowCopyTask.BeginShadowCopyTask(String assemblyPath) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostShadowCopyTask.<>c__DisplayClass4.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostShadowCopyTask.BeginShadowCopyTask>b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostShadowCopyTask.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostShadowCopyTask.BeginShadowCopyTask(String assemblyPath) 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.IRemoteHostShadowCopyTask.BeginShadowCopyTask(String assemblyPath) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalHostShadowCopyTask.<>c__DisplayClass4.<Microsoft.Expression.DesignHost.IHostShadowCopyTask.BeginShadowCopyTask>b__3(IRemoteHostShadowCopyTask v) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.<>c__DisplayClassa`1.<Invoke>b__9() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Call.Invoke()


    I have installed the April 2012 Update for Visual Studio 2011, that didn't fix the issue.

    Please suggest a solution

    Daison


    Tuesday, May 08, 2012 12:04 PM

All replies

  • Hello Daison,

    Another community member encoured the similar issue as you, and the solution descibed below is quoted from this case:

    Okay I think I have figured out the cause but don't have a solution. This happens as soon as I add my computer to my company's domain and then no matter what user ID I use whether my Live ID, local ID or domain ID the designer doe not open. Looks like it is some bug in the Visual Studio11.

    WORKAROUND: After installing Windows 8 and VS 2011 with a local account or Live ID, connect your computer to a direct hard-wired internet connection (not through LAN of your company). Run VS 2011 and get your developer license for this computer. Then plug off your computer from the internet connection and instead plug in the network cable of your company. Provide your network credentials and proxy info when you want to connect to internet. The advantage now is that you can also connect to web services on your network that are behind the DMZ and the designer works too :)

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, May 16, 2012 9:57 AM
    Moderator
  • Daison,

    Can you please try the work-around suggested by Vicky? Also, are you able to run you application in this state? Can you try following steps and see if it works:

    1. Create a new C# Grid App in Visual Studio

    2. F5

    See if your application builds and runs.

    -Navit Saxena

    Saturday, May 19, 2012 1:27 AM
  • Hi,

    Can you please try the latest Windows8 Release Preview with Visual Studio 2012 RC? We expect this issue to be fixed in this release.

    -Navit Saxena

    Thursday, May 31, 2012 8:38 PM
  • Hi,

    I am running VS 2012 RC. Still I am encountering this issue. I am connected from home. Very frustrating, cannot load any xaml files.

    Saturday, August 18, 2012 2:27 AM
  • Can you try the workaround described in this thread?

    http://social.msdn.microsoft.com/Forums/ta/toolsforwinapps/thread/a40977f2-c7e6-41dd-921d-dc9d9aed01eb

    I also highly recommend that you move to the RTM build of Visual Studio 2012. We believe (if the workaround works for you) that the issue is fixed in there. If you still cannot get up and running, please get in touch at unnir at Microsoft dot com, and I can try to help out.


    Unni Ravindranathan, Program Manager, Microsoft Expression This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, August 19, 2012 2:06 AM