dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.27k stars 1.76k forks source link

Application as a ShareTarget works but it's opening an additional window with the splash image in Windows #18536

Open itonx opened 1 year ago

itonx commented 1 year ago

Description

I created a .NET MAUI application that gets files through the Windows "Share" option and every time I select my application in the Share window an additional window with the splash image is opened as well as my .NET MAUI application.

I thought it was because of my code so I decided to create a new fresh application and the problem remains. As I know there's no default splash screen for the windows platform application.

Best practices for ShareTarget state that the application should be single-instance, however, the issue is for both single-instance and multi-instance.

Steps to Reproduce

  1. Create a new .NET MAUI App with Visual Studio 2022.
  2. Add the "Share Target" declaration in the Windows "Package.appxmanifest" with support for all files. image
  3. Run the application for Windows. image

Once the application is running:

  1. Right click in a file
  2. Click on the "Share" option image
  3. Select the .NET MAUI Application image

Two windows will appear:

How do I know the additional window is showing the splash image? I replaced the default Resources/Splash/splash.svg file.

  1. Uninstall the .NET MAUI application from Windows. image
  2. Replace the Resources/Splash/splash.svg file with a custom splash.svg file. image
  3. Clean the solution.
  4. Build the solution
  5. Run the application for Windows.
  6. Share a file and select the .NET MAUI application.

Again, the application will appear as well as the additional window with the new splash logo. image

Link to public reproduction project repository

No response

Version with bug

7.0.96

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 10.0.17763.0

Did you find any workaround?

No response

Relevant log output

No response

VS bug #1913833

drasticactions commented 1 year ago

I believe this is a WinUI bug:

https://github.com/drasticactions/MauiRepros/tree/main/ShareTarget/App2

image

If you set a ShareTarget for a WinUI app (Without MAUI) with the same parameters, the same behavior occurs. We should probably move this to WindowsAppSDK. CC @mattleibow.

ghost commented 1 year ago

Hi @itonx. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

itonx commented 1 year ago

@drasticactions I just tried it for a WinUI3 application, same behavior. Since this could be moved to WindowAppSDK, should I close this as not planned?.

@PureWeen what information is needed (s/needs-info label)?

mattleibow commented 1 year ago

This probably should be opened in the WASDK repo yes. Should be fine to close as well. I'll add some blocked labels as well so we can track this later.

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

mattleibow commented 1 year ago

Adding to the backlog just so the machines don't keep asking about this. But either way, open or closed, is fine. Probably just needs an issue in the WASDK.

mattleibow commented 1 year ago

wow, bot, wow.

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

itonx commented 1 year ago

WindowsAppSDK issue (https://github.com/microsoft/WindowsAppSDK/issues/3943).

williambuchanan2 commented 1 year ago

Anyone know how to implement this on Android and iOS?