Skip to content

Commit

Permalink
Add a condition to skip the AutoImport.props (#11668)
Browse files Browse the repository at this point in the history
Adding '$(_MauiSkipSdkAutoImport)' != 'true' so that the imports can be skipped

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
  • Loading branch information
github-actions[bot] and mattleibow committed Nov 25, 2022
1 parent 65486fb commit 05bc956
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Workload/Microsoft.Maui.Sdk/Sdk/AutoImport.in.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</MauiXaml>
</ItemDefinitionGroup>

<ItemGroup Condition=" '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') and '$(TargetFrameworkVersion)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') and '$(TargetFrameworkVersion)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<!-- %(Sdk) is only here if something later needs to identify these -->
<Using Include="Microsoft.Extensions.DependencyInjection" Sdk="Maui" />
<Using Include="Microsoft.Maui" Sdk="Maui" />
Expand All @@ -31,7 +31,7 @@
</ItemGroup>

<!-- Default .NET MAUI files-->
<ItemGroup Condition=" '$(UseMaui)' == 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(EnableDefaultEmbeddedResourceItems)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(UseMaui)' == 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(EnableDefaultEmbeddedResourceItems)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<MauiXaml Condition=" '$(EnableDefaultXamlItems)' == 'true' " Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
<MauiCss Condition=" '$(EnableDefaultCssItems)' == 'true' " Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
</ItemGroup>
Expand All @@ -42,7 +42,7 @@
-->

<!-- Android -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(MonoAndroidResourcePrefix)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'android' and '$(MonoAndroidResourcePrefix)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.xml" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.axml" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)/*/*.png" />
Expand All @@ -56,7 +56,7 @@
</ItemGroup>

<!-- iOS -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'ios' and '$(iOSProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<None
Include="$(iOSProjectFolder)Info.plist"
Condition="Exists('$(iOSProjectFolder)Info.plist')"
Expand Down Expand Up @@ -91,7 +91,7 @@
</ItemGroup>

<!-- MacCatalyst -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'maccatalyst' and '$(MacCatalystProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<None
Include="$(MacCatalystProjectFolder)Info.plist"
Condition="Exists('$(MacCatalystProjectFolder)Info.plist')"
Expand Down Expand Up @@ -126,7 +126,7 @@
</ItemGroup>

<!-- Windows -->
<ItemGroup Condition=" '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<ItemGroup Condition=" '$(_MauiSkipSdkAutoImport)' != 'true' and '$(EnableDefaultMauiItems)' == 'true' and '$(SingleProject)' == 'true' and '$(TargetPlatformIdentifier)' == 'windows' and '$(WindowsProjectFolder)' != '' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@MAUI_DOTNET_VERSION@')) ">
<Manifest
Include="$(ApplicationManifest)"
Condition="Exists('$(ApplicationManifest)')" />
Expand Down

0 comments on commit 05bc956

Please sign in to comment.