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

.NET MAUI 9: Update doc to describe how .NET 9 uses unpackaged F5 to Windows #2415

Closed
BethMassi opened this issue Aug 6, 2024 · 5 comments · Fixed by #2607
Closed

.NET MAUI 9: Update doc to describe how .NET 9 uses unpackaged F5 to Windows #2415

BethMassi opened this issue Aug 6, 2024 · 5 comments · Fixed by #2607
Assignees
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] dotnet-maui/subsvc dotnet-mobile/svc Pri2 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@BethMassi
Copy link
Contributor

BethMassi commented Aug 6, 2024

Type of issue

Other (describe below)

Description

For .NET 9, we're changing the default F5 deployment for Windows to Unpackaged so that we can address new users who are unable to turn on Developer Mode on their Windows machines. This will be a change for new projects that will add the WindowsPackageType attribute in the .csproj and set the launchSetting.json commandName to "Project". We need to document how to switch it back to Packaged if users need to access Windows Deployment APIs that only work with Packaged apps.

PR is here: dotnet/maui#23787

Page URL

https://learn.microsoft.com/en-us/dotnet/maui/windows/setup?view=net-maui-9.0

Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/windows/setup.md

Document Version Independent Id

e139fd32-4027-b014-115f-18f53ab6a46c

Article author

@davidbritch

Metadata

  • ID: e139fd32-4027-b014-115f-18f53ab6a46c
  • Service: dotnet-mobile
  • Sub-service: dotnet-maui

Associated WorkItem - 335728

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Aug 6, 2024
@davidbritch davidbritch added 🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] labels Aug 7, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Aug 7, 2024
@davidbritch davidbritch changed the title Update doc to describe how .NET 9 uses unpackaged F5 to Windows .NET MAUI 9: Update doc to describe how .NET 9 uses unpackaged F5 to Windows Aug 7, 2024
@BethMassi
Copy link
Contributor Author

This is landing for .NET 9 RC1.

@BethMassi
Copy link
Contributor Author

@davidbritch I'm not sure how you want to structure this article for .NET 9. There shouldn't be any configuration needed except to select the Windows Machine / net9.0-windows10.0.19041.0 debug target. Here's a blurb introducing Unpackaged F5 experience and how to switch it to Packaged.

When debugging and deploying a new .NET MAUI project to Windows, the default behavior is to deploy the app as Unpackaged. This is controlled by the following settings.

In your project's .csproj file the property <WindowsPackageType>None</WindowsPackageType> sets the app as Unpackaged.

In your Properties/launchSettings.json file the commandName value for the Windows profile is set to Project.

{
  "profiles": {
    "Windows Machine": {
      "commandName": "Project",
      "nativeDebugging": false
    }
  }
}

If your app needs to use APIs that are only available with Windows Packaged apps and you plan on distributing your Windows app through the Microsoft Store, you can change these settings to debug and deploy as Packaged.

Remove the <WindowsPackageType>None</WindowsPackageType> property from your project's .csproj file.

In your Properties/launchSettings.json file set the commandName value for the Windows profile to MsixPackage.

{
  "profiles": {
    "Windows Machine": {
      "commandName": "MsixPackage",
      "nativeDebugging": false
    }
  }
}

When you change these settings, you will need to enable Developer Mode on your Windows Machine. For more information about Packaged vs. Unpackaged Windows apps see Windows apps: packaging, deployment, and process.

@davidbritch
Copy link
Contributor

dotnet/maui#23787

@BethMassi
Copy link
Contributor Author

@davidbritch we also added a property in Visual Studio 17.12 (starting in Preview 3) that will toggle this setting for you on the Project Properties page:

Image

Maybe include this before (or after) the manual changes I wrote above? Also it's important to link to the Windows packaging article so people can make an informed choice on which they should do.

We're getting asked a lot about this change in the RCs, do you have an ETA on getting the article updated? Thanks!

@davidbritch
Copy link
Contributor

@BethMassi It'll be done for the GA date (that's as precise as I can be right now).

@davidbritch davidbritch added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Oct 30, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 30, 2024
@davidbritch davidbritch moved this from 🔖 Ready to 🏗 In progress in dotnet/docs-maui 2024 Sprints Nov 7, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in dotnet/docs-maui 2024 Sprints Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] dotnet-maui/subsvc dotnet-mobile/svc Pri2 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants