dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.21k stars 1.35k forks source link

Add Regression Test for NugetSDKResolver Throwing #7049

Open benvillalobos opened 2 years ago

benvillalobos commented 2 years ago

Origin story: https://github.com/dotnet/msbuild/issues/7035

Context

When we took the fix to throw when sdkresolvers throw, it revealed the nugetsdkresolver was throwing often. That should have been caught by a regression test, so we should add one.

jeffkl commented 2 years ago

I would make this more broad, and just make sure we have a unit test that does an evaluation of an in-memory project like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework="netstandard2.0" />
  </PropertyGroup>
</Project>

The unit test should use the bootstrapped MSBuild to ensure that existing SDK resolvers are being used including the .NET SDK resolver and the NuGet SDK resolver. This ensures that behavior changes in how SDKs are resolved will surface before we ship.

SergejMuhic commented 2 years ago

Any progress on this? I am a bit worries to see that it only made it into milestone 17.2.