Reputation: 463
I have two UWP projects, one for a Custom Share UI, which is a ShareTarget App, and a main Application, both are uwp.
And, I have the following app structure. (All the sample apps in this case, all created from the 'new project' and basically do not have any content in them, except for the default content)
But, when I build the WapProjTemplate1 I get the following error logs,
Error APPX1101 Payload contains two or more files with the same destination path 'App.xbf'. Source files: \source\repos\WapProjTemplate1\App1\bin\x64\Debug\App.xbf source\repos\WapProjTemplate1\App2\bin\x64\Debug\App.xbf WapProjTemplate1 D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets 1766
Is it even possible to have two apps?
The reason I want two apps is because, I want to invoke the main app from the ShareUI.
Upvotes: 2
Views: 365
Reputation: 1580
You shouldn't have two separate apps for enabling Sharing. Your main app will just declare itself as the receptor of Sharing in its manifest as per docs.
It will then launch (if it's not running) or get re-activated if it is, with the following OnShareTargetActivated
event;
protected override async void OnShareTargetActivated(ShareTargetActivatedEventArgs args)
Here is where you can redirect to a different page, or pop open a new window populated with the data from the share.
Upvotes: 2