25 writes to ToolPath
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
CscTests.cs (3)
467csc.ToolPath = ""; 484csc.ToolPath = Path.Combine("path", "to", "custom_csc"); 491csc.ToolPath = Path.Combine("path", "to", "custom_csc");
Microsoft.Build.Tasks.Core (2)
AxReference.cs (1)
79axImp.ToolPath = ToolPath;
TlbReference.cs (1)
164ToolPath = ToolPath,
Microsoft.Build.Tasks.UnitTests (16)
AxTlbBaseTask_Tests.cs (5)
54t.ToolPath = Path.GetTempPath(); 137t.ToolPath = Path.GetTempPath(); 243t.ToolPath = badParameterValue; 249t.ToolPath = goodParameterValue; 278t.ToolPath = Path.GetTempPath();
ResourceHandling\ResGen_Tests.cs (10)
43t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Version45)); 99t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Version45)); 117t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Version45)); 170t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Latest)); 192t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Latest)); 330t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Latest)); 387t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Latest)); 443t.ToolPath = badParameterValue; 449t.ToolPath = goodParameterValue; 473t.ToolPath = Path.GetDirectoryName(ToolLocationHelper.GetPathToDotNetFrameworkSdkFile("resgen.exe", TargetDotNetFrameworkVersion.Latest));
TlbImp_Tests.cs (1)
276t.ToolPath = Path.GetTempPath();
Microsoft.Build.Utilities.UnitTests (3)
ToolTask_Tests.cs (3)
132t.ToolPath = NativeMethodsShared.IsWindows ? @"C:\MyAlternatePath" : "/MyAlternatePath"; 148t.ToolPath = NativeMethodsShared.IsWindows ? @"C:\MyAlternatePath" : "/MyAlternatePath"; 424t.ToolPath = systemPath;
Microsoft.DotNet.Build.Tasks.Workloads (1)
Wix\WixToolTaskBase.cs (1)
51ToolPath = wixToolsetPath;
34 references to ToolPath
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (2)
55protected bool UsingBuiltinTool => string.IsNullOrEmpty(ToolPath) && (ToolExe == ToolName || ToolExe == AppHostToolName); 164return Path.Combine(ToolPath ?? "", ToolExe);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (2)
55protected bool UsingBuiltinTool => string.IsNullOrEmpty(ToolPath) && (ToolExe == ToolName || ToolExe == AppHostToolName); 164return Path.Combine(ToolPath ?? "", ToolExe);
Microsoft.Build.Tasks.Core (8)
AxTlbBaseTask.cs (3)
128if ((String.IsNullOrEmpty(ToolPath) || !FileSystems.Default.DirectoryExists(ToolPath)) && 131Log.LogErrorWithCodeFromResources("AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", SdkToolsPath ?? "", ToolPath ?? "");
ResGen.cs (5)
442if ((String.IsNullOrEmpty(ToolPath) || !FileSystems.Default.DirectoryExists(ToolPath)) && 445Log.LogErrorWithCodeFromResources("ResGen.SdkOrToolPathNotSpecifiedOrInvalid", SdkToolsPath ?? "", ToolPath ?? ""); 506if (ToolPath != null) 508pathToTool = Path.Combine(ToolPath, ToolExe);
Microsoft.Build.Tasks.UnitTests (18)
AxTlbBaseTask_Tests.cs (9)
207Utilities.ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 211Utilities.ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 222string sdkToolsPathMessage = t.Log.FormatResourceString("AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 240Assert.Null(t.ToolPath); // "ToolPath should be null by default" 241Utilities.ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 244Assert.Equal(badParameterValue, t.ToolPath); // "New ToolPath value should be set" 245Utilities.ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 251Assert.Equal(goodParameterValue, t.ToolPath); // "New ToolPath value should be set" 256string toolPathMessage = t.Log.FormatResourceString("AxTlbBaseTask.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath);
ResourceHandling\ResGen_Tests.cs (9)
349ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 353ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 365string sdkToolsPathMessage = t.Log.FormatResourceString("ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 440Assert.Null(t.ToolPath); // "ToolPath should be null by default" 441ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 444Assert.Equal(badParameterValue, t.ToolPath); // "New ToolPath value should be set" 445ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath); 451Assert.Equal(goodParameterValue, t.ToolPath); // "New ToolPath value should be set" 457string toolPathMessage = t.Log.FormatResourceString("ResGen.SdkOrToolPathNotSpecifiedOrInvalid", t.SdkToolsPath, t.ToolPath);
Microsoft.Build.Utilities.Core (3)
ToolTask.cs (3)
526if (!string.IsNullOrEmpty(ToolPath)) 529pathToTool = Path.Combine(ToolPath, ToolExe); 532if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.FileExists(pathToTool)))
Microsoft.DotNet.Build.Tasks.Workloads (1)
Wix\WixToolTaskBase.cs (1)
78protected override string GenerateFullPathToTool() => ToolPath;