locked
Blend for Visual Studio 2012 Designer Crashes "System.UnauthorizedAccessException"

    Question

  • When I open an WinRT project in Blend, it crashes the designer with this exception. I upgraded my Win 7 to Win 8. How do I get rid of this issue.

    System.UnauthorizedAccessException
    Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Live\v5.0\Metro XAML\References\CommonConfiguration\Neutral' is denied.
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

    System.UnauthorizedAccessException
    Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Live\v5.0\Metro XAML\References\CommonConfiguration\Neutral' is denied.

    Server stack trace:
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       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, IRemoteCancellationToken remoteToken)
       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, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.UnauthorizedAccessException
    Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Live\v5.0\Metro XAML\References\CommonConfiguration\Neutral' is denied.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileSystemEnumerableIterator`1.CommonInit()
       at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
       at System.IO.Directory.EnumerateFiles(String path, String searchPattern, SearchOption searchOption)
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.<FindMetadataAssembly>b__17(DirectoryFileNameSpecification specification)
       at System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.FindBestMetadataAssembly(IEnumerable`1 possiblePaths)
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.FindMetadataAssembly(String assemblyPath, String designerExtension)
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.EnsureDesignMetadataLoaded(Boolean showErrors)
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.RegisterDesignMetadata()
       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, Boolean create)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

     

    Sunday, October 28, 2012 7:14 PM

Answers

All replies

  • This is a known issue that has already been address for a future update to VS. I am assuming you did a Windows 7 to Windows 8 upgrade?

    Please take a look at this posting for a similar issue and a workaround:

    http://stackoverflow.com/questions/12443845/microsoft-advertising-sdk-for-windows-8-rtm-causes-access-denied-error

    Thanks,
    Unni


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

    Monday, October 29, 2012 2:20 AM
  • Use the following command to grant the access. Please start the command shell as administrator.

    "C:\Windows\system32\icacls.exe" "C:\Program Files (x86)\Microsoft SDKs\Live\v5.0\Metro XAML" /grant "*S-1-15-2-1":(OI)(CI)(IO)(GR,GE) /grant "*S-1-15-2-1":(RX)

    Nice greetings

    • Proposed as answer by Zentauro Monday, November 26, 2012 7:53 AM
    Monday, November 26, 2012 7:52 AM
  • Could you kind folks at Microsoft release a patch that addresses all of XAML's errors?
    • Proposed as answer by Dizskilled Tuesday, November 27, 2012 2:43 AM
    Monday, November 26, 2012 11:27 PM