C
C#14mo ago
ggppjj

Trying to use .Net 7 SDK in VS2022 17.8 Preview 2

Hello! I'm incredibly confused, I'm trying to build a .Net7 sdk app in vs2022 17.8 preview 2 and it keeps trying to build it with the .Net 8 preview SDK that apparently is installed by VS2022. I removed the preview SDK standalone from my computer, and ensure the project is targeting .Net 7 explicitly in the properties, but VS2022 keeps trying to compile it with .Net 8 SDK. I think this is an issue stopping me from using the Maui Community MVVM Toolkit.
1 Reply
ggppjj
ggppjjOP14mo ago
I'm using the maui app accelerator template:
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
Fixed it by creating a globaljson that specified the SDK version and then installing the required workloads in the cli.
Want results from more Discord servers?
Add your server