Skip to content

Commit

Permalink
Merge pull request #860 from dotnet/fix828
Browse files Browse the repository at this point in the history
Allow use of `NBGV_SetMauiVersionProperties` to suppress new behavior
  • Loading branch information
AArnott committed Nov 9, 2022
2 parents 981ef2a + d700fe2 commit 6eddc9b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@
<RazorCompile Include="$(VersionSourceFile)" />
</ItemGroup>
</Target>

<!-- Support for Maui projects -->

<Target Name="NBGV_SetVersionForMauiAndroid"
Condition="'$(TargetPlatformIdentifier)' == 'android'"
Condition="'$(NBGV_SetMauiVersionProperties)'!='false' and '$(TargetPlatformIdentifier)' == 'android'"
BeforeTargets="_GetAndroidPackageName"
DependsOnTargets="GetBuildVersion">
<!-- Android requirement: ApplicationVersion must be a positive integer (used as an internal version number)
Expand All @@ -247,7 +247,7 @@
</Target>

<Target Name="NBGV_SetVersionForMauiIOS"
Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst'"
Condition="'$(NBGV_SetMauiVersionProperties)'!='false' and ('$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst')"
BeforeTargets="_CompileAppManifest"
DependsOnTargets="GetBuildVersion">
<PropertyGroup>
Expand All @@ -259,7 +259,7 @@
</Target>

<Target Name="NBGV_SetVersionForMauiWindows"
Condition="'$(TargetPlatformIdentifier)' == 'windows'"
Condition="'$(NBGV_SetMauiVersionProperties)'!='false' and '$(TargetPlatformIdentifier)' == 'windows'"
BeforeTargets="MauiGeneratePackageAppxManifest"
DependsOnTargets="GetBuildVersion">
<PropertyGroup>
Expand Down

0 comments on commit 6eddc9b

Please sign in to comment.