1 write to Value
Microsoft.DotNet.InternalAbstractions (1)
FilePath.cs (1)
21Value = value;
123 references to Value
dotnet (70)
BuildServer\BuildServerProvider.cs (1)
94path.Value,
BuildServer\RazorPidFile.cs (1)
28path.Value,
BuildServer\RazorServer.cs (4)
27if (!_fileSystem.File.Exists(PidFile.ServerPath.Value)) 39PidFile.ServerPath.Value, 66if (_fileSystem.File.Exists(PidFile.Path.Value)) 68_fileSystem.File.Delete(PidFile.Path.Value);
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (2)
89if (!_fileSystem.File.Exists(toolCommand.Executable.Value)) 95return ToolCommandSpecCreator.CreateToolCommandSpec(toolCommand.Name.Value, toolCommand.Executable.Value, toolCommand.Runner,
Commands\Tool\Execute\ToolExecuteCommand.cs (1)
135var commandSpec = ToolCommandSpecCreator.CreateToolCommandSpec(toolPackage.Command.Name.Value, toolPackage.Command.Executable.Value, toolPackage.Command.Runner, _allowRollForward, _forwardArguments);
Commands\Tool\Install\ProjectRestorer.cs (4)
25List<string> argsToPassToRestore = [project.Value]; 29argsToPassToRestore.Add(packageLocation.NugetConfig.Value.Value); 81if (line.StartsWith($"{project.Value} : ", StringComparison.OrdinalIgnoreCase)) 83line = line.Substring(project.Value.Length + 3);
Commands\Tool\Install\ToolInstallLocalCommand.cs (4)
132manifestFile.Value) 143manifestFile.Value)); 158manifestFile.Value).Green()); 190manifestFile.Value).Green());
Commands\Tool\List\ToolListLocalCommand.cs (2)
86p => p.SourceManifest.Value); 99Manifest = p.SourceManifest.Value
Commands\Tool\Restore\ToolPackageRestorer.cs (1)
129&& _fileSystem.File.Exists(toolCommand.Executable.Value);
Commands\Tool\Uninstall\ToolUninstallLocalCommand.cs (1)
65manifestFile.Value).Green());
NugetPackageDownloader\FirstPartyNuGetPackageSigningVerifier.cs (2)
47using (var packageReader = new PackageArchiveReader(nupkgToVerify.Value)) 81var args = new[] { "verify", "--all", nupkgToVerify.Value };
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
381string nugetConfigFileName = Path.GetFileName(packageSourceLocation.NugetConfig.Value.Value);
ShellShim\AppHostShimMaker.cs (2)
32var appHostDestinationFilePath = Path.GetFullPath(shimPath.Value); 33string entryPointFullPath = Path.GetFullPath(entryPoint.Value);
ShellShim\ShellShimRepository.cs (14)
26if (string.IsNullOrEmpty(toolCommand.Executable.Value)) 53_fileSystem.File.Copy(packagedShim.Value.Value, GetShimPath(toolCommand).Value); 54_filePermissionSetter.SetUserExecutionPermission(GetShimPath(toolCommand).Value); 65var shimPath = GetShimPath(toolCommand).Value; 66string relativePathToExe = Path.GetRelativePath(_shimsDirectory.Value, toolCommand.Executable.Value); 109foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.Value))) 111File.Delete(file.Value); 124foreach (var file in GetShimFiles(toolCommand).Where(f => _fileSystem.File.Exists(f.Value))) 127FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(file.Value, tempPath)); 128files[file.Value] = tempPath; 170return GetShimFiles(toolCommand).Any(p => _fileSystem.File.Exists(p.Value)); 206FilePath[] candidatepackagedShim = [.. packagedShims.Where(s => string.Equals(Path.GetFileName(s.Value), Path.GetFileName(GetShimPath(toolCommand).Value)))];
ToolManifest\ToolManifestEditor.cs (12)
53_fileSystem.File.WriteAllText(manifest.Value, deserializedManifest.ToJson()); 61manifest.Value, 76_fileSystem.File.WriteAllText(manifest.Value, deserializedManifest.ToJson()); 106throw new ArgumentException($"Manifest {manifest.Value} does not contain package id '{packageId}'."); 109_fileSystem.File.WriteAllText(manifest.Value, deserializedManifest.ToJson()); 115if (_dangerousFileDetector.IsDangerous(manifest.Value)) 118string.Format(CliStrings.ManifestHasMarkOfTheWeb, manifest.Value)); 138using (Stream jsonStream = _fileSystem.File.OpenRead(possibleManifest.Value)) 219possibleManifest.Value, e.Message)); 235errors.Add(string.Format(CliStrings.ManifestMissingIsRoot, path.Value)); 302path.Value, 431manifest.Value,
ToolManifest\ToolManifestFinder.cs (9)
44throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, allPossibleManifests.Select(f => "\t" + f.manifestfile.Value)))); 72if (!_fileSystem.File.Exists(possibleManifest.Value)) 106if (!_fileSystem.File.Exists(possibleManifest.Value)) 138if (!_fileSystem.File.Exists(possibleManifest.Value)) 197if (_fileSystem.File.Exists(possibleManifest.Value)) 210throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.Value)))); 233|| _fileSystem.File.Exists(currentSearchDirectory.Value.WithFile(".git").Value)) 279if (_fileSystem.File.Exists(possibleManifest.Value)) 297throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.Value))));
ToolPackage\LocalToolsResolverCache.cs (2)
109return _cacheVersionedDirectory.WithFile(packageId.ToString()).Value; 128PathToExecutable = toolCommand.Executable.Value
ToolPackage\ToolCommand.cs (1)
24return $"ToolCommandName: {Name.Value} - Runner: {Runner} - FilePath: {Executable.Value}";
ToolPackage\ToolPackageDownloaderBase.cs (1)
380var runtimeConfigFilePath = Path.ChangeExtension(toolPackageInstance.Command.Executable.Value, ".runtimeconfig.json");
ToolPackage\ToolPackageInstance.cs (5)
55bool usingRidSpecificPackage = _fileSystem.File.Exists(assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).Value); 60resolvedAssetsFileNameFullPath = assetsJsonParentDirectory.WithFile(RidSpecificPackageAssetsFileName).Value; 64resolvedAssetsFileNameFullPath = assetsJsonParentDirectory.WithFile(AssetsFileName).Value; 166var lockFile = new LockFileFormat().Read(assetsJsonParentDirectory.WithFile(AssetsFileName).Value); 190var configuration = ToolConfigurationDeserializer.Deserialize(toolConfigurationPath.Value, fileSystem);
dotnet.Tests (25)
BuildServerTests\BuildServerProviderTests.cs (2)
131razorServer.PidFile.Path.Value.Should().Be(pidFilePath); 133razorServer.PidFile.ServerPath.Value.Should().Be(serverPath);
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (9)
49commandPath.Should().Be(fakeExecutable.Value); 68commandPath.Should().Be(fakeExecutable.Value); 94_fileSystem.File.CreateEmptyFile(fakeExecutable.Value); 127_fileSystem.File.CreateEmptyFile(fakeExecutable.Value); 145_fileSystem.File.Delete(fakeExecutable.Value); 191_fileSystem.File.CreateEmptyFile(fakeExecutableA.Value); 192_fileSystem.File.CreateEmptyFile(fakeExecutableDotnetA.Value); 220}).Args!.Trim('"').Should().Be(fakeExecutableA.Value); 225}).Args!.Trim('"').Should().Be(fakeExecutableDotnetA.Value);
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (2)
425_fileSystem.File.Exists(restoredCommand.Executable.Value); 570_fileSystem.File.Exists(restoredCommand.Executable.Value);
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (2)
146_fileSystem.File.Exists(restoredCommand.Executable.Value) 147.Should().BeTrue($"Cached command should be found at {restoredCommand.Executable.Value}");
CommandTests\Tool\Run\ToolRunCommandTests.cs (3)
43result.Args.Should().ContainAll("--roll-forward", "Major", fakeExecutable.Value); 63result.Args.Should().Contain(fakeExecutable.Value); 81fileSystem.File.CreateEmptyFile(fakeExecutable.Value);
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
425_fileSystem.File.Exists(restoredCommand.Executable.Value).Should().BeTrue();
ToolManifestTests\ToolManifestFinderTests.cs (6)
702toolmanifestFilePath.Value.Should().Be(manifestPath); 718toolmanifestFilePath.Value.Should().Be(manifestPath); 749.SourceManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, "sub", _manifestFilename)); 752.SourceManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, _manifestFilename)); 755.SourceManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, "sub", _manifestFilename)); 778createdManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, "dotnet-tools.json"));
Microsoft.DotNet.Configurer (2)
FileSentinel.cs (2)
26return _fileSystem.File.Exists(_file.Value); 31_fileSystem.CreateIfNotExists(_file.Value);
Microsoft.DotNet.InternalAbstractions (2)
FilePath.cs (2)
26return Value; 31return new DirectoryPath(Path.GetDirectoryName(Value)!);
Microsoft.DotNet.PackageInstall.Tests (16)
NuGetPackageInstallerExtractTests.cs (1)
60result.First().Value.Should().Be("/ExtractedPackage/tools/Darwin/mono",
NuGetPackageInstallerTests.cs (1)
361fileSystem.File.WriteAllText(filePath.Value.Value, FormatNuGetConfig(
ToolPackageDownloaderTests.cs (7)
124.WithFile("project.assets.json").Value; 815fileSystem.File.Exists(package.Command.Executable.Value).Should().BeTrue($"{package.Command.Executable.Value} should exist"); 845fileSystem.File.Exists(package.Command.Executable.Value).Should() 846.BeTrue($"{package.Command.Executable.Value} should exist"); 847package.Command.Executable.Value.Should().Contain(store.Root.Value); 931fileSystem.File.WriteAllText(filePath.Value.Value, FormatNuGetConfig(
ToolPackageInstallerNugetCacheTests.cs (5)
52command.Executable.Value.Should().StartWith(expectedPackagesFolder); 55.Exists(command.Executable.Value) 56.Should().BeTrue($"{command.Executable.Value} should exist"); 92command.Executable.Value.Should().StartWith(expectedPackagesFolder); 103Uri = nugetConfig.Value,
ToolPackageUninstallerTests.cs (2)
40package.PackagedShims.Should().ContainSingle(f => f.Value.Contains("demo.exe") || f.Value.Contains("demo"));
Microsoft.DotNet.Tools.Tests.ComponentMocks (8)
AppHostShellShimMakerMock.cs (2)
26ExecutablePath = entryPoint.Value 30shimPath.Value,
ToolPackageDownloaderMock.cs (6)
147_toolDownloadDir.WithFile("project.assets.json").Value, 150_toolDownloadDir.WithFile(FakeCommandSettingsFileName).Value, 174_fileSystem.File.CreateEmptyFile(executable.Value); 280_fileSystem.File.Exists(possibleNugetConfig.Value)); 287&& feed.Uri == probedNugetConfig.Value); 309|| (f.Type == MockFeedType.ExplicitNugetConfig && f.Uri == nugetConfig.Value);