locked
Unhandled exception (Access is denied) in File/New Project C# Windows Store App RRS feed

  • Question

  • In VS2013 Ultimate, when I try to do a File/New Project/Visual C#/Windows Store Blank App, and then open MainPage.xaml in the XAML editor, I get an unhandled exception (details at the bottom of this message).

    Since I was wondering if there was something wrong with my machine, I flattened it and reinstalled Windows 8.1 from scratch on it, and reinstalled Office 2013 and Visual Studio 2013. I then checked if I was getting the exception, and I wasn't. I then ran Windows Update until everything was up-to-date. Now I'm still getting the exception again. This leads me to think that something broke in a Windows Update.

    The entire code of the page looks (as you'd expect) like:

    <Page
        x:Class="PlayWithGeometry.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:PlayWithGeometry"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
    
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    
        </Grid>
    </Page>
    

    Just for fun, I ran a second instance of VS2013, attached to XDesProc.exe, and got the following:

    The call stack looks like:

    > Microsoft.Expression.DesignSurface.ni.dll!58ce5f85() Unknown
      [Frames below may be incorrect and/or missing, no symbols loaded for Microsoft.Expression.DesignSurface.ni.dll] 
      [External Code] 
      XDesProc.ni.exe!5f16550c() Unknown
      XDesProc.ni.exe!5f16549b() Unknown
      [External Code] 

    XAML Designer Exception details:

    System.ComponentModel.Win32Exception
    Access is denied
       at System.Windows.Input.Cursor.LoadFromFile(String fileName)
       at System.Windows.Input.Cursor..ctor(String cursorFile)
       at Microsoft.Expression.Utility.FileResourceManager.GetCursor(String name)
       at Microsoft.Expression.DesignSurface.Tools.SelectionTool.CreateToolBehavior(ToolBehaviorContext behaviorContext)
       at Microsoft.Expression.DesignSurface.Tools.SelectionTool.CreateToolBehavior()
       at Microsoft.Expression.DesignSurface.Tools.Tool.Activate()
       at Microsoft.Expression.DesignSurface.Tools.ToolManager.set_ActiveTool(Tool value)
       at Microsoft.Expression.DesignSurface.Tools.ToolManager.UpdateHostTool()
       at Microsoft.Expression.DesignSurface.Tools.ToolManager.AttachHostListener()
       at Microsoft.Expression.DesignSurface.Tools.ToolManager.DocumentViewContext_ActiveViewChanged(Object sender, ViewChangedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.Expression.DesignSurface.DocumentViewContext.OnActiveViewChanged(ViewChangedEventArgs e)
       at Microsoft.Expression.DesignSurface.DocumentViewContext.SetActiveDocumentAndView(SceneView view, Item item, HostViewEventArgs e)
       at Microsoft.Expression.DesignSurface.DocumentViewContext.SetActiveView(SceneView view, HostViewEventArgs e)
       at Microsoft.Expression.DesignSurface.DocumentViewContext.CreateAndOpenViewInternal(SceneDocument document, CancellationToken cancelToken, Boolean activate, Boolean ensureOpenInHost)
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass13.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__12(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass3`1.<MarshalInWithCancellation>b__2()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.ComponentModel.Win32Exception
    Access 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.MarshalInSynchronous(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.MarshalInWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func, ApartmentState apartmentState)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, 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(IRemoteHostProject remoteProject, IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IRemoteDesignerService ds, IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass19.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__18(IRemoteDesignerService ds, RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass5`1.<MarshalOutWithCancellation>b__4(IRemoteDesignerService ds)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass1`1.<MarshalOut>b__0()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.ComponentModel.Win32Exception
    Access 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, CancellationToken cancelToken, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CancellationToken cancelToken, CallSynchronizationMode syncMode, WaitHandle timeoutSignal, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action`1 action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.MarshalOutWithCancellation[TResult](CancellationToken cancelToken, Func`3 func, ApartmentState apartmentState)
       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)

    Monday, November 4, 2013 6:50 PM

Answers

  • I've found the problem, but it's definitely a bug in Visual Studio. I always set my computer's TEMP and TMP environment variables (both user and system) to C:\Temp... in this case, it causes the error. I've been able to reproduce it both on my computer and on a VM in Hyper-V.

    When I reset my TEMP and TMP back to default values, the error disappeared. It's fairly frustrating that I can't set my own environment variables if I want to use VS2013, and I hope this isn't listed as just a cosmetic bug.

    If there's anything else I can do, let me know. In the meantime, I obviously have a workaround.

    Thanks,

    Scott

    Seattle, WA, USA

    Tuesday, November 5, 2013 7:51 AM

All replies

  • Possibly a domain policy issue?  Maybe running ProcMon and looking for Access Denied messages will help.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, November 4, 2013 8:24 PM
    Moderator
  • Matt -

    Thanks for replying... this is on my personal standalone laptop, no Group Policy or domain joining. I did indeed run ProcMon against it to see if anything interesting popped up... filtering on XDesProc.exe, File operations with ACCESS DENIED looks like this. It's a fresh install of Windows (last night), I'm the only account and admin. I'm wondering about the files in C:\Temp (my TEMP and TMP environment variables point to C:\Temp, which does exist). It doesn't matter if I run DevEnv.exe as Administrator or not, same error.

    3:27:09.4803348 PM	XDesProc.exe	4244	CreateFile	C:\	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:09.4808928 PM	XDesProc.exe	4244	CreateFile	C:\Users\Scott\AppData\Local	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:10.4900195 PM	XDesProc.exe	4244	CreateFile	C:\Users\Scott	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:10.4905779 PM	XDesProc.exe	4244	CreateFile	C:\Users\Scott\AppData\Roaming	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:10.4914433 PM	XDesProc.exe	4244	CreateFile	C:\Users\Default\AppData\Roaming	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2276934 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2360451 PM	XDesProc.exe	4244	CreateFile	C:\	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2371471 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2372914 PM	XDesProc.exe	4244	CreateFile	C:\	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2377210 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2378231 PM	XDesProc.exe	4244	CreateFile	C:\	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:19.2381793 PM	XDesProc.exe	4244	CreateFile	C:\Temp\AssemblyDataCache	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Open Reparse Point, Attributes: N, ShareMode: Read, Write, AllocationSize: 0
    3:27:36.4078379 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4083538 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4128989 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4134035 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4193319 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4198812 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4231215 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:36.4236009 PM	XDesProc.exe	4244	CreateFile	C:\Temp	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:38.2240040 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp46BC.cur	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:38.2242827 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp46BC.cur	ACCESS DENIED	Desired Access: Generic Read, Dis, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
    3:27:38.2248509 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp46BC.cur	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:38.2250988 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp46BC.cur	ACCESS DENIED	Desired Access: Generic Read, Dis, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
    3:27:38.8526763 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp4AB5.cur	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:38.8530381 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp4AB5.cur	ACCESS DENIED	Desired Access: Generic Read, Dis, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
    3:27:38.8535786 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp4AB5.cur	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:38.8538265 PM	XDesProc.exe	4244	CreateFile	C:\Temp\tmp4AB5.cur	ACCESS DENIED	Desired Access: Generic Read, Dis, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
    3:27:44.8222800 PM	XDesProc.exe	3684	CreateFile	C:\	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:44.8228174 PM	XDesProc.exe	3684	CreateFile	C:\Users\Scott\AppData\Local	ACCESS DENIED	Desired Access: Read Data/List Directory, Synchronize, Dis, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:45.2075629 PM	XDesProc.exe	3684	CreateFile	C:\Users\Scott	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:45.2080126 PM	XDesProc.exe	3684	CreateFile	C:\Users\Scott\AppData\Roaming	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    3:27:45.2089067 PM	XDesProc.exe	3684	CreateFile	C:\Users\Default\AppData\Roaming	ACCESS DENIED	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    And I'm happy to do whatever other troubleshooting you might think of. :-)


    • Edited by Scott B. Arbeit Monday, November 4, 2013 11:38 PM Added one line at the end.
    Monday, November 4, 2013 11:37 PM
  • Hi Scott,

    Just a wild guess, could this be a hardware issue that the HDD is broken?

    Monday, November 4, 2013 11:41 PM
  • Not likely... this has been my workhorse laptop for years, never had a problem with either hard drive in it (yes, it's big enough to have two), and I ran a full CHKDSK last month. And I'm using it right now to type to you. :-)
    Monday, November 4, 2013 11:58 PM
  • I've found the problem, but it's definitely a bug in Visual Studio. I always set my computer's TEMP and TMP environment variables (both user and system) to C:\Temp... in this case, it causes the error. I've been able to reproduce it both on my computer and on a VM in Hyper-V.

    When I reset my TEMP and TMP back to default values, the error disappeared. It's fairly frustrating that I can't set my own environment variables if I want to use VS2013, and I hope this isn't listed as just a cosmetic bug.

    If there's anything else I can do, let me know. In the meantime, I obviously have a workaround.

    Thanks,

    Scott

    Seattle, WA, USA

    Tuesday, November 5, 2013 7:51 AM
  • In ProcMon, who is the user that is trying to access the C:\Temp directory? 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, November 5, 2013 2:15 PM
    Moderator
  • Matt -

        In both cases, the user for XDesProc.exe is me, and I am an administrator of the machine, logged in with my Microsoft ID. I've uploaded six images on Skydrive for you (just getting around the limit of two images per message):

    • One image of Procmon when running with my user TEMP environment variable set to C:\Users\Scott\AppData\Local\Temp - which succeeds
    • One image of Procmon when running with my user TEMP environment variable set to C:\Temp - which fails
    • Two images of the permissions and my effective access for C:\Users\Scott\AppData\Local\Temp
    • Two images of the permissions and my effective access for C:\Temp

        The punchline is that my effective access in both cases is identical. These images were all taken in the same logon session... no logout, no reboot in between. Simply changing the value of TEMP and then restarting DevEnv.exe will break/fix it.

        If there's anything else you'd like me to check, let me know.

    Thanks,

    Scott

    Tuesday, November 5, 2013 6:55 PM
  • Thanks for the hint, Scott.

    FYI, I have this issue too. I have moved my temp folder to another folder (with security access restricted to only SYSTEM and my account) and the vs2013 designer throws that exception displaying xaml files.

    I also have noticed that Office 2013 isn't able to install when the temp folder is moved into a ntfs encrypted (EFS) folder.
    Office and Visual Studio just show you how noobs develop softwares: assuming to run into a specific environment.

    EDIT:
    I just noticed that the designer is unable to open any xaml, not only the samples ones.
    So this makes VS unusable to me!


    • Edited by Marco Mura Wednesday, November 6, 2013 7:34 PM
    Wednesday, November 6, 2013 7:29 PM
  • Marco -

        Glad I could help. I saw another post here with a user from Italy having the same problem... he flattened his machine (like I did) and that "solved" it, but really we can both guess that he had changed his TEMP variable and didn't change it after reinstalling.

        I'm not down on DevDiv over this bug (I certainly wouldn't call anyone there 'noobs'... Visual Studio > any-other-IDE-on-any-platform) but clearly somewhere in Microsoft.Expression.DesignSurface.ni.dll there's a call that has something to do with TEMP that returns null instead of an HRESULT, and not having a fail path for that call is what's caused this problem. I'm honestly curious if this has something do with Windows 8.1 vs. Windows 8 (in Windows 8 + VS2012, this never was a problem) but you can't create a Windows Store App with Windows 8 + VS2013 (it forces you to update to Windows 8.1), so I can't test if there's been a regression.

        Hopefully our friendly Escalation Engineer will let us know that a bug has been reported and we can expect a fix in VS2013 Update 1... right Matt? :-)

    Regards,

    Scott

    Wednesday, November 6, 2013 8:34 PM
  • I don't know if this is a bug or by-design.  I will file the bug, however.  Also, there are no guarantees that anything gets changed in any version.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, November 6, 2013 9:21 PM
    Moderator
  • Thank you Matt... I know you can't guarantee anything, I should have been less flippant about that. I appreciate you working this on your end.

    I don't know the custom here in terms of marking a workaround as an answer... would that be appropriate for this thread? I'm happy to if that makes sense.

    Regards,

    Scott

    Wednesday, November 6, 2013 10:22 PM
  • It's ok to mark an answer if you have a resolution, even if it's a workaround.  I marked your response as an answer.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, November 7, 2013 1:50 PM
    Moderator
  • I'm honestly curious if this has something do with Windows 8.1 vs. Windows 8 (in Windows 8 + VS2012, this never was a problem) but you can't create a Windows Store App with Windows 8 + VS2013 (it forces you to update to Windows 8.1), so I can't test if there's been a regression.

    Well, I have VS2012 still installed and its xaml designer doesn't throw any expcetion.
    It seems to be related strictly to VS2013.

    Like you, I tried re-setting the TEMP folder to the default location and the designer started working. It really seems there is a noob assumption (you have to grant me this word here) for the location of the temp folder.
    Anyway, this isn't a solution for me since I need to keep my TEMP folder in another disk.

    At now I'm unable to use the VS xaml designer, and this is immensely frustrating.


    • Edited by Marco Mura Thursday, November 7, 2013 10:40 PM
    Thursday, November 7, 2013 10:39 PM