-
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.
[workload] move SingleProject.targets to Microsoft.Maui.Sdk
Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1428787 Currently, if you mimic a design-time build that would happen inside Visual Studio: > dotnet new maui > dotnet build -f net6.0-android -t:Compile -p:DesignTimeBuild=true -p:BuildingInsideVisualStudio=true -p:SkipCompilerExecution=true --no-restore This fails because of the `--no-restore` flag: C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.11.74\tools\Xamarin.Android.Common.targets(511,3): error XA1018: Specified AndroidManifest file does not exist: foo\AndroidManifest.xml. I was able to reproduce this failure in our template tests in `dotnet.cake`. In 974cac4, several of .NET MAUI's MSBuild targets were moved to `library-packs`, such as `Microsoft.Maui.Controls.Build.Tasks`. This means that files like `Microsoft.Maui.Controls.SingleProject.targets` won't be evaluated until NuGet restore completes. To solve this problem: * Move `Microsoft.Maui.Controls.SingleProject.targets` and `Microsoft.Maui.Controls.DefaultItems.targets` to the `Microsoft.Maui.Sdk` pack. These `.targets` are no longer affected by `$(MauiVersion)`, and just exist in the workload. * Stop importing these files in `Microsoft.Maui.Controls.targets` in `Microsoft.Maui.Controls.Build.Tasks`. * Import these files in `Microsoft.Maui.Sdk.After.targets`. Overall, I think the loss of `$(MauiVersion)` is fine for the moved `.targets` files, because they are not invoking MSBuild tasks. The design-time build tests now complete successfully.
- Loading branch information
1 parent
a13e89d
commit 09c27f5
Showing
17 changed files
with
84 additions
and
29 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
1 change: 1 addition & 0 deletions
1
src/Compatibility/ControlGallery/src/Core/Directory.Build.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
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
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
1 change: 1 addition & 0 deletions
1
src/Controls/tests/Xaml.UnitTests/MSBuild/_Directory.Build.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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<Project> | ||
<Import Project="..\..\..\..\..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" /> | ||
<Import Project="..\..\..\..\..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" /> | ||
<Import Project="..\..\..\..\..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.DefaultItems.targets" /> | ||
</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
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
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