diff --git a/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets b/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets
index f688ecb8098..5bc09160921 100644
--- a/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets
+++ b/src/StrawberryShake/MetaPackages/Common/MSBuild/StrawberryShake.targets
@@ -42,17 +42,19 @@
6
7
8
+ 9
+ Text="The Strawberry Shake code generation requires .NET SDK 6, .NET SDK 7, .NET SDK 8, or .NET SDK 9 to work."
+ Condition="'$(DotNetMajor)' != '6' AND '$(DotNetMajor)' != '7' AND '$(DotNetMajor)' != '8' AND '$(DotNetMajor)' != '9'" />
$(MSBuildProjectDirectory)\$(GraphQLPersistedOperationOutput.TrimEnd('/').TrimEnd('\'))
$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net6", "dotnet-graphql.dll"))
$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net7", "dotnet-graphql.dll"))
$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net8", "dotnet-graphql.dll"))
+ $([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "..", "tools", "net9", "dotnet-graphql.dll"))