Workaround mismatch type resolving (#7585)
Workaround mismatch type resolving (#7585)

Fixes #
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1448821

Context
Root cause:

csproj requires lots of project properties, for this reason evaluation of project is started because project is considered dirty
however this evaluation throws which causes this project to stay dirty
above exception is somehow ignored by csproj and it proceeds with requesting more project properties each of those starting new evaluation in UI thread causing huge degradation in VS responsiveness
Why it throws?

when MSBuild interprets \src\ConfigData\BuildTargets\Microsoft.DevDiv.BuildDiagCommon.targets line xplat package needs build number in version #119 the type "Microsoft.Build.Framework.ITaskItem[]" is resolved from another already loaded version of Microsoft.Build.Framework assembly.
this causes type check mismatch and that ParameterType is rejected and throws InvalidProjectFileException with "UnsupportedTaskParameterTypeError" message.
Changes Made
If resolving type prefixes with known namespace used for Framework assembly, we load it from it.

Testing
After changes I was not able to reproduce this issue anymore. There is still, about 3s UI delay it this scenario but it is way batter than it used to be.
rainersigwald/msbuild,rainersigwald/msbuild,sean-gilliam/msbuild,AndyGerlicher/msbuild,AndyGerlicher/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,sean-gilliam/msbuild,rainersigwald/msbuild,sean-gilliam/msbuild