Hi Edvard,
I'm Ben McGregor from the Xbox Game Bar team. The exception in your image above is a red herring. i.e. That just means Windows COM couldn't find the proxy/stub dll to marshal the XboxGameBarWidgetActivatedEventArgs object. This is expected as the marshalling will occur with the winmd file that came from the NuGet package and will be included in your project. It is ok to ignore that exception. You can uncheck the box that says to break on that type if you like.
I assume you've already tried to proceed past that exception and something doesn't work. I'm going to guess it's still related to marshaling, because you're packing a UWP app and Win32 app (which should work fine). When you create a MAP (multi-app package), you are now dealing with two package manifests:
1) The package.appxmanifest for the UWP app if you just deployed it alone
2) The package.appxmanifest for the packaging project. This manifest is used when you install the multi-app package.
You need to ensure that the manifest entries called out in our readme.txt file get added to BOTH of those manifest. These are the entries I'm referring to:
<Extensions>
<!-- Enlighten COM on where to find Metadata Based Marshaling (MBM) data for the Game Bar private types
<Path> is a required element (by VS) and has to point to a binary in the package, but it's not used when the class id is
00000355-0000-0000-C000-000000000046 (MBM). Due to that we just put the Microsoft.Gaming.XboxGameBar.winmd here. -->
<Extension Category="windows.activatableClass.proxyStub">
<ProxyStub ClassId="00000355-0000-0000-C000-000000000046">
<Path>Microsoft.Gaming.XboxGameBar.winmd</Path>
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetAuthHost" InterfaceId="DC263529-B12F-469E-BB35-B94069F5B15A" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetControlHost" InterfaceId="C309CAC7-8435-4082-8F37-784523747047" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetForegroundWorkerHost" InterfaceId="DDB52B57-FA83-420C-AFDE-6FA556E18B83" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetForegroundWorkerPrivate" InterfaceId="42BACDFC-BB28-4E71-99B4-24C034C7B7E0" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarNavigationKeyCombo" InterfaceId="5EEA3DBF-09BB-42A5-B491-CF561E33C172" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetActivatedEventArgsPrivate" InterfaceId="782535A7-9407-4572-BFCB-316B4086F102" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost" InterfaceId="5D12BC93-212B-4B9F-9091-76B73BF56525" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost2" InterfaceId="28717C8B-D8E8-47A8-AF47-A1D5263BAE9B" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost3" InterfaceId="3F5A3F12-C1E4-4942-B80D-3117BC948E29" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost4" InterfaceId="FA696D9E-2501-4B01-B26F-4BB85344740F" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetPrivate" InterfaceId="22ABA97F-FB0F-4439-9BDD-2C67B2D5AA8F" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetPrivate2" InterfaceId="B2F7DB8C-7540-48DA-9B46-4E60CE0D9DEB" />
<Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetPrivate3" InterfaceId="4FB89FB6-7CB8-489D-8408-2269E6C733A1" />
</ProxyStub>
</Extension>
</Extensions>
The reason you need to add both is the Package Project doesn't understand how to merge these entries into the packaging manifest when it performs the manifest merge operation. You need to help it out a bit.
Please give this a try and let us know if you hit any other issues. We more actively monitor the GitHub samples site issues list. https://github.com/microsoft/XboxGameBarSamples/issues
Thanks,
Ben