Skip to content

Commit 7c64a38

Browse files
authored
Clarify example of IsTargetFrameworkCompatible
The examples for IsTargetFrameworkCompatible give two examples of incompatible TFMs, but don't give any examples of compatible TFMs, so it isn't super clear how to use the API. Added a "Value8" example that shows that `net6.0` is compatible with `net8.0`.
1 parent e39feb2 commit 7c64a38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/msbuild/property-functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ The following example shows how these functions are used.
596596
<Value5>$([MSBuild]::IsTargetFrameworkCompatible('net5.0-windows', 'net5.0'))</Value5>
597597
<Value6>$([MSBuild]::IsTargetFrameworkCompatible('net5.0', 'net6.0'))</Value6>
598598
<Value7>$([MSBuild]::IsTargetFrameworkCompatible('net5.0', 'net8.0'))</Value7>
599+
<Value8>$([MSBuild]::IsTargetFrameworkCompatible('net8.0', 'net6.0'))</Value8>
599600
</PropertyGroup>
600601

601602
<Target Name="MyTarget">
@@ -606,6 +607,7 @@ The following example shows how these functions are used.
606607
<Message Text="Value5 = $(Value5)" />
607608
<Message Text="Value6 = $(Value6)" />
608609
<Message Text="Value7 = $(Value7)" />
610+
<Message Text="Value8 = $(Value8)" />
609611
</Target>
610612
</Project>
611613
```
@@ -618,6 +620,7 @@ Value4 = 7.0
618620
Value5 = True
619621
Value6 = False
620622
Value7 = False
623+
Value8 = True
621624
```
622625

623626
::: moniker range=">=vs-2022"

0 commit comments

Comments
 (0)