Okay, you need to specify the exact folder name for the .net sdk in TargetFramework. If you use the one generated by Visual Studio (like just "net8.0") it won't work. Thank you Microsoft.