The .NET 8 SDK installer recommends Visual Studio 17.7 when it should recommend 17.8
danroth27 opened this issue · 8 comments
We bumped the minimum VS Version to 17.7.0 in time for RC1 which suggests that this value was intentional, but our giant table of compatibility versions indeed says that 17.8 should be the minimum. @marcpopMSFT do we need to bump this? I thought I remembered that this was tied to enforcement in VS as well - we wanted to keep N-1 VS versions able to open/target .NET 8 projects to at least some degree (even if they may not have full functionality).
https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#targeting-and-support-rules says .NET SDK 8.0.100 with Visual Studio 17.7 is OK for targeting .NET 7.0 but not for targeting .NET 8.0.
The text in the installer is "If you plan to use .NET 8.0 with Visual Studio", which I understand as meaning "If you want to target .NET 8.0", because it does not say "use .NET SDK". So this looks like it should be bumped to Visual Studio 17.8, if the table in the docs is correct.
You're right @KalleOlaviNiemitalo - this is also a change from the 6.0.100 and 7.0.100 installers which mentioned 17.0 and 17.4 respectively. If we're going to automate this part of the process we may need a slightly different signal to drive this message.
Here's an example of user that was recently tripped up by trying to build their first Blazor app using .NET 8 and 17.7: dotnet/core#8893
@danroth27 we should be erroring at build time when targeting net8.0 with 17.7. Is that not happening?
Here's a potential fix for this. I had to trim the version number down to a two-part as the msbuild logic wouldn't update the minor version with a three-part. I also configured it to only apply to the 100 release as we should update the minimum version to 17.8 in 8.0.2xx. I also specified only to do that for stable versions (ie GA) rather than previews so as not to confuse things during previews.
#17761
we should be erroring at build time when targeting net8.0 with 17.7. Is that not happening?
@marcpopMSFT The user had enabled support for preview .NET SDKs in 17.7.
Per offline conversation, there should be a warning starting in RC2: https://github.com/dotnet/sdk/blob/release/8.0.1xx/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets#L132
We updated the logic that drives this and should deliver a fix in the next servicing release. Thanks all!