124 references to GetRandomFileName
aspire (2)
Caching\AppHostInfoDiskCache.cs (1)
218tempPath = Path.Combine(_cacheDirectory.FullName, $"{Path.GetRandomFileName()}.tmp");
Telemetry\InternalMicrosoftDetector.cs (1)
338var tempPath = Path.Combine(directory, $"{Path.GetRandomFileName()}.tmp");
Aspire.Cli.EndToEnd.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Cli.Tests (14)
Commands\AgentTelemetryCommandTests.cs (8)
25options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 57options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 87options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 120options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 146options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 173options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 240options.TelemetryFactory = _ => TestTelemetryHelper.CreateInitializedTelemetry(reportedSourceName, $"Diag.{Path.GetRandomFileName()}"); 259reportedSourceName = $"Test.{Path.GetRandomFileName()}";
Telemetry\AspireCliTelemetryTests.cs (1)
161var otherSourceName = $"Test.{Path.GetRandomFileName()}";
Telemetry\CliTagEnrichmentProcessorTests.cs (2)
20using var source = new ActivitySource($"Test.{Path.GetRandomFileName()}"); 65using var source = new ActivitySource($"Test.{Path.GetRandomFileName()}");
Telemetry\TelemetryFixture.cs (2)
38ReportedSourceName = $"Test.{Path.GetRandomFileName()}"; 39DiagnosticsSourceName = $"Test.{Path.GetRandomFileName()}";
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Dashboard.Components.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Dashboard.Tests (3)
Integration\StartupTests.cs (2)
213var configFilePath = Path.Combine(tempDirectory.FullName, Path.GetRandomFileName()); 635var configFilePath = Path.Combine(tempDirectory.FullName, Path.GetRandomFileName());
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Deployment.EndToEnd.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Hosting.Blazor.Tests (1)
tests\Shared\TestFileSystemService.cs (1)
35var resolvedName = fileName ?? System.IO.Path.GetRandomFileName();
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Hosting.RemoteHost.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Hosting.Sdk.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Hosting.Tests (4)
Schema\SchemaTests.cs (3)
60var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName()); 72var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName()); 90var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
tests\Shared\TestFileSystemService.cs (1)
35var resolvedName = fileName ?? System.IO.Path.GetRandomFileName();
Aspire.Hosting.TestUtilities (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Managed.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Aspire.Templates.Tests (1)
TemplateTestsBase.cs (1)
265=> (prefix is null ? "" : $"{prefix}_") + FixupSymbolName(Path.GetRandomFileName());
Aspire.TerminalHost.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
dotnet (6)
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (1)
331var tempDepsFile = Path.Combine(TemporaryDirectory.CreateSubdirectory(), Path.GetRandomFileName());
Commands\Run\RunCommand.cs (1)
874string directory = VirtualProjectBuilder.GetTempSubpath(Path.GetRandomFileName());
Commands\Workload\Install\WorkloadInstallerFactory.cs (1)
102var testPath = Path.Combine(dotnetDir, "metadata", Path.GetRandomFileName());
SdkVulnerability\SdkReleaseMetadataCache.cs (1)
157var tempPath = Path.Combine(_cacheDirectory, Path.GetRandomFileName());
ShellShim\ShellShimRepository.cs (1)
126var tempPath = Path.Combine(_fileSystem.Directory.CreateTemporarySubdirectory(), Path.GetRandomFileName());
ToolPackage\ToolPackageStoreAndQuery.cs (1)
21return Root.WithSubDirectories(StagingDirectory, Path.GetRandomFileName());
dotnet-aot (1)
src\sdk\src\Cli\dotnet\SdkVulnerability\SdkReleaseMetadataCache.cs (1)
157var tempPath = Path.Combine(_cacheDirectory, Path.GetRandomFileName());
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.CodeDom\Compiler\TempFiles.cs (1)
307string randomFileName = Path.GetFileNameWithoutExtension(Path.GetRandomFileName());
dotnet-user-jwts (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
57var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 141var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
dotnet-user-secrets (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
57var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 141var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Infrastructure.Tests (9)
Pipelines\NpmCliPackageTests.cs (4)
180var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js"); 220var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js"); 506var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName()); 571var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
PowerShellScripts\DownloadNativeArchivesTests.cs (1)
424var unique = Path.GetRandomFileName();
PowerShellScripts\StageNativeCliToolPackagesTests.cs (2)
303var path = Path.Combine(_workspace.Path, Path.GetRandomFileName(), "download"); 310return Path.Combine(_workspace.Path, Path.GetRandomFileName(), "shipping");
PowerShellScripts\ValidateNpmPackageSignaturesTests.cs (1)
213var unique = Path.GetRandomFileName();
tests\Shared\TemporaryWorkspace.cs (1)
220var workspaceDirectory = parentDir.CreateSubdirectory(IOPath.GetRandomFileName());
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
339var assemblyName = Path.GetRandomFileName();
Microsoft.Build (1)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
403new ProjectImportsCollector(Path.GetRandomFileName(), false, runOnBackground: false);
Microsoft.Build.Tasks.Core (1)
FileIO\WriteLinesToFile.cs (1)
179temporaryFilePath = Path.Combine(directoryPath, Path.GetRandomFileName() + "~");
Microsoft.DotNet.Build.Tasks.Installers (3)
src\CreateWixBuildWixpack.cs (3)
179var randomDirName = Path.GetRandomFileName(); 201var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 1054string wixpackSubfolder = Path.GetRandomFileName();
Microsoft.DotNet.Build.Tasks.Workloads (2)
Swix\ComponentSwixProject.cs (1)
19SourcePath = Path.Combine(SourcePath, $"{component.SdkFeatureBand}", $"{Path.GetRandomFileName()}");
WorkloadPackageBase.cs (1)
210DestinationDirectory = Path.Combine(destinationBaseDirectory, Path.GetRandomFileName());
Microsoft.DotNet.MacOsPkg.Core (2)
Package.cs (2)
64string tempDest = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 183string tempDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.DotNet.XliffTasks (1)
Model\Document.cs (1)
70string tempPath = Path.Combine(Path.GetDirectoryName(path), Path.GetRandomFileName());
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
ResultsTests.cs (1)
31Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()),
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (15)
AzureStorage\AzureResponseCacheTests.cs (1)
35_dirClient = _fsClient?.GetDirectoryClient(Path.GetRandomFileName());
AzureStorage\AzureResultStoreTests.cs (1)
35_dirClient = _fsClient?.GetDirectoryClient(Path.GetRandomFileName());
DiskBased\DiskBasedResponseCacheTests.cs (1)
19string path = Path.Combine(Path.GetTempPath(), "M.E.AI.Eval.ResponseCacheTests", Path.GetRandomFileName());
DiskBased\DiskBasedResultStoreTests.cs (1)
19string path = Path.Combine(Path.GetTempPath(), "M.E.AI.Eval.ResultStoreTests", Path.GetRandomFileName());
DiskBased\PathValidationTests.cs (2)
202string storagePath = Path.Combine(Path.GetTempPath(), "M.E.AI.Eval.PathTests", Path.GetRandomFileName()); 230string storagePath = Path.Combine(Path.GetTempPath(), "M.E.AI.Eval.PathTests", Path.GetRandomFileName());
ResultStoreTester.cs (9)
72string newExecutionName = $"Test Execution {Path.GetRandomFileName()}"; 111string firstExecutionName = $"Test Execution {Path.GetRandomFileName()}"; 121string secondExecutionName = $"Test Execution {Path.GetRandomFileName()}"; 131string thirdExecutionName = $"Test Execution {Path.GetRandomFileName()}"; 155string executionName = $"Test Execution {Path.GetRandomFileName()}"; 179string executionName0 = $"Test Execution {Path.GetRandomFileName()}"; 180string executionName1 = $"Test Execution {Path.GetRandomFileName()}"; 214string executionName = $"Test Execution {Path.GetRandomFileName()}"; 249string executionName = $"Test Execution {Path.GetRandomFileName()}";
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
106string inputFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.Extensions.DataIngestion.Tests (2)
Readers\DocumentReaderConformanceTests.cs (1)
192FileInfo file = new(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + extension));
Readers\MarkItDownMcpReaderTests.cs (1)
45var nonExistentFile = new FileInfo(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
Microsoft.ML.AutoML (1)
Experiment\Experiment.cs (1)
230var experimentDirFullPath = Path.Combine(tempDirectory, cacheDirectoryName, $"experiment_{Path.GetRandomFileName()}");
Microsoft.ML.AutoML.Tests (1)
TrialResultManagerTest.cs (1)
53var tempFilePath = Path.Combine(OutDir, Path.GetRandomFileName() + ".txt");
Microsoft.ML.Core (2)
Data\Repository.cs (2)
131path = Path.Combine(Path.GetFullPath(tempPath), $"ml_dotnet_{Path.GetFileNameWithoutExtension(Path.GetRandomFileName())}"); 251string tempPath = Path.Combine(root, Path.GetRandomFileName());
Microsoft.ML.Data (1)
Commands\TrainTestCommand.cs (1)
191var tempFilePath = hasOutfile ? null : Path.Combine(((IHostEnvironmentInternal)Host).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.IntegrationTests (2)
DataIO.cs (2)
121var filePath = TestCommon.GetOutputPath(OutDir, Path.GetRandomFileName()); 130var filePath = TestCommon.GetOutputPath(OutDir, Path.GetRandomFileName());
Microsoft.ML.OnnxTransformer (2)
OnnxUtils.cs (2)
408var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName()); 433var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
642string tempDirectory = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.TensorFlow.Tests (2)
TensorflowTests.cs (2)
34tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 2010string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.NET.Build.Containers (1)
ContentStore.cs (1)
44public static string GetTempFile() => Path.Join(TempPath, Path.GetRandomFileName());
Microsoft.NET.Sdk.Publish.Tasks (1)
AppSettingsTransform.cs (1)
13string tempFileFullPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
NuGet.Commands (2)
CommandRunners\PackCommandRunner.cs (2)
232Path.GetRandomFileName()); 258Path.GetRandomFileName());
NuGet.Packaging (7)
PackageExtractor.cs (7)
448var targetTempNupkg = Path.Combine(targetPath, Path.GetRandomFileName()); 449var tempHashPath = Path.Combine(targetPath, Path.GetRandomFileName()); 450var tempNupkgMetadataPath = Path.Combine(targetPath, Path.GetRandomFileName()); 724var targetTempNupkg = Path.Combine(targetPath, Path.GetRandomFileName()); 725var tempHashPath = Path.Combine(targetPath, Path.GetRandomFileName()); 726var tempNupkgMetadataFilePath = Path.Combine(targetPath, Path.GetRandomFileName()); 799var tempNuspecFilePath = Path.Combine(packageDirectoryPath, Path.GetRandomFileName());
NuGet.Protocol (5)
HttpSource\HttpCacheUtility.cs (2)
41var temporaryFile = Path.Combine(context.RootTempFolder!, Path.GetRandomFileName()); 42var newTemporaryFile = Path.Combine(context.RootTempFolder!, Path.GetRandomFileName());
Plugins\PluginPackageReader.cs (1)
1116var tempDirectoryPath = Path.Combine(NuGetEnvironment.GetFolderPath(NuGetFolderPath.Temp), Path.GetRandomFileName());
Utility\GetDownloadResultUtility.cs (1)
186var randomComponent = Path.GetRandomFileName();
Utility\LocalFolderUtility.cs (1)
1291var tempNupkgMetadataFilePath = Path.Combine(installPath, Path.GetRandomFileName());
PresentationBuildTasks (1)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (1)
149string randomFileName = Path.GetFileNameWithoutExtension(Path.GetRandomFileName());
PresentationCore (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\IO\FileHelper.cs (1)
115string path = Path.Combine(folderPath, Path.GetRandomFileName());
sdk-tasks (1)
Crossgen.cs (1)
46string tempDirPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
System.CodeDom (1)
src\runtime\src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
134Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));
System.Configuration.ConfigurationManager (1)
src\runtime\src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
134Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));
System.Formats.Tar (1)
System\Formats\Tar\TarHelpers.Unix.cs (1)
25string filename = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\Helper.NonMobile.cs (2)
49randomDirectory = Path.Combine(rootDirectory, Path.GetRandomFileName(), Path.GetRandomFileName());
System.Private.Windows.Core.TestUtilities (1)
TempFile.cs (1)
85string file = $"{IO.Path.GetRandomFileName()}_{memberName}_{lineNumber}";
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ThemingScope.cs (1)
84string tempFilePath = Path.Join(Path.GetTempPath(), Path.GetRandomFileName());