-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[templates] remove Directory.Build.targets, add @(ProjectCapability)
The `Directory.Build.targets` files in the templates were a collection of workarounds that were needed until .NET MAUI was a workload. When .NET MAUI was a NuGet package, this was the only way to set required values for the IDE before NuGet restore. In the early days, you had to unload/reload MAUI projects after NuGet restore. We can remove `Directory.Build.targets` from templates now, and consolidate `@(ProjectCapability)` so this is defined by the workload. The following capabilities are defined for the IDE: * `Maui` * When `$(SingleProject)` is `true`: * `MauiSingleProject`, `LaunchProfiles` * `XamarinStaticLaunchProfiles` older than Dev17 * `LaunchProfilesGroupByPlatformFilters` otherwise These new capabilities are defined to identify projects (via telemetry) that bring in portions of .NET MAUI: * `MauiAssets` * `MauiBlazor` * `MauiCore` * `MauiEssentials` Other changes: * `$(_KeepLaunchProfiles)` is set by default when `$(SingleProject)` is `true`. * WinUI workarounds are moved into `WinUI.SingleProject.targets`. * Fixed `sdk-manifests` casing for `src/DotNet/DotNet.csproj -t:Install`
- Loading branch information
1 parent
f245183
commit b5033f1
Showing
8 changed files
with
22 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
src/Templates/src/templates/maui-blazor/Directory.Build.targets
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/Templates/src/templates/maui-mobile/Directory.Build.targets
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/Workload/Microsoft.Maui.Controls.Sdk/Sdk/WinUI.SingleProject.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- Workarounds for WinUI when $(SingleProject) is true --> | ||
<Project> | ||
<!-- Required - Overwrite tasks that are not needed when multitargeting --> | ||
<Target Name="ValidateWinUIPlatform" /> | ||
<Target Name="BinPlaceBootstrapDll" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters