none
XAML designer crash with default code from blank UWP template

    Question

  • Hello,

    When I load the MainPage.xaml from the blank UWP application template, I'm getting the following designer exception. This is Visual Studio 2015 Update 2. I've already tried repairing the installation:

    System.TypeLoadException
    Method 'GetStylePropertyTargetType' in type 'Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.Metadata.WindowsUIXamlPlatformMetadata' from assembly 'Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
       at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsStoreXamlPlatform..ctor(IPlatformRuntimeAssemblyResolver platformRuntimeAssemblyResolver, IPlatformReferenceAssemblyResolver platformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.WindowsPhoneXamlDesigner.WindowsPhoneXamlPlatform..ctor(IPlatformRuntimeAssemblyResolver platformRuntimeAssemblyResolver, IPlatformReferenceAssemblyResolver platformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.UniversalXamlPlatformCreator.CreatePlatformImpl(IPlatformReferenceAssemblyResolver referenceAssemblyResolver, IPlatformRuntimeAssemblyResolver runtimeAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsStoreXamlPlatformCreator.CreatePlatformInternal(IPlatformReferenceAssemblyResolver referenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver referenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.Designer.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
       at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateXamlDesignerInformationContext(IHostSourceItem item, CancellationToken cancelToken)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass11_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateXamlDesignerInformationContext>b__0(CancellationToken token)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass6_0`1.<MarshalInWithCancellation>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.ProcessQueue(CallQueue queue)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.ProcessInboundQueue(Int32 identity)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32 msg, IntPtr wParam, IntPtr lParam, Boolean elevatedQuery, Boolean& handled)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess.RunApplication()
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess.DesignProcessViewProvider.AppContainerDesignerProcessRun(String[] activationContextArgs)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess.DesignProcessViewProvider.<>c__DisplayClass3_0.<applicationView_Activated>b__0()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    
    Thursday, March 31, 2016 2:56 PM

Answers

All replies

  • Hi Gabriel,

    Which Windows version are you using? I also installed the Visual Studio 2015 Update 2 on Windows 10, and after I create a default UWP app, the designer loaded correctly.

    So I think the problem more related to your computer environment and the installation. If possible, I suggest you change another computer to check whether it also has this issue.

    If you also use Windows 10, please check whether your computer has set as Develop mode. And please create another type project which also uses XAML designer, such as WPF, to check whether it also has this issue.

    If the WPF designer loaded correctly, please try repair your Windows SDK from Control Panel -> Programs and Features -> Windows 10 SDK -> Change -> Repair.

    In addition, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to Onedrive and share the link here.

    Best Regards,
    Weiwei

    Friday, April 01, 2016 9:10 AM
    Moderator
  • Same problem for me and this exception appear also on my existing uwp projects !

    Before SP2 no problems at all. I tried to repair same error...

    Friday, April 01, 2016 11:31 AM
  • I am also facing this issue. Have you any solution?
    Friday, April 01, 2016 1:08 PM
  • Same problem for me as well. Just updated to VS 2015 Update 2. Worked fine prior to updating VS to update 2. I am working on a UWP IoT app if that is relevant.
    Friday, April 01, 2016 2:58 PM
  • Same problem after update, wpf works , repaired Windows 10 SDK but didn't solve the problem
    • Edited by marolt Friday, April 01, 2016 4:31 PM
    Friday, April 01, 2016 4:28 PM
  • FYI, I have also reported this bug via connect.microsoft.com

    Here is the link: https://connect.microsoft.com/VisualStudio/feedback/details/2539702


    Friday, April 01, 2016 4:54 PM
  • I have solved this issue.

    You have repair or replace the Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.dll file.

    The file location is given below.

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.dll

    Saturday, April 02, 2016 7:06 AM
  • What version of that file do you have? The one I have is 14.0.24720. It's one of the few files that are dated in 2015. Most of the other files are dated in 2016, so it seems that this file have not been updated when I installed Update 2. I've also tried to repair the installation with no luck.

    Saturday, April 02, 2016 12:20 PM
  • After som investigation it seems it has to do with incomplete installation of Tools for Universal Apps (1.3) and Windows SDK 10.0.586. On my system it's impossible to get this to install. Have tried uninstall and installation from ISO, but have had no luck so far. I get no errors during installation.

    Edit:

    After som more investigation I found this error in the logfiles:

    [058C:3328][2016-04-02T20:01:56]i000: Setting string variable 'WixBundleName' to value 'Microsoft Visual Studio 2015 Universal Windows App Development Tools'
    [058C:3328][2016-04-02T20:01:56]i000: Loading managed bootstrapper application.
    [058C:3328][2016-04-02T20:01:56]e000: Error 0x80131902: Failed to create the managed bootstrapper application.
    [058C:3328][2016-04-02T20:01:56]e000: Error 0x80131902: Failed to create UX.
    [058C:3328][2016-04-02T20:01:56]e000: Error 0x80131902: Failed to load UX.
    [058C:3328][2016-04-02T20:01:56]e000: Error 0x80131902: Failed while running

    • Edited by Magellan82 Saturday, April 02, 2016 6:11 PM
    Saturday, April 02, 2016 5:41 PM
  • Hopefully. this error nothing todo with the hyperV feature. Because my notebook just a P4 without HyperV. Have a feeling something todo with this Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.dll, a old version?

    After some searching. Event Viewer -> Windows Logs -> Application, found this error message :

    Application: XDesProc.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.TypeLoadException
       at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsStoreXamlPlatform..ctor(Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformRuntimeAssemblyResolver, Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.WindowsPhoneXamlDesigner.WindowsPhoneXamlPlatform..ctor(Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformRuntimeAssemblyResolver, Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.UniversalXamlPlatformCreator.CreatePlatformImpl(Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformReferenceAssemblyResolver, Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformRuntimeAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.WindowsXamlDesigner.WindowsStoreXamlPlatformCreator.CreatePlatformInternal(Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.Platform.PlatformCreatorBase.CreatePlatform(Microsoft.VisualStudio.DesignTools.Platform.Metadata.IPlatformReferenceAssemblyResolver)
       at Microsoft.VisualStudio.DesignTools.Designer.Project.ProjectContextManager.GetProjectContext(Microsoft.VisualStudio.DesignTools.DesignerContract.IHostProject, Microsoft.VisualStudio.DesignTools.Platform.IPlatform, Boolean)
       at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateXamlDesignerInformationContext(Microsoft.VisualStudio.DesignTools.DesignerContract.IHostSourceItem, System.Threading.CancellationToken)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService+<>c__DisplayClass11_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateXamlDesignerInformationContext>b__0(System.Threading.CancellationToken)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService+<>c__DisplayClass6_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<MarshalInWithCancellation>b__0()
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler+Call.InvokeWorker()
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler+Call.Invoke(Boolean)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.InvokeCall(Call)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.ProcessQueue(CallQueue)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.ProcessInboundQueue(Int32)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32, IntPtr, IntPtr, Boolean, Boolean ByRef)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Application.RunDispatcher(System.Object)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run(System.Windows.Window)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess.RunApplication()
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess+DesignProcessViewProvider.AppContainerDesignerProcessRun(System.String[])
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.DesignerProcess+DesignProcessViewProvider+<>c__DisplayClass3_0.<applicationView_Activated>b__0()
       at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ThreadHelper.ThreadStart()


    • Edited by Han Ching Sunday, April 03, 2016 10:46 AM
    Sunday, April 03, 2016 8:56 AM
  • I found a solution on my system! I disabled .NET 3.5 and .NET 2.0 as a Windows Feature, and ran the Visual Studio Setup again. The installation of the Tools of Universal Windows App 1.3 then completed without errors!

    Sunday, April 03, 2016 2:14 PM
  • Thank You for your solution. have to internet connected when installation of the Tools of Universal Windows App 1.3 or also get BITS error.
    • Edited by Han Ching Tuesday, April 05, 2016 9:31 AM
    Tuesday, April 05, 2016 9:31 AM
  • This is how I solved it.

    Problem:
    "Tools (1.3) and Windows 10 SDK (10.0.10586)" is not installed by the Visual Studio installer.

    Procedure:
    Found the msi installer for this package where Visual Studio installer extracts it.
    Tried running it. Says it needs .NET Framework.

    Solution:
    Installed ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" via "Turn Windows features on or off".
    Used Visual Studio installer from control panel which now is able to add the tools.

    /André

    Tuesday, April 05, 2016 11:17 AM