-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Match in-tree order of targets with workloads and fix some WinUI issues #5923
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
Changes from all commits
9c22dab
d927f88
02842c3
e485215
02df1d5
3918e9c
cb01c3f
2e6b20c
995694c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,4 +17,5 @@ | |
| </ItemGroup> | ||
|
|
||
| <Import Project="Microsoft.Maui.Controls.SingleProject.targets" /> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| <PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows' "> | ||
| <OutputType Condition="'$(OutputType)' == 'Exe'">WinExe</OutputType> | ||
| <EnablePreviewMsixTooling Condition="'$(EnablePreviewMsixTooling)' == '' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe')">true</EnablePreviewMsixTooling> | ||
| <WindowsPackageType Condition=" '$(WindowsPackageType)' == '' and '$(EnablePreviewMsixTooling)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe') ">MSIX</WindowsPackageType> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be here to come before the nugets. Fixes a bug in #5896 |
||
| <WinUISDKReferences Condition=" '$(WinUISDKReferences)' == '' and '$(EnablePreviewMsixTooling)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe') ">false</WinUISDKReferences> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we have the order correct, we can also properly exclude the |
||
| <_SingleProjectRIDRequired Condition="'$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe'">true</_SingleProjectRIDRequired> | ||
| <_SingleProjectRIDSpecified Condition="'$(RuntimeIdentifier)' != '' or '$(RuntimeIdentifiers)' != ''">true</_SingleProjectRIDSpecified> | ||
| </PropertyGroup> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,6 @@ | |
| <EnableDefaultPageItems>False</EnableDefaultPageItems> | ||
| <EnableDefaultApplicationDefinition>False</EnableDefaultApplicationDefinition> | ||
| <_SingleProjectWindowsExcludes>$(WindowsProjectFolder)/**/.*/**</_SingleProjectWindowsExcludes> | ||
| <WindowsPackageType Condition=" '$(WindowsPackageType)' == '' and '$(EnablePreviewMsixTooling)' == 'true' and ('$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe') ">MSIX</WindowsPackageType> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- | ||
|
|
@@ -94,6 +93,23 @@ | |
|
|
||
| </Target> | ||
|
|
||
| <!-- | ||
| Make sure the properties are valid before validating. Instead of an error when the user | ||
| toggles between modes, just handle it and remove the AppxManifest item. | ||
| --> | ||
| <Target Name="_ValidateWindowsPackageTypeBeforeTarget" | ||
| BeforeTargets="_ValidateWindowsPackageType" | ||
| DependsOnTargets="_MauiRemoveRemoveAppxManifestForUnpackaged" /> | ||
|
|
||
| <Target Name="_MauiRemoveRemoveAppxManifestForUnpackaged" | ||
| Condition="'$(WindowsPackageType)' == 'None' and '@(AppxManifest)' != ''"> | ||
|
|
||
| <ItemGroup> | ||
| <AppxManifest Remove="@(AppxManifest)" /> | ||
| </ItemGroup> | ||
|
|
||
| </Target> | ||
|
Comment on lines
+104
to
+111
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue that #5896 fixes is when the manifest AND unpackaged is specified. That PR tried to fix it by not including the manifest, however, this is wrong because the way the PR did it was to check after the nuget had already defaulted to None and thus never included it. Technically, this is actually an invalid state with unpackaged AND a manifest, however since we auto-include we also need to un-include. And secondly, what if this is a multi-mode project? Instead of requiring the user to do weird conditions, just not exclude it for the user. |
||
|
|
||
| <!-- Import Maui Single Project property pages --> | ||
| <PropertyGroup Condition="'$(MauiDesignTimeTargetsPath)' == ''"> | ||
| <MauiDesignTimeTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Maui\Maui.DesignTime.targets</MauiDesignTimeTargetsPath> | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <Project> | ||
|
|
||
| <Import Project="..\..\..\Maui.InTree.targets" /> | ||
| <Import Project="$(MauiNuSpecDirectory)Microsoft.Maui.TestUtils.DeviceTests.Runners.targets" /> | ||
| <Import Project="..\..\..\..\Directory.Build.targets" /> | ||
| <Import Project="$(MauiSrcDirectory)Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " /> | ||
| <Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.TestUtils.DeviceTests.Runners.targets" /> | ||
| <Import Project="$(MauiRootDirectory)Directory.Build.targets" /> | ||
|
Comment on lines
-3
to
+5
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A big chunk of removing the ../ as this is terribly confusing. |
||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,4 +62,6 @@ | |
| <Compile Include="Properties\MapsKey.cs" Condition="Exists('Properties\MapsKey.cs')" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(MauiSrcDirectory)Maui.InTree.props" Condition=" '$(UseMaui)' != 'true' " /> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All projects that need maui things, like xaml compilation, need to add |
||
|
|
||
| </Project> | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <SampleProject>true</SampleProject> | ||
| <UseMaui Condition=" '$(UseWorkload)' == 'true' ">true</UseMaui> | ||
| </PropertyGroup> | ||
| <Import Project="../../../../Directory.Build.props" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <Project> | ||
| <Import Project="$(MauiSrcDirectory)Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " /> | ||
| <Import Project="$(MauiRootDirectory)Directory.Build.targets" /> | ||
|
Comment on lines
+2
to
+3
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the |
||
| </Project> | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <Project> | ||
| <Import Project="../../Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " /> | ||
| <Import Project="../../../Directory.Build.targets" /> | ||
| <Import Project="$(MauiSrcDirectory)Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " /> | ||
| <Import Project="$(MauiRootDirectory)Directory.Build.targets" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <Project> | ||
|
|
||
| <Import Project="..\..\..\Maui.InTree.targets" /> | ||
| <Import Project="$(MauiNuSpecDirectory)Microsoft.Maui.TestUtils.DeviceTests.Runners.targets" /> | ||
| <Import Project="..\..\..\..\Directory.Build.targets" /> | ||
| <Import Project="$(MauiSrcDirectory)Maui.InTree.targets" Condition=" '$(UseMaui)' != 'true' " /> | ||
| <Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.TestUtils.DeviceTests.Runners.targets" /> | ||
| <Import Project="$(MauiRootDirectory)Directory.Build.targets" /> | ||
|
|
||
| </Project> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <Project> | ||
| <Import Project="..\..\..\..\Directory.Build.targets" /> | ||
| <Import Project="..\..\..\..\.nuspec\Microsoft.Maui.Controls.Debug.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" /> | ||
| <Import Project="..\..\..\..\.nuspec\Microsoft.Maui.Controls.Debug.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" /> | ||
| <Import Project="$(MauiRootDirectory)Directory.Build.targets" /> | ||
| <Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Debug.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" /> | ||
| <Import Project="$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Debug.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <Project> | ||
| <Import Project="..\..\..\..\..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.DefaultItems.props" /> | ||
| <Import Project="..\..\..\..\..\..\..\..\..\.nuspec\AutoImport.InTree.props" /> | ||
| <Import Project="..\..\..\..\..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.props" /> | ||
| <Import Project="..\..\..\..\..\..\..\..\..\Directory.Build.props" /> | ||
| </Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this in from DefaultItems.props as that was just a file in the maui repo and was confusing. Also, this chunk of stuff is in the AutoImport.props that the workload uses. This way it is all matching.