diff --git a/source/TestFramework/Assert.cs b/source/TestFramework/Assert.cs
index b7961be..e226e5d 100644
--- a/source/TestFramework/Assert.cs
+++ b/source/TestFramework/Assert.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
+using System.Runtime.CompilerServices;
using TestFrameworkShared;
namespace nanoFramework.TestFramework
@@ -54,9 +55,7 @@ public static void SkipTest(string message = "")
/// The condition the test expects to be true.
/// The message to include in the exception when condition is false. The message is shown in test results.
/// Thrown if condition is .
- public static void IsTrue(
- bool condition,
- string message = "")
+ public static void IsTrue(bool condition, [CallerArgumentExpression(nameof(condition))] string message = "")
{
if (!condition)
{
@@ -83,9 +82,7 @@ public static void True(
/// The condition the test expects to be false.
/// The message to include in the exception when condition is true. The message is shown in test results.
/// Thrown if condition is .
- public static void IsFalse(
- bool condition,
- string message = "")
+ public static void IsFalse(bool condition, [CallerArgumentExpression(nameof(condition))] string message = "")
{
if (condition)
{
diff --git a/source/TestFramework/nanoFramework.TestFramework.nfproj b/source/TestFramework/nanoFramework.TestFramework.nfproj
index c8ae8e8..732f2bb 100644
--- a/source/TestFramework/nanoFramework.TestFramework.nfproj
+++ b/source/TestFramework/nanoFramework.TestFramework.nfproj
@@ -18,6 +18,7 @@
v1.0
true
true
+ default
true