|
1 | 1 | <!-- all <ItemGroup/>'s must check if $(EnableDefaultMauiItems) is true -->
|
| 2 | +<!-- all <ItemGroup/>'s must include $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) --> |
2 | 3 | <Project>
|
3 | 4 |
|
4 | 5 | <ItemDefinitionGroup>
|
|
7 | 8 | </MauiXaml>
|
8 | 9 | </ItemDefinitionGroup>
|
9 | 10 |
|
10 |
| - <ItemGroup Condition=" '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') "> |
| 11 | + <ItemGroup Condition=" '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') and '$(TargetFrameworkVersion)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
11 | 12 | <!-- %(Sdk) is only here if something later needs to identify these -->
|
12 | 13 | <Using Include="Microsoft.Extensions.DependencyInjection" Sdk="Maui" />
|
13 | 14 | <Using Include="Microsoft.Maui" Sdk="Maui" />
|
|
30 | 31 | </ItemGroup>
|
31 | 32 |
|
32 | 33 | <!-- Default .NET MAUI files-->
|
33 |
| - <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(EnableDefaultEmbeddedResourceItems)' == 'true' "> |
| 34 | + <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(EnableDefaultEmbeddedResourceItems)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
34 | 35 | <MauiXaml Condition=" '$(EnableDefaultXamlItems)' == 'true' " Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
|
35 | 36 | <MauiCss Condition=" '$(EnableDefaultCssItems)' == 'true' " Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
|
36 | 37 | </ItemGroup>
|
|
41 | 42 | -->
|
42 | 43 |
|
43 | 44 | <!-- Android -->
|
44 |
| - <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(MonoAndroidResourcePrefix)' != '' "> |
| 45 | + <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(MonoAndroidResourcePrefix)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
45 | 46 | <AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.xml" />
|
46 | 47 | <AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.axml" />
|
47 | 48 | <AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.png" />
|
|
55 | 56 | </ItemGroup>
|
56 | 57 |
|
57 | 58 | <!-- iOS -->
|
58 |
| - <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' "> |
| 59 | + <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
59 | 60 | <None
|
60 | 61 | Include="$(iOSProjectFolder)Info.plist"
|
61 | 62 | Condition="Exists('$(iOSProjectFolder)Info.plist')"
|
|
90 | 91 | </ItemGroup>
|
91 | 92 |
|
92 | 93 | <!-- MacCatalyst -->
|
93 |
| - <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' "> |
| 94 | + <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
94 | 95 | <None
|
95 | 96 | Include="$(MacCatalystProjectFolder)Info.plist"
|
96 | 97 | Condition="Exists('$(MacCatalystProjectFolder)Info.plist')"
|
|
125 | 126 | </ItemGroup>
|
126 | 127 |
|
127 | 128 | <!-- Windows -->
|
128 |
| - <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' "> |
| 129 | + <ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) "> |
129 | 130 | <Manifest
|
130 | 131 | Include="$(ApplicationManifest)"
|
131 | 132 | Condition="Exists('$(ApplicationManifest)')" />
|
|
0 commit comments