Tests: Some Windows .NET-related tests assume optional SDKs are installed
The following tests have a sub-case that fails for me on Windows:
RunCMake.include_external_msproject
RunCMake.VsDotnetSdk
RunCMake.VsNugetPackageRestore
The first two fail with the error:
error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
The third one fails with the following error:
error MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
The cause of all three failures is the same. They all assume a specific version of the .NET SDK (4.7.2) is installed. This is not a safe assumption in general, since it depends on what the developer has chosen. In my case, I have 4.6.1 and 4.8, for example.
One way to address this would be to have the tests check whether the expected SDK is available and only enable themselves or skip themselves if it isn't installed. Another would be to modify the tests to not require a specific version (which would be preferable), but I don't know if that's possible.