Skip to content

Commit 6eddc9b

Browse files
authored
Merge pull request #860 from dotnet/fix828
Allow use of `NBGV_SetMauiVersionProperties` to suppress new behavior
2 parents 981ef2a + d700fe2 commit 6eddc9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Nerdbank.GitVersioning.Tasks/build/Nerdbank.GitVersioning.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@
219219
<RazorCompile Include="$(VersionSourceFile)" />
220220
</ItemGroup>
221221
</Target>
222-
222+
223223
<!-- Support for Maui projects -->
224224

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

249249
<Target Name="NBGV_SetVersionForMauiIOS"
250-
Condition="'$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst'"
250+
Condition="'$(NBGV_SetMauiVersionProperties)'!='false' and ('$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'maccatalyst')"
251251
BeforeTargets="_CompileAppManifest"
252252
DependsOnTargets="GetBuildVersion">
253253
<PropertyGroup>
@@ -259,7 +259,7 @@
259259
</Target>
260260

261261
<Target Name="NBGV_SetVersionForMauiWindows"
262-
Condition="'$(TargetPlatformIdentifier)' == 'windows'"
262+
Condition="'$(NBGV_SetMauiVersionProperties)'!='false' and '$(TargetPlatformIdentifier)' == 'windows'"
263263
BeforeTargets="MauiGeneratePackageAppxManifest"
264264
DependsOnTargets="GetBuildVersion">
265265
<PropertyGroup>

0 commit comments

Comments
 (0)