-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Support for WinUI Unpackaged Apps #3166
Comments
@Eilon could you review all the usages the Xxx.Current listed above in the blazor parts. @danroth27 got Blazor working as unpackaged, so I am not sure how it all worked. Just invoking the Current property causes a crash, so you must be working some magic! |
a lot of code can probably come from here: xamarin/Essentials#1079 |
@javiercn here is a list of things to check for. |
@mattleibow I tried this on the maui repo and it doesn't seem to be working: The issue happens both with the sandbox and the single project projects. I did setup things up as described above |
I got our IT group to install Visual Studio 2022 (woo-hoo!) since it's come out of preview, brilliant timing. However, trying to run a .NET MAUI Windows App just now gave me an error - I need to enable developer mode. I have a feeling our IT staff is not going to be amenable to this, and my search led to this issue. Am I in the right place? And is there a way around this? I thought perhaps I could do Android, but that too required admin credentials. |
We are in the same situation, but as a college: would love to do MAUI dev with the students, but the IT stuff is very reluctant to enable developer mode => it's already a no-go for the current year now, but I hope this restriction will be lifted and we can give it a go next year. |
for android you also need to enable developer options and allow USB/Wifi debugging to deploy/debug apps. So there is no difference |
The difference is that phones are owned and operated by students, plus we can use the emulator. The PCs are managed by our IT staff who refuse to turn on developer mode so we are stuck with WPF for now. If possible, I'd like this requirement to be removed. |
Closing this as I believe all the bits of code should now be working or have known issues. See #8552 for the complete list. |
Summary
Since the release of the Windows App SDK Preview 3, we can now use unpackaged apps: https://docs.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app?pivots=winui3-unpackaged-csharp
Packaged apps: Packaged apps are packaged using MSIX. MSIX is a package format that gives end-users an easy way to install, uninstall, and update their Windows apps using a modern UI.
dotnet publish -f net6.0-windows
dotnet publish -f net6.0-windows -p:SelfContained=true -p:WindowsAppSDKSelfContained=true
Unpackaged apps: Unpackaged apps don't use MSIX. They're typically installed and updated using .exe or .msi files. Many unpackaged apps walk end-users through an installation wizard using a classic UI.
dotnet publish -f net6.0-windows -p:WindowsPackageType=None
dotnet publish -f net6.0-windows -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true
Self-Contained: For either Packaged or Unpackaged apps, publishing self-contained provides a way to ship a complete set of application artifacts which do not rely on any shared/globally installed frameworks.
.csproj changes
Improved self contained:
launchSettings.json changes
You will need to download and install the Windows App SDK runtime and MSIX packages which are required to run and deploy unpackaged apps: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads
For example, for the stable 1.0.0 version of the Windows App SDK, you will need to download and install: https://aka.ms/windowsappsdk/1.0-stable/msix-installer
Work To Do
Some changes we need to make/have:
This is basically putting the native dlls in the correct runtimes/win-/native/.dll path
Move the native Bootstrap dll to play nice(r) with VS microsoft/WindowsAppSDK#1498
- Use win10-* for the RIDs #3185
Some info can be obtained from the results of this task too: Generate the Windows manifests as well #2704
As more are found, please add it to this description so we can let the WinUI team know.
Package.Current
More Unpackaged Support #8536Package.Current.InstalledLocation
- I can useAppContext.BaseDirectory
insteadPackage.Current.Id.Name
- this could be the assembly namePackage.Current.DisplayName
- this could also be the assembly name or also look into attributes in the dll (which we could add too)Package.Current.Id
- this could be the assembly version (which we can also set)AppxManifest.xml
file - this does not exist in unpackaged and all checks should assume it is declared/correctRelated Issues
The text was updated successfully, but these errors were encountered: