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

Update maui-mobile template: Sets the msbuild property _KeepLaunchProfiles to true and adds the MauiSingleProject project capability #527

Merged
merged 1 commit into from Mar 17, 2021

Conversation

tondat
Copy link
Contributor

@tondat tondat commented Mar 16, 2021

Description of Change

To enable the switch between target frameworks on VisualStudio the LaunchProfiles capability need to be enabled.

By default, it is enabled but this capability is removed by our SDKs because the HEAD projects (Android and iOS) does not use this IDE feature to display devices on the start button.

The _KeepLaunchProfiles property avoids that removal in order to have LaunchProfiles enabled on VisualStudio.

The MauiSingleProject project capability is required to identify single projects and when VisualStudio loads a project with this capability the initialization required for Android and iOS is executed, starting the services for both platforms.
The Android and iOS project capabilities cannot be used to do that because only one set of these capabilities (related to the current TargetFramework) is available at this moment.

These values need to be available when the project is loaded and if we set them on the targets for the MAUI NuGet package the first time after creating the project there are not recognized because we need a Nuget restore.

…files to true and adds the MauiSingleProject project capability

To enable the switch between target frameworks on VisualStudio the LaunchProfiles capability need to be enabled.

By default, it is enabled but this capability is removed by our SDKs because the HEAD projects (Android and iOS) does not use this IDE feature to display devices on the start button.

The _KeepLaunchProfiles property avoids that removal in order to have LaunchProfiles enabled on VisualStudio.

The MauiSingleProject project capability is required to identify single projects and when VisualStudio loads a project with this capability the initialization required for Android and iOS is executed, starting the services for both platforms.
The Android and iOS project capabilities cannot be used to do that because only one set of these capabilities (related to the current TargetFramework) is available at this moment.

These values need to be available when the project is loaded and if we set them on the targets for the MAUI NuGet package the first time after creating the project there are not recognized because we need a Nuget restore.
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho rmarinho merged commit 16ff68a into dotnet:main Mar 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants