139 references to GetRelativePath
aspire (33)
Agents\AspireSkills\AspireSkillsBundleProvider.cs (1)
614var relativePath = Path.GetRelativePath(sourceDirectory, sourceFile);
Agents\Playwright\PlaywrightCliInstaller.cs (2)
426var relativePath = Path.GetRelativePath(sourceDir, sourceFile); 443var relativePath = Path.GetRelativePath(targetDir, targetFile);
Backchannel\AppHostConnectionResolver.cs (2)
173var displayPath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName); 226path => Path.GetRelativePath(workingDirectory, path),
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
213var relativePath = Path.GetRelativePath(normalizedWorkingDirectory, normalizedAppHostPath);
Commands\AppHostLauncher.cs (1)
938var appHostRelativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, effectiveAppHostFile.FullName);
Commands\InitCommand.cs (1)
496var displayPath = PathNormalizer.NormalizePathForStorage(Path.GetRelativePath(workingDirectory.FullName, appHostPath));
Commands\RunCommand.cs (1)
442var appHostRelativePath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, effectiveAppHostFile.FullName);
Commands\StopCommand.cs (3)
296var displayPath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, appHostFile.FullName); 317var displayPath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, appHostFile.FullName); 547? Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, appHostPath)
Configuration\AspireConfigFile.cs (1)
202Path.GetRelativePath(directory, absolutePath));
Projects\AppHostCandidateFinder.cs (2)
226var relativeNative = Path.GetRelativePath(rootFullName, absolutePath); 294var relative = Path.GetRelativePath(rootFullName, absoluteDirectory);
Projects\JavaAppHostToolchainResolver.cs (2)
338var relativeWrapperPath = Path.GetRelativePath(appHostDirectory.FullName, wrapperPath); 493var relativePath = Path.GetRelativePath(appHostDirectory.FullName, projectDirectory.FullName);
Projects\ProjectLocator.cs (9)
391var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName); 411var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName); 424var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName); 510var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsAppHost.FullName); 522var settingsAppHostRelativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsAppHost.FullName); 976file => $"{file.Name.EscapeMarkup()} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, file.FullName).EscapeMarkup()})", 1160MultipleAppHostProjectsFoundBehavior.Prompt => await interactionService.PromptForSelectionAsync(InteractionServiceStrings.SelectAppHostToUse, results.BuildableAppHost.Select(c => c.AppHostFile).ToList(), projectFile => $"{projectFile.Name.EscapeMarkup()} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName).EscapeMarkup()})", cancellationToken: cancellationToken), 1267var relativePathToProjectFile = Path.GetRelativePath(settingsFile.Directory!.FullName, projectFile.FullName).Replace(Path.DirectorySeparatorChar, '/'); 1292var relativeSettingsFilePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
Projects\SolutionLocator.cs (1)
43solutionFile => $"{solutionFile.Name.EscapeMarkup()} ({Path.GetRelativePath(startDirectory.FullName, solutionFile.FullName).EscapeMarkup()})",
Scaffolding\ScaffoldingService.cs (2)
311var relativeAppHostDirectory = PathNormalizer.NormalizePathForStorage(Path.GetRelativePath(rootDirectory.FullName, appHostDirectory.FullName)); 369Path.GetRelativePath(rootDirectory.FullName, Path.Combine(scaffoldDirectory.FullName, appHostFileName)));
Templating\CliTemplateFactory.cs (1)
381var relativePath = Path.GetRelativePath(currentDir, outputPath);
Utils\AppHostHelper.cs (2)
78var relativePath = Path.GetRelativePath(workingDirectory.FullName, projectFile.FullName); 92var relativePath = Path.GetRelativePath(workingDirectory.FullName, projectFile.FullName);
Utils\EnvironmentChecker\AspireVersionCheck.cs (1)
420return Path.GetRelativePath(executionContext.WorkingDirectory.FullName, file.FullName);
Aspire.Acquisition.Tests (1)
Scripts\Common\FakeArchiveHelper.cs (1)
206var relativePath = Path.GetRelativePath(contentDir, fullPath).Replace(Path.DirectorySeparatorChar, '/');
Aspire.Cli.EndToEnd.Tests (3)
BundleSmokeTests.cs (2)
88var appHostProjectRelativePath = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, appHostProjectPath); 184var appHostProjectRelativePath = Path.GetRelativePath(projectRoot, appHostProjectPath);
Helpers\CliE2ETestHelpers.cs (1)
916var relativePath = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, hostPath);
Aspire.Cli.Tests (42)
Commands\DoctorCommandTests.cs (1)
411"path": "{{Path.GetRelativePath(workspace.WorkspaceRoot.FullName, appHostFile.FullName).Replace('\\', '/')}}"
Commands\PublishCommandPromptingIntegrationTests.cs (8)
266var relativeMissingFile = Path.GetRelativePath(Directory.GetCurrentDirectory(), missingFile); 267var relativeSelectedFile = Path.GetRelativePath(Directory.GetCurrentDirectory(), selectedFile); 809var relativeOversized = Path.GetRelativePath(Directory.GetCurrentDirectory(), oversizedFile); 810var relativeValid = Path.GetRelativePath(Directory.GetCurrentDirectory(), validFile); 855var relativeWrong = Path.GetRelativePath(Directory.GetCurrentDirectory(), wrongExtFile); 856var relativeCorrect = Path.GetRelativePath(Directory.GetCurrentDirectory(), correctFile); 898var relativePath = Path.GetRelativePath(Directory.GetCurrentDirectory(), validFile); 944var relativePath = Path.GetRelativePath(Directory.GetCurrentDirectory(), validFile);
Git\GitWorktreeTests.cs (1)
164Path.GetRelativePath(adminDirectory, gitFilePath) + Environment.NewLine);
Projects\JavaAppHostToolchainResolverTests.cs (1)
31["/c", "call", Path.GetRelativePath(appHostDirectory, wrapperPath), .. toolArgs],
Projects\PrebuiltAppHostServerTests.cs (2)
2466.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/')) 2520.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
Projects\ProjectLocatorTests.cs (25)
552appHostPath = Path.GetRelativePath(aspireSettingsDir.FullName, brokenAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 599path = Path.GetRelativePath(workingDirectory.FullName, outsideAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 733appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName) 762appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName) 793appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName) 864appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, staleProjectFile.FullName) 975path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, targetAppHostProjectFile.FullName).Replace(Path.DirectorySeparatorChar, '/') 1013path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, targetAppHostProjectFile.FullName).Replace(Path.DirectorySeparatorChar, '/') 1086path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, configuredAppHostProjectFile.FullName).Replace(Path.DirectorySeparatorChar, '/') 1139path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, configuredAppHostProjectFile.FullName).Replace(Path.DirectorySeparatorChar, '/') 1192path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, targetAppHostProjectFile.FullName).Replace(Path.DirectorySeparatorChar, '/') 1298var relativePath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName); 1719.GetRelativePath(aspireSettingsDir.FullName, appHostProjectFile.FullName) 2391path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, brokenAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 2436path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, healthyAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 2480path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, configuredAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 2519path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, unsupportedAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 2579path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, brokenAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 3235.GetRelativePath(aspireSettingsDir.FullName, appHost1File.FullName) 3268.GetRelativePath(aspireSettingsDir.FullName, appHost1File.FullName) 3464path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, configuredAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/') 3629appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, appHostProjectFile.FullName) 3696appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, appHostProjectFile.FullName) 3729appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, appHostProjectFile.FullName) 4137path = Path.GetRelativePath(workspace.WorkspaceRoot.FullName, configuredAppHost.FullName).Replace(Path.DirectorySeparatorChar, '/')
Templating\JavaStarterScaffoldTests.cs (1)
62.Select(path => Path.GetRelativePath(outputDirectory, path).Replace(Path.DirectorySeparatorChar, '/'))
TestServices\TestAuxiliaryBackchannelMonitor.cs (1)
117var relativePath = Path.GetRelativePath(normalizedWorkingDirectory, normalizedAppHostPath);
TestServices\TestGitWorktree.cs (2)
19? Path.GetRelativePath(adminDirectory, gitFilePath) 35? Path.GetRelativePath(fullCheckoutRoot, fullGitDirectory)
Aspire.Hosting (1)
Publishing\ManifestPublishingContext.cs (1)
73var relativePath = Path.GetRelativePath(manifestDirectory, normalizedPath);
Aspire.Hosting.Azure.Tests (1)
AzureFunctionsTests.cs (1)
679var relativePath = Path.GetRelativePath(builder.AppHostDirectory, projectPath);
Aspire.Hosting.Blazor (3)
BlazorGatewayExtensions.cs (3)
397var relativeProjectPath = Path.GetRelativePath(solutionRoot, projectDir) 537var relativeProjectPath = Path.GetRelativePath( 546var scriptRelativePath = Path.GetRelativePath(project.SolutionRoot, scriptDest)
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
201sourcePath = Path.GetRelativePath(OutputPath, sourcePath).Replace('\\', '/');
Aspire.Hosting.Java (2)
JavaDockerfileGenerator.cs (1)
1038var relative = Path.GetRelativePath(appDirectory, resolvedWrapperPath).Replace('\\', '/');
JavaHostingExtensions.cs (1)
1501var relativeWrapperPath = Path.GetRelativePath(workingDirectory, wrapperPath);
Aspire.Hosting.Java.Tests (1)
ExpectedWrapperInvocation.cs (1)
29? ["/c", "call", Path.GetRelativePath(workingDirectory, wrapperPath), .. toolArgs]
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
1582var relativeConfigPath = Path.GetRelativePath(aspireConfigDir, absoluteConfigPath).Replace("\\", "/");
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
769var relativePath = Path.GetRelativePath(appHostParentDirectory, appDirectoryFullPath);
Aspire.Hosting.Rust (2)
RustDockerfileGenerator.cs (2)
236var relativeManifest = Path.GetRelativePath(canonicalWorkingDirectory, canonicalManifest); 257var relativePath = Path.GetRelativePath(workingDirectory, path);
Aspire.Hosting.Rust.Tests (2)
AddRustAppPublishTests.cs (2)
747var manifestPath = Path.GetRelativePath(sourceDir.FullName, canonicalManifest); 786var manifestPath = Path.GetRelativePath(sourceDir.FullName, differentlyCasedCanonicalManifest);
dotnet (22)
Commands\Project\Convert\ProjectConvertCommand.cs (6)
374string itemRelativePath = Path.GetRelativePath(relativeTo: sourceFileDirectory, path: itemFullPath); 448AddExplicitProjectItem("Compile", entryPointOutputFullPath, Path.GetRelativePath(outputDirectory, entryPointOutputFullPath)); 509project = project.WithName(Path.GetRelativePath(relativeTo: outputDirectory, path: project.Name), CSharpDirective.Project.NameKind.Final); 523project = project.WithName(Path.GetRelativePath(relativeTo: outputDirectory, path: Path.Combine(sourceDirectory, project.Name)), CSharpDirective.Project.NameKind.Final); 537var relativePath = Path.GetRelativePath(relativeTo: outputDirectory, path: convertedProjectPath); 601string defaultValueRelative = Path.GetRelativePath(relativeTo: Environment.CurrentDirectory, defaultValue);
Commands\Reference\Add\ReferenceAddCommand.cs (2)
97Path.GetRelativePath( 167return Path.GetRelativePath(projectDirectory, Path.GetFullPath(argument)).Replace('\\', '/');
Commands\Reference\Remove\ReferenceRemoveCommand.cs (1)
58return Path.GetRelativePath(
Commands\Run\RunTelemetry.cs (1)
104? Path.GetRelativePath(repoRoot, projectFilePath)
Commands\Solution\Add\SolutionAddCommand.cs (2)
165string solutionRelativeProjectPath = Path.GetRelativePath(Path.GetDirectoryName(_solutionFileFullPath)!, fullProjectPath); 320string parentSolutionRelativePath = Path.GetRelativePath(parentSolutionDirectory, projectPath);
Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
40.Select(p => Path.GetRelativePath(
Commands\Test\MTP\TestResultsDirectoryResolver.cs (2)
155string relative = Path.GetRelativePath(normalizedRoot, candidate); 290string relativePath = Path.GetRelativePath(identityRoot, path)
MsbuildProject.cs (1)
279ret.Add(Path.GetRelativePath(ProjectDirectory, fullPath));
NugetPackageDownloader\NuGetPackageDownloader.cs (2)
344Path.GetRelativePath(targetFolder.Value, p).Equals("data/UnixFilePermissions.xml", 424return Path.GetRelativePath(targetPath, p).StartsWith("tools" + Path.DirectorySeparatorChar) &&
ShellShim\AppHostShimMaker.cs (1)
34var appBinaryFilePath = Path.GetRelativePath(Path.GetDirectoryName(appHostDestinationFilePath), entryPointFullPath);
ShellShim\ShellShimRepository.cs (1)
66string relativePathToExe = Path.GetRelativePath(_shimsDirectory.Value, toolCommand.Executable.Value);
SlnfFileHelper.cs (2)
73var relativeSolutionPath = Path.GetRelativePath(slnfDirectory, parentSolutionFullPath); 105relativeSolutionPath = Path.GetRelativePath(slnfDirectory, parentSolutionPath);
dotnet-aot (6)
src\sdk\src\Cli\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
40.Select(p => Path.GetRelativePath(
src\sdk\src\Cli\dotnet\MsbuildProject.cs (1)
279ret.Add(Path.GetRelativePath(ProjectDirectory, fullPath));
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (2)
344Path.GetRelativePath(targetFolder.Value, p).Equals("data/UnixFilePermissions.xml", 424return Path.GetRelativePath(targetPath, p).StartsWith("tools" + Path.DirectorySeparatorChar) &&
src\sdk\src\Cli\dotnet\SlnfFileHelper.cs (2)
73var relativeSolutionPath = Path.GetRelativePath(slnfDirectory, parentSolutionFullPath); 105relativeSolutionPath = Path.GetRelativePath(slnfDirectory, parentSolutionPath);
ILCompiler.ReadyToRun (1)
Compiler\ReadyToRunCodegenCompilation.cs (1)
458string relativeMsilPath = Path.GetRelativePath(_compositeRootPath, inputFile);
Infrastructure.Tests (3)
PowerShellScripts\DownloadNativeArchivesTests.cs (2)
141.Select(p => Path.GetRelativePath(archivesDir, p).Replace(Path.DirectorySeparatorChar, '/')) 153.Select(p => Path.GetRelativePath(nupkgsDir, p).Replace(Path.DirectorySeparatorChar, '/'))
PowerShellScripts\ScanTestPartitionsFromSourceGuardTests.cs (1)
79var rel = Path.GetRelativePath(RepoRoot.Path, file).Replace('\\', '/');
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
BlazorWebView.cs (2)
188 var contentRootRelativePath = Path.GetRelativePath(appRootDir, contentRootDirFullPath); 189 var hostPageRelativePath = Path.GetRelativePath(contentRootDirFullPath, hostPageFullPath);
Microsoft.AspNetCore.Components.WebView.Wpf (2)
BlazorWebView.cs (2)
271 var hostPageRelativePath = Path.GetRelativePath(contentRootDirFullPath, hostPageFullPath); 272 var contentRootDirRelativePath = Path.GetRelativePath(appRootDir, contentRootDirFullPath);
Microsoft.Build (1)
Logging\TerminalLogger\TerminalLogger.cs (1)
965var relativePathFromWorkingDirToSourceRoot = Path.GetRelativePath(workingDirectorySpan.ToString(), sourceRootSpan.ToString()).AsSpan();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
SyncedSource\FileBasedPrograms\ExternalHelpers.cs (1)
25=> Path.GetRelativePath(relativeTo, path);
Microsoft.DotNet.ProjectTools (1)
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\ExternalHelpers.cs (1)
25=> Path.GetRelativePath(relativeTo, path);
Microsoft.NET.Build.Containers (1)
Layer.cs (1)
127string relativePath = Path.GetRelativePath(directory, fsi.FullName);
Pipelines.AppHost (1)
AppHost.cs (1)
294var relativePath = Path.GetRelativePath(sourcePath, filePath);
PresentationBuildTasks (1)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
1593string path = Path.GetRelativePath(TargetPath + pathOfRelativeSourceFilePath, SourceFileInfo.SourcePath);
sdk-tasks (3)
DeduplicateAssembliesWithLinks.cs (2)
147var relativePath = Path.GetRelativePath(duplicateDirectory, primaryFilePath); 154var relativePath = Path.GetRelativePath(rootDirectory, filePath);
ReplaceFilesWithSymbolicLinks.cs (1)
136string relativePath = Path.GetRelativePath(Path.GetDirectoryName(path)!, pathToTarget);