Skip to content

Commit 93c4855

Browse files
authored
Only do version check on applications
1 parent 4169640 commit 93c4855

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@
274274
The major version must not exceed 124 to guarantee that the overall integer never exceeds 2100000000 even with the other numbers added.
275275
Other components are also limited since they must fit within the 8 or 16 bits allowed for them.
276276
Learn more from https://developer.android.com/studio/publish/versioning. -->
277-
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Major) &gt; 124" Text="Major version must not exceed 124 per Android versioning rules." />
278-
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Minor) &gt; 255" Text="Minor version must not exceed 256 per Android versioning rules." />
279-
<Error Condition="$(BuildNumber) &gt; 65535" Text="Build number must not exceed 65535 per Android versioning rules." />
277+
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Major) &gt; 124 AND '$(OutputType)'=='Exe'" Text="Major version must not exceed 124 per Android versioning rules." />
278+
<Error Condition="$([System.Version]::Parse('$(BuildVersion)').Minor) &gt; 255 AND '$(OutputType)'=='Exe'" Text="Minor version must not exceed 256 per Android versioning rules." />
279+
<Error Condition="$(BuildNumber) &gt; 65535 AND '$(OutputType)'=='Exe'" Text="Build number must not exceed 65535 per Android versioning rules." />
280280
<PropertyGroup>
281281
<_NBGV_Major_Shifted>$([MSBuild]::Multiply($([System.Version]::Parse('$(BuildVersion)').Major), 16777216))</_NBGV_Major_Shifted>
282282
<_NBGV_Minor_Shifted>$([MSBuild]::Multiply($([System.Version]::Parse('$(BuildVersion)').Minor), 65536))</_NBGV_Minor_Shifted>

0 commit comments

Comments
 (0)