The 'CommandsPackage' package did not load correctly.

AdamFisherAdamFisher USMember ✭✭
edited October 2015 in Visual Studio

When creating a brand new Xamarin Forms app (PCL) in Visual Studio 2015 on Windows 10, I noticed this error message coming up every time I launch the solution.


Has anyone else experienced this? I checked the log file it mentions: SetSite failed for package [CommandsPackage].

I just dismiss the message and it doesn't seem to affect anything but curious how to resolve it.


  • Exact same issue. Did a repair of VS and updated all packages but same error.

  • I have the same exact issue.

    I tried to clean uninstall visual studio and xamarin. Reinstalled everything, same issue.
    Repair of VS did nothing either.

    I am not able to run windows phone apps.
    Xamarin.ios and seems to run properly...

  • HarleyCarterHarleyCarter GBUniversity ✭✭

    exactly the same thing here

  • VictorGarciaAprea.9996VictorGarciaAprea.9996 USXamarin Team Xamurai

    Hi guys,

    I don't think this is related to Xamarin.

    I'm looking at the VS registry for a package named "CommandsPackage" and what I can find is this:


    This looks related to the new Windows Universal App Platform, although I don't know what specific bits of it does this package implements.

    And the dialog you post is VS trying to load that MS package and failing to do so. The loading of the package is most probably fired by you unfolding a Xamarin Forms project, which in turns, tries to unfold a UWA app.

    Can you unfold any standalone (non Xamarin Forms) UWA projects at all? That should fail if my theory is right.


  • AdamFisherAdamFisher USMember ✭✭

    I created a new universal windows blank application and it loads just fine. When I create a new Xamarin Forms portable blank app it gives me the error message.

  • VictorGarciaAprea.9996VictorGarciaAprea.9996 USXamarin Team Xamurai

    That is weird.

    Can you please look at the log file pointed out by the error message and post any additional info. If this is the common error load package, it should probably point out the method where this is failing, i.e. SetSite.

    That may help the guessing game a bit.


  • ShawnGShawnG USMember

    I am getting the same exact issues as Adam. I agree with Victor that it is probably something to do with Windows 10/UWP because it works fine on my 8.1 machine.

    Here are my log errors. It does look like it is the SetSite method.

    588 ERROR SetSite failed for package [CommandsPackage] {19AA6823-3AC0-4210-92AF-07E2F0B4E81F} 80131500 VisualStudio 2015/12/09 03:26:13.694

    589 ERROR End package load [CommandsPackage] {19AA6823-3AC0-4210-92AF-07E2F0B4E81F} 80131500 VisualStudio 2015/12/09 03:26:13.697

  • VictorGarciaAprea.9996VictorGarciaAprea.9996 USXamarin Team Xamurai

    Thanks Shawn, that confirms the error is in the ::SetSite method.

    A VS package is loaded and "sited" (::SetSite) only once, so it should have failed for Adam's when he created a blank Universal app.

    This is the DLL that implements the CommandsPackage:
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TailoredProjectServices\Microsoft.VisualStudio.AppxPackage.UAP.dll

    So I just did this two tests:

    1) Start VS, attach from another VS instance and look at the Modules window, I can confirm the .DLL above is not being loaded yet, which makes sense.


    1.a) I create a blank Universal app, and I can see in the other VS instance that the .DLL is now loaded.

    and (close VS, and restart, so we start with that .DLL not loaded)

    1.b) I create a XF PCL app, and I can also see in the other VS instance that the .DLL is loaded.

    I don't see an error in any of the two cases, because the issue just doesn't repro on my machine.

    But the weird thing is the Alan should see an error when doing 1.a) too and he's not. So the only thing I can think of is that for some reason (??) the package loading fails when fired by the XF template. Very weird.

    Can you please do one more test? That would be:

    1) Create a blank Universal app, so we get the package loaded and sited properly.
    2) Without restarting VS, just close the Universal app, and unfold a XF PCL app now.

    The package should be properly loaded and sited after 1), so that very same code path shouldn't execute when you do 2).

    Let me know what happens :)


  • VictorGarciaAprea.9996VictorGarciaAprea.9996 USXamarin Team Xamurai

    @ShawnG by looking at the GUID of your error log, the .DLL implementing the package is actually this one:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TailoredProjectServices\Microsoft.VisualStudio.AppxPackage.dll

    So Microsoft has (at least) two different packages with the same "CommandsPackage" name...

    I'll ping Microsoft to learn what is being done in that ::SetSite method...

  • ShawnGShawnG USMember

    I did the following:
    1. Loaded a UWP app and did not receive any error.
    2. Without restarting VS, I closed the UWP app and opened my XF app and I did not receive the error.
    3. Restarted VS and opened the XF app again. Had the same loading issue.

    I've attached my ActivityLog. There are a few warnings (790-793) but I don't think they would cause this issue.

  • TylerJensenTylerJensen USMember

    My experience mirrors ShawnG's exactly. And while I'm able to build an iOS project through to my MacMini, I'm unable to debug on the attached iPad. I'm a complete newb to Xamarin and mobile, especially iOS, so I'd be willing to pay someone to walk me through getting my environment up and working correctly.

  • TylerJensenTylerJensen USMember

    Update. If I remove the Windows project from the solution, close VS saving the solution, then open VS again and open the solution. No error dialog. So something in that project template.

  • TylerJensenTylerJensen USMember

    May or may not be helpful, but if I comment out the [Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets"] line in the WinPhone project, VS does not barf with the CommandsPackage error. I realize this does not solve the problem and it means my debug through to my iPad problem is unrelated. I'm still eager to get iOS and Android debugging working, so I'm still happy to pay anyone willing to walk me through getting my environment set up properly.

  • SwathiSudarSwathiSudar USMember ✭✭
    edited June 2017

    Actually I update the xamarin onXamarin studio yesterday. today I cant able to open my project. It seems like projectname(android) and projectname(ios)is unavailable . Please help me to figure it out

  • SwathiSudarSwathiSudar USMember ✭✭
    edited June 2017

    I got solution from my above issues
    the issue is like in the screen and Existing project was unavailable (unloaded) for both Android and Ios on xamarin form (Portable) project. So that after a long time it has taken for me and keep on trying to fix the issue then at the time, I tried as like the below screen. Hope this is helpful for anybody which xamarin creates the issue as like my issue

Sign In or Register to comment.