none
XAML Package Not Working

    Question

  • I have been using Visual Studio Professional 2015 for a while now and recently updated to version 2.  Since then I have been unable to open any of my .xaml documents.

    I simply get Visual Studio has encountered an unexpected error. when double clicking them and occasionally another message prompting me to look at the activity log where i am getting snippet at the bottom.

    I've re-installed probably about 6 times now removing any traces of program file folders, app data etc each time I do but nothing seems to fix it.

    This only happens at the moment when I am at home though.  I say this as i'm using a work laptop and my appdata folder is on our network.  Of coarse I am VPN'ing in and have access to the network (actually have admin rights also) so don't know whether this gives you some indication over what could be going wrong.  If this is the case what has changed in update 2 to now prevent me from using XAML designer away from the office?

    I've spent a long time also trying to find a way of installing Visual Studio without any updates as i'm hoping this may fix the issue but each time I have tried this I wind up back with the updates.

    Any help with this would be very much appreciated as given the amount of work I do with XAML files it's essentially rendered my visual studio program useless!!!

    EDIT: Forgot to mention I've also tried a brand new WPF application proving it is not an issue with my projects and even if i go to Tools>Options>Text Editor>XAML>Miscellaneous I get an error coming up about the package so it is something at the core of Visual Studio and not specific to projects.

    <entry>
        <record>481</record>
        <time>2016/05/02 13:18:16.714</time>
        <type>Information</type>
        <source>VisualStudio</source>
        <description>Begin package load [XamlDesignerPackage]</description>
        <guid>{512BE089-83EC-4CC6-8483-CF16565AE209}</guid>
      </entry>
      <entry>
        <record>482</record>
        <time>2016/05/02 13:18:16.736</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>SetSite failed for package [XamlDesignerPackage][Method failed with unexpected error code 50.]:{   at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)&#x000D;&#x000A;   at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)&#x000D;&#x000A;   at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Utility.IO.AccessHelper.IsAccessibleByAllApplicationPackages(String path)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.CheckAclsOnDirectory(String directory)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateDirectoryAcls(String directory)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateAclsNoPrompt(IEnumerable`1 paths)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.Initialize()&#x000D;&#x000A;   at MS.Internal.Package.XamlDesignerPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
        <guid>{512BE089-83EC-4CC6-8483-CF16565AE209}</guid>
        <hr>80131509</hr>
        <errorinfo>Method failed with unexpected error code 50.</errorinfo>
      </entry>
      <entry>
        <record>483</record>
        <time>2016/05/02 13:18:16.737</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>End package load [XamlDesignerPackage]</description>
        <guid>{512BE089-83EC-4CC6-8483-CF16565AE209}</guid>
        <hr>80131509</hr>
        <errorinfo>Method failed with unexpected error code 50.</errorinfo>
      </entry>
      <entry>
        <record>484</record>
        <time>2016/05/02 13:18:16.738</time>
        <type>Warning</type>
        <source>VisualStudio</source>
        <description>Package failed to load; error message suppressed by skip flag</description>
        <guid>{512BE089-83EC-4CC6-8483-CF16565AE209}</guid>
      </entry>


    Monday, May 02, 2016 1:37 PM

Answers

  • Hi GrahamStone86,

    Thanks for your post.

    First try to run your Visual Studio in Safe mode to Check whether some add-ins and extensions affect it (devenv /safemode)

    >>Since then I have been unable to open any of my .xaml documents

    >>I've also tried a brand new WPF application proving it is not an issue with my projects

    Did you mead you can open the XAML designer for WPF app successfully but you can't open the Xaml for UWP  app?

    If so, please check the XAML package, make sure you have install the Universal Windwos Development Tools

    If still no help, I need you installation log file to troubleshoot this issue.

    please use http://aka.ms/vscollect to gather the installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to  https://onedrive.live.com/and share the link here.

    Best Regards,

    Lake Xiao

    Tuesday, May 03, 2016 3:04 AM
    Moderator