Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run Windows application from .NET SDK command line #2922

Open
mattleibow opened this issue Aug 30, 2022 · 7 comments
Open

Unable to run Windows application from .NET SDK command line #2922

mattleibow opened this issue Aug 30, 2022 · 7 comments
Labels
area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal maui-7.x Bugs targeted for maui-7.x

Comments

@mattleibow
Copy link

Describe the bug

See more details in dotnet/maui#5975

We should be able to run a windows app with dotnet run or dotnet build -t:Run at the very least.

Steps to reproduce the bug

  1. New WinUI app using net6+
  2. dotnet run

Expected behavior

App launches (for both packaged and unpackaged)

Screenshots

No response

NuGet package version

1.1.4

Packaging type

No response

Windows version

No response

IDE

Other

Additional context

No response

@DrusTheAxe
Copy link
Member

DrusTheAxe commented Sep 1, 2022

There are ways to launch packaged apps from the command line. See dotnet/maui#5975 (comment)

If you're looking to run dotnet.exe and have it launch your app (and that doesn't happen today) that's a .NET issue you should discuss further with the .NET team (e.g. via that MAUI issue thread). Windows has APIs to programmatically launch packaged apps but it would be up to dotnet.exe to call them.

@gabbybilka
Copy link
Member

Did @DrusTheAxe's suggestion resolve this issue?

@mattleibow
Copy link
Author

The first step might be to follow several other workloads and make a "Run" target that the dotnet run CLI can use. Having the core sdk know about all the different permutations of different apps might not be that feasable.

So having each framework do the thing, and the core SDK just execute it is probably better - and run may also need a build so a Run depends on Build is super easy.

But as of today, we have nothing. So a Run target is going to be very helpful.

@mattleibow mattleibow added the maui-7.x Bugs targeted for maui-7.x label Nov 4, 2022
@AvtsVivek
Copy link

I think the issue I raised here on SO is similar.

@evelynwu-msft evelynwu-msft added area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal labels Feb 14, 2023
@mattleibow
Copy link
Author

It appears if you build and then run an unpackaged app it works a bit better: dotnet/maui#13942

@mattleibow
Copy link
Author

Tracking this internally as well: https://dev.azure.com/microsoft/OS/_workitems/edit/44573471

@ajsuydam
Copy link

Still an issue, just fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal maui-7.x Bugs targeted for maui-7.x
Projects
None yet
Development

No branches or pull requests

6 participants