microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
454 stars 81 forks source link

RunVSTest: Allow overriding the ToolExe/ToolPath #548

Closed dfederm closed 6 months ago

dfederm commented 6 months ago

The ToolTask has built-in parameters for ToolExe/ToolPath which allow callers to override the tool being called. This lights those up for the RunVSTestTask

There's also a minor change to avoid using an undefined %VSINSTALLDIR% and instead fallback to looking in the PATH (behavior when returning a filename from GenerateFullPathToTool).

Reference to relevant ToolTask logic: https://github.com/dotnet/msbuild/blob/7ca3c98fad986066bbf2802c863236b4a0f4e34a/src/Utilities/ToolTask.cs#L503-L566