diff --git a/SharpSnmpLib/SharpSnmpLib.csproj b/SharpSnmpLib/SharpSnmpLib.csproj
index d4929353..202047ab 100644
--- a/SharpSnmpLib/SharpSnmpLib.csproj
+++ b/SharpSnmpLib/SharpSnmpLib.csproj
@@ -5,7 +5,8 @@
false
false
- true
+ $([System.Text.RegularExpressions.Regex]::Replace($(NETCoreSdkVersion), '-.*', ''))
+ true
net6.0;net471
net471