12012 references to Path
AnalyzerRunner (8)
aspire (15)
Aspire.Cli.Tests (22)
Projects\ProjectLocatorTests.cs (17)
24var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
44var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
48var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
52var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
57appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
80var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
84var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
88var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
93appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
111var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
114var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
133var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
136var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
177var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
193var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
211var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
223var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"));
Aspire.Components.Common.Tests (1)
Aspire.Dashboard (3)
Aspire.Dashboard.Tests (19)
Aspire.EndToEnd.Tests (61)
tests\Shared\TemplatesTesting\AspireProject.cs (21)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
115cmd.WithWorkingDirectory(Path.GetDirectoryName(projectDir)!)
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
152string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
249_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
322workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
326var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
329var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (23)
25? Path.GetTempPath()
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp)
28: Path.GetTempPath();
31public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
32public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
76var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName);
79sdkForTemplatePath = Path.GetFullPath(sdkFromArtifactsPath);
84string workloadsProjString = Path.Combine("tests", "workloads.proj");
95.Split(Path.PathSeparator)
96.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
102sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
108BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
118.Split(Path.PathSeparator)
119.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
125sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
135string? baseDir = Path.GetDirectoryName(EnvironmentVariables.SdkForTemplateTestingPath);
141sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
156sdkForTemplatePath = Path.GetFullPath(sdkForTemplatePath);
158NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
166EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
179DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
187LogRootPath = Path.GetFullPath(EnvironmentVariables.TestLogPath);
192LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (10)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}")
30: Path.Combine(AppContext.BaseDirectory, "templates");
31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName);
32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}");
95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
104? Path.GetTempPath()
105: Path.Combine(BuildEnvironment.TempDir, "templates", "working"); // avoid running from the repo
Aspire.Hosting (45)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (16)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.Functions (2)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.Tests (20)
Aspire.Hosting.Containers.Tests (5)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Docker.Tests (7)
Aspire.Hosting.Garnet.Tests (4)
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak (2)
Aspire.Hosting.Keycloak.Tests (8)
Aspire.Hosting.Kubernetes (4)
Aspire.Hosting.Kubernetes.Tests (7)
Aspire.Hosting.Milvus.Tests (3)
Aspire.Hosting.MongoDB.Tests (7)
Aspire.Hosting.MySql (1)
Aspire.Hosting.MySql.Tests (4)
Aspire.Hosting.NodeJs (6)
Aspire.Hosting.NodeJs.Tests (3)
Aspire.Hosting.Oracle.Tests (1)
Aspire.Hosting.PostgreSQL.Tests (9)
Aspire.Hosting.Python (11)
Aspire.Hosting.Python.Tests (19)
AddPythonAppTests.cs (19)
25var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
29GetProjectDirectoryRef(options) = Path.GetFullPath(projectDirectory);
57var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
61GetProjectDirectoryRef(options) = Path.GetFullPath(projectDirectory);
155Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
159Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
189Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "opentelemetry-instrument.exe"), pythonProjectResource.Command);
193Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "opentelemetry-instrument"), pythonProjectResource.Command);
230Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
234Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
248var projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
260var pythonExecutable = Path.Combine(projectDirectory,
271var scriptPath = Path.Combine(projectDirectory, "main.py");
274var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
278var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
312var relativePipPath = Path.Combine(
317var pipPath = Path.GetFullPath(relativePipPath, projectDirectory);
Aspire.Hosting.Qdrant.Tests (3)
Aspire.Hosting.Redis.Tests (4)
Aspire.Hosting.Seq.Tests (4)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (3)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Testing.Tests (4)
Aspire.Hosting.Tests (59)
MSBuildTests.cs (8)
23var libraryDirectory = Path.Combine(tempDirectory.FullName, "Library");
26File.WriteAllText(Path.Combine(libraryDirectory, "Library.csproj"), """
37File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"), """
45var appHostDirectory = Path.Combine(tempDirectory.FullName, "AppHost");
48File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), $"""
74File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), """
79File.WriteAllText(Path.Combine(appHostDirectory, "Directory.Build.props"), $"""
88File.WriteAllText(Path.Combine(appHostDirectory, "Directory.Build.targets"), $"""
Schema\SchemaTests.cs (16)
49var tempPath = Path.GetTempPath();
50var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
52var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
61var tempPath = Path.GetTempPath();
62var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
64var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
79var tempPath = Path.GetTempPath();
80var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
82var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
113var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
201var relativePath = Path.Combine("Schema", "aspire-8.0.json");
202var schemaPath = Path.GetFullPath(relativePath);
214var builder = TestDistributedApplicationBuilder.Create(["--publisher", "manifest", "--output-path", Path.Combine(manifestDir, "not-used.json")]);
Aspire.Hosting.Valkey.Tests (4)
Aspire.Playground.Tests (5)
Aspire.Templates.Tests (70)
tests\Shared\TemplatesTesting\AspireProject.cs (21)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
115cmd.WithWorkingDirectory(Path.GetDirectoryName(projectDir)!)
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
152string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
249_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
322workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
326var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
329var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (23)
25? Path.GetTempPath()
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp)
28: Path.GetTempPath();
31public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
32public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
76var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName);
79sdkForTemplatePath = Path.GetFullPath(sdkFromArtifactsPath);
84string workloadsProjString = Path.Combine("tests", "workloads.proj");
95.Split(Path.PathSeparator)
96.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
102sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
108BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
118.Split(Path.PathSeparator)
119.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
125sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
135string? baseDir = Path.GetDirectoryName(EnvironmentVariables.SdkForTemplateTestingPath);
141sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
156sdkForTemplatePath = Path.GetFullPath(sdkForTemplatePath);
158NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
166EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
179DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
187LogRootPath = Path.GetFullPath(EnvironmentVariables.TestLogPath);
192LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (10)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}")
30: Path.Combine(AppContext.BaseDirectory, "templates");
31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName);
32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}");
95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
104? Path.GetTempPath()
105: Path.Combine(BuildEnvironment.TempDir, "templates", "working"); // avoid running from the repo
Aspire.TestUtilities (2)
AutobahnTestApp (1)
Binding.UDS.IntegrationTests (4)
blazor-devserver (6)
BoundTreeGenerator (1)
BuildActionTelemetryTable (6)
BuildBoss (48)
CompilerNuGetCheckerUtil.cs (15)
96var publishDataPath = Path.Combine(RepositoryDirectory, "eng", "config", "PublishData.json");
102var packagesDirectory = Path.Combine(ArtifactsDirectory, "packages", Configuration, "Shipping");
105var packageFileName = Path.GetFileName(packageFullPath);
144FindNuGetPackage(Path.Combine(ArtifactsDirectory, "VSSetup", Configuration, "DevDivPackages"), "VS.Tools.Roslyn"),
162FindNuGetPackage(Path.Combine(ArtifactsDirectory, "packages", Configuration, "Shipping"), "Microsoft.Net.Compilers.Toolset.Arm64"),
171FindNuGetPackage(Path.Combine(ArtifactsDirectory, "packages", Configuration, "Shipping"), "Microsoft.Net.Compilers.Toolset.Framework"),
180FindNuGetPackage(Path.Combine(ArtifactsDirectory, "packages", Configuration, "Shipping"), "Microsoft.Net.Compilers.Toolset"),
213=> Path.Combine(ArtifactsDirectory, "bin", projectName, Configuration, tfm);
216=> Path.Combine(ArtifactsDirectory, "bin", projectName, Configuration, tfm, "publish");
252buildAssetRelativePath = Path.Combine(folderRelativePath, buildAssetRelativePath);
359var packageFilePath = FindNuGetPackage(Path.Combine(ArtifactsDirectory, "VSSetup", Configuration, "DevDivPackages"), "VS.ExternalAPIs.Roslyn");
382if (Path.GetExtension(name) is not (".dll" or ".exe"))
387foundDllNameSet.Add(Path.GetFileNameWithoutExtension(name));
429var fileName = Path.GetFileName(filePath);
439var directory = Path.Combine(ArtifactsDirectory, "VSSetup", Configuration);
BuildValidator (37)
CompilationDiff.cs (18)
219File.WriteAllText(Path.Combine(debugPath, "error.txt"), MiscErrorMessage);
227using var writer = new StreamWriter(Path.Combine(debugPath, "diagnostics.txt"), append: false);
237using var writer = new StreamWriter(Path.Combine(debugPath, "references.txt"), append: false);
282var originalDataFiles = createBuildArtifacts(Path.Combine(debugPath, "original"), assemblyFileName, originalInfo);
283var rebuildDataFiles = createBuildArtifacts(Path.Combine(debugPath, "rebuild"), assemblyFileName, rebuildInfo);
295File.WriteAllText(Path.Combine(debugPath, scriptName), $@"code --diff (Join-Path $PSScriptRoot ""{originalFilePath}"") (Join-Path $PSScriptRoot ""{rebuildFilePath}"")");
299var sourcesPath = Path.Combine(debugPath, "sources");
305var sourceFilePath = Path.Combine(sourcesPath, Path.GetFileName(tree.FilePath));
315var assemblyName = Path.GetFileNameWithoutExtension(assemblyFileName);
316var assemblyFilePath = Path.Combine(outputPath, assemblyFileName);
318AssemblyMdvFilePath: Path.Combine(outputPath, assemblyName + ".mdv"),
319PdbMdvFilePath: Path.Combine(outputPath, assemblyName + ".pdb.mdv"),
320ILFilePath: Path.Combine(outputPath, assemblyName + ".il"),
321PdbXmlFilePath: Path.Combine(outputPath, assemblyName + ".pdb.xml"),
322CustomDataFilePath: Path.Combine(outputPath, "custom-data.txt"));
330var pdbFilePath = Path.Combine(outputPath, assemblyName + ".extracted.pdb");
405writer.WriteLine($@"\t""{Path.GetFileName(info.SourceTextInfo.OriginalSourceFilePath)}"" - {hashString}");
CatalogService (1)
ClientSample (3)
CodeStyleConfigFileGenerator (4)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (2)
Crossgen2Tasks (49)
PrepareForReadyToRunCompilation.cs (17)
135var outputR2RImage = Path.Combine(OutputPath, outputR2RImageRelativePath);
145outputPDBImage = Path.ChangeExtension(outputR2RImage, "ni.pdb");
146outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, "ni.pdb");
147crossgen1CreatePDBCommand = $"/CreatePDB \"{Path.GetDirectoryName(outputPDBImage)}\"";
167outputPDBImage = Path.ChangeExtension(outputR2RImage, perfmapExtension);
168outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, perfmapExtension);
169crossgen1CreatePDBCommand = $"/CreatePerfMap \"{Path.GetDirectoryName(outputPDBImage)}\"";
233MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec));
236compositeR2RImageRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, "r2r" + Path.GetExtension(compositeR2RImageRelativePath));
237var compositeR2RImage = Path.Combine(OutputPath, compositeR2RImageRelativePath);
251compositePDBImage = Path.ChangeExtension(compositeR2RImage, ".ni.pdb");
252compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, ".ni.pdb");
257compositePDBImage = Path.ChangeExtension(compositeR2RImage, perfmapExtension);
258compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, perfmapExtension);
387bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec)));
388bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R;
ResolveReadyToRunCompilers.cs (26)
256_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
257_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
258_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm.dll");
263_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x86_arm", "crossgen.exe");
264_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "clrjit.dll");
265_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "Microsoft.DiaSymReader.Native.x86.dll");
272_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
273_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
274_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm64.dll");
284_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x64_arm64", "crossgen.exe");
285_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "clrjit.dll");
286_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "Microsoft.DiaSymReader.Native.amd64.dll");
291_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
292_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
295_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.amd64.dll");
299_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.x86.dll");
311_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
312_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.dylib");
321_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
322_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
327_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", xarchPath, "crossgen");
328_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", xarchPath, "native", "libclrjit.so");
337_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
338_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
369_crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", clrJitFileName);
376_crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", toolFileName);
csc (13)
CSharpSyntaxGenerator (1)
csi (3)
CustomEncryptorSample (1)
dotnet-dev-certs (16)
dotnet-getdocument (14)
dotnet-openapi (15)
dotnet-razorpagegenerator (4)
dotnet-sql-cache (3)
dotnet-svcutil.xmlserializer (18)
dotnet-svcutil.xmlserializer.IntegrationTests (1)
dotnet-svcutil-lib (162)
CommandProcessorOptions.cs (23)
170fileOptions.ResolveFullPathsFrom(new DirectoryInfo(Path.GetDirectoryName(fileUri.LocalPath)));
389workingDirectory = Path.IsPathRooted(this.OutputFile.OriginalPath()) ?
390Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath()));
397new DirectoryInfo(Path.Combine(workingDirectory, this.UpdateServiceReferenceFolder)) :
407if (!Path.IsPathRooted(originalDirSpec))
410this.OutputDir = new DirectoryInfo(Path.Combine(workingDirectory, originalDirSpec));
486var updateFileName = Path.GetFileName(this.UpdateServiceReferenceFolder);
491this.UpdateServiceReferenceFolder = Path.GetDirectoryName(this.UpdateServiceReferenceFolder);
500var paramsFiles = jsonFiles.Except(excludeJsonFiles).Where(fn => Path.GetFileName(fn).Equals(CommandProcessorOptions.SvcutilParamsFileName, RuntimeEnvironmentHelper.FileStringComparison) ||
501Path.GetFileName(fn).Equals(CommandProcessorOptions.WCFCSParamsFileName, RuntimeEnvironmentHelper.FileStringComparison));
515var svcRefNames = paramsFiles.Select(pf => { PathHelper.GetRelativePath(Path.GetDirectoryName(pf), new DirectoryInfo(projectDir), out var relPath); return relPath; })
525var svcutilParmasFile = Path.Combine(projectDir, this.UpdateServiceReferenceFolder, CommandProcessorOptions.SvcutilParamsFileName);
528var wcfcsParamsFile = Path.Combine(projectDir, this.UpdateServiceReferenceFolder, CommandProcessorOptions.WCFCSParamsFileName);
536var relDir = Path.GetDirectoryName(fileRelPath);
545if (Path.GetFileName(paramsFilePath).Equals(CommandProcessorOptions.WCFCSParamsFileName))
555updateOptions.ResolveFullPathsFrom(new DirectoryInfo(Path.GetDirectoryName(paramsFilePath)));
574var tempDir = Path.GetTempPath();
578this.BootstrapPath = new DirectoryInfo(Path.Combine(tempDir, baseDirName, sessionDirName));
698var projectFullPath = Path.Combine(this.BootstrapPath.FullName, "TFMResolver", "TFMResolver.csproj");
704Directory.Delete(Path.GetDirectoryName(projectFullPath));
836string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper));
Shared\MSBuildProj.cs (31)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
161using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Parsing project {Path.GetFileName(projectFullPath)}").ConfigureAwait(false))
163projectFullPath = Path.GetFullPath(projectFullPath);
167FileName = Path.GetFileName(projectFullPath),
168DirectoryPath = Path.GetDirectoryName(projectFullPath)
297if (!Path.IsPathRooted(binReference))
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
342fullPath = Path.Combine(msbuildProj.DirectoryPath, fullPath, binReference);
385fullPath = Path.GetFullPath(fullPath);
387string projectName = Path.GetFileNameWithoutExtension(fullPath);
388string projectExtension = Path.GetExtension(fullPath);
389string projectDir = Path.GetDirectoryName(fullPath);
427string filePath = Path.Combine(dirPath, DirBuildProps);
558basePath = dependency.FullPath.Substring(0, dependency.FullPath.LastIndexOf(Path.DirectorySeparatorChar));
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
797var assetsFile = new FileInfo(Path.Combine(this.DirectoryPath, "obj", "project.assets.json")).FullName;
816if (Path.GetExtension(compiletimeAssembly.Path) == ".dll")
818var dependency = ProjectDependency.FromPackage(Path.GetFileNameWithoutExtension(compiletimeAssembly.Path), lib.Name, lib.Version.ToNormalizedString());
874if (!Path.IsPathRooted(outputPath))
876outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
880Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
895var targetLib = Path.GetFileName(this._resolvedProperties["TargetPath"].Trim('\"'));
898targetLib = $"{Path.ChangeExtension(this.FileName, ".dll")}";
912if (!Path.GetFileName(assetPath).Equals(targetLib, RuntimeEnvironmentHelper.FileStringComparison))
914dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
996var fileName = $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json";
1005.Where(d => Path.GetFileName(d).Equals(fileName, RuntimeEnvironmentHelper.FileStringComparison))
1006.Where(f => PathHelper.GetFolderName(Path.GetDirectoryName(f)) == this.TargetFramework || Directory.GetParent(Directory.GetParent(f).FullName).Name == this.TargetFramework)
Shared\ProjectDependency.cs (12)
75if (!string.IsNullOrWhiteSpace(filePath) && Path.GetInvalidPathChars().Intersect(filePath).Count() > 0)
80if (!string.IsNullOrWhiteSpace(packageName) && Path.GetInvalidFileNameChars().Intersect(packageName).Count() > 0)
108if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(AssemblyName), ext, StringComparison.OrdinalIgnoreCase) == 0))
115(s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0));
118if (s_exeExtensions.Any((ext) => String.Compare(Path.GetExtension(packageName), ext, StringComparison.OrdinalIgnoreCase) == 0))
133fileHasKnownExtension = s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0);
137fileHasKnownExtension = s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0);
145this.FullPath = fileHasKnownExtension ? Path.GetFullPath(filePath) : filePath;
150fileHasKnownExtension ? Path.GetFileNameWithoutExtension(filePath) : Path.GetFileName(filePath);
310if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0))
315else if (s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0))
Shared\Utilities\PathHelper.cs (21)
61if (!isUrl && (Uri.TryCreate(Path.Combine(basePath, input), UriKind.Absolute, out var uri)) && uri.Scheme == "file")
85filePath = Path.Combine(directory.FullName, relPath);
109if (Path.IsPathRooted(childPath))
112var childFileName = Path.GetFileName(childPath);
113var childDirectory = childFileName.Contains("*") ? Path.GetDirectoryName(childPath) : childPath;
114var parentSegments = Path.GetFullPath(parentPath.FullName).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
115var childSegments = Path.GetFullPath(childDirectory).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
133builder.Append($"..{Path.AltDirectorySeparatorChar}");
142builder.Append($"{childSegments[idx]}{Path.AltDirectorySeparatorChar}");
151relativePath = builder.ToString().Trim(Path.AltDirectorySeparatorChar);
168return path.Split(new char[] { '/', '\\', Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
178var directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName));
198directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName + nextIndex));
215var dstFilePath = Path.Combine(destinationDir, fileName);
253fullPath = EnumerateItems(workingDir).Where(item => Path.GetFileName(item).Equals(itemName, RuntimeEnvironmentHelper.FileStringComparison)).FirstOrDefault();
259workingDir = Path.GetDirectoryName(workingDir);
dotnet-svcutil-lib.Tests (138)
E2ETests.cs (26)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
23this_TestGroupProjDir = Path.Combine(g_TestResultsDir, this_TestCaseName, "Project");
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
94var uri = $"\"\"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}\"\"";
123var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
173var wsdlFile = Path.Combine(this_TestGroupOutputDir, "wsdl", "tempuri.org.wsdl");
176var wsdlDocsSrdDir = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService");
177FileUtil.CopyDirectory(wsdlDocsSrdDir, Path.GetDirectoryName(wsdlFile));
182uri = uri.Replace("$wsdlDir$", $"{Path.GetDirectoryName(wsdlFile)}{Path.DirectorySeparatorChar}");
198var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl")}";
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
222var libProjPath = Path.Combine(this_TestGroupOutputDir, "TypesLib", "TypesLib.csproj");
223var binProjPath = Path.Combine(this_TestGroupOutputDir, "BinLib", "BinLib.csproj");
224var assemblyPath = Path.Combine(Path.GetDirectoryName(binProjPath), "bin", "Debug", "netstandard1.3", "BinLib.dll");
228var typeReuseProjectsPath = Path.Combine(g_TestCasesDir, "TypeReuse");
250Directory.CreateDirectory(Path.Combine(this_TestCaseBootstrapDir, "SvcutilBootstrapper"));
252var uri = PathHelper.GetRelativePath(Path.Combine(this_TestGroupOutputDir, "TypeReuseSvc.wsdl"), new DirectoryInfo(this_TestCaseOutputDir));
368var srcParamsFilePath = Path.Combine(g_TestCasesDir, filePath, paramsFileName);
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
501string wsdlFile = Path.Combine(g_TestCasesDir, "wsdl", "memberNamedSystem.wsdl");
512string wsdlFile = Path.Combine(g_TestCasesDir, "wsdl", "TypeNameUseReservedKeyword.wsdl");
GlobalToolTests.cs (33)
76Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
78var uri = $"\"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}\"";
99File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
100File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
102var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
103var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
120this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
122this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
123this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
124this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
127File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
128File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
129this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
134var uri = Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl");
135var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
148this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
151this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
152this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
153this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
156FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
157this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
164var uri = Path.Combine(g_TestCasesDir, "wsdl", "TypeReuseSvc.wsdl");
165var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
183var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}";
187var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
218var uri = Path.Combine(g_TestCasesDir, "TypeReuse", "TypeReuseIXmlSerializable.wsdl");
219var refs = Path.Combine(g_TestCasesDir, "TypeReuse", "CommonTypes.dll");
TestInit.cs (47)
60File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
61File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
62var projectPath = Path.Combine(g_TestOutputDir, "TestStarterProject", "TestStarterProject.csproj");
92var fileName = Path.GetFileNameWithoutExtension(this_TestGroupProjectName);
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
119.Replace(Path.GetFileNameWithoutExtension(project.FileName), projectName));
143g_TestOutputDir = Path.Combine(g_RepositoryRoot, "artifacts", "TestOutput");
144g_TestResultsDir = Path.Combine(g_TestOutputDir, "TestResults");
145g_TestBootstrapDir = Path.Combine(g_TestOutputDir, "TestBootstrap");
146g_TestCasesDir = Path.Combine(vsTestsRoot, "TestCases");
147g_BaselinesDir = Path.Combine(vsTestsRoot, "Baselines");
173File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
174File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
179string pkgPath = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "Shipping");
182pkgPath = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "NonShipping");
210var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
234var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
242this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
247this_TestCaseBootstrapDir = Path.Combine(this_TestGroupBootstrapDir, testCaseName);
250this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
266this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
267var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
353var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
365var nonRefbaselineFiles = baselineFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
375.Any(e => e.Equals(Path.GetExtension(f), RuntimeEnvironmentHelper.FileStringComparison))).ToList();
377var nonRefGeneratedFiles = generatedFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
428var expected = Path.Combine(baselineDir, relativePath);
429Directory.CreateDirectory(Path.GetDirectoryName(expected));
445var scriptPath = Path.Combine(g_TestOutputDir, @"TestScripts", $"{this_TestCaseName}.cmd");
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
457Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
479var isLogFile = Path.GetExtension(baselineFile).Equals(".log", StringComparison.OrdinalIgnoreCase);
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
539vstestDir = new DirectoryInfo(Path.Combine(g_RepositoryRoot, "src", "dotnet-svcutil", "lib", "tests")).FullName;
555var binDir = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "Shipping");
558binDir = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "NonShipping");
568nugetId = Path.GetFileNameWithoutExtension(nugetFile.Name);
573nugetId = Path.GetFileNameWithoutExtension(nugetFiles[0]);
592g_RepositoryRoot = Path.GetDirectoryName(rootSolutionFolder);
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
UnitTest.cs (16)
61var uri = Path.Combine(g_TestCasesDir, "wsdl", "brokenWsdl.wsdl");
128var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
150var uri = Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl");
218var wsdlFilesDstDir = Path.Combine(this_TestGroupOutputDir, "wsdl");
221var wsdlFilesSrcDir = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService");
222FileUtil.CopyDirectory(wsdlFilesSrcDir.Replace("$testCasesDir$", g_TestCasesDir), Path.Combine(wsdlFilesDstDir, "WcfProjectNService"), overwrite: true);
224Directory.CreateDirectory(Path.Combine(this_TestGroupOutputDir, "wsdl"));
225File.Copy(Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl"), Path.Combine(this_TestGroupOutputDir, "wsdl", "Simple.wsdl"));
327var jsonFilesRoot = Path.Combine(g_TestCasesDir, "options", "JSON");
329var jsonFileSrcPath = Path.Combine(jsonFilesRoot, jsonFile);
330var jsonFileDstPath = Path.Combine(this_TestCaseOutputDir, Path.GetFileName(jsonFileSrcPath));
347var outputDir = Path.GetTempPath();
353var outJsonFile = Path.Combine(outputDir, Path.GetFileName(jsonFileSrcPath));
dotnet-user-jwts (30)
dotnet-user-secrets (17)
FilesWebSite (10)
GenerateAnalyzerNuspec (32)
Program.cs (32)
142string assemblyNameWithoutExtension = Path.GetFileNameWithoutExtension(assembly);
146string assemblyFolder = Path.Combine(artifactsBinDir, assemblyNameWithoutExtension, configuration, tfm);
147string assemblyPathForNuspec = Path.Combine(assemblyFolder, assembly);
158var resourceAssemblyFullPath = Path.Combine(directory, resourceAssemblyName);
161var directoryName = Path.GetFileName(directory);
162string resourceAssemblyPathForNuspec = Path.Combine(artifactsBinDir, assemblyNameWithoutExtension, configuration, tfm, directoryName, resourceAssemblyName);
163string targetForNuspec = Path.Combine(target, directoryName);
174var fileWithPath = Path.IsPathRooted(file) ? file : Path.Combine(projectDir, file);
180readmeFile = Path.IsPathRooted(readmeFile) ? readmeFile : Path.GetFullPath(Path.Combine(projectDir, readmeFile));
181var directoryName = Path.GetDirectoryName(readmePackageLocation) ?? string.Empty;
189var fileWithPath = Path.Combine(artifactsBinDir, Path.GetFileNameWithoutExtension(file), configuration, tfm, file);
194result.AppendLine(FileElement(fileWithPath, Path.Combine("lib", tfm)));
206string folderPath = Path.Combine(artifactsBinDir, folder, configuration, tfm);
209var fileExtension = Path.GetExtension(file);
212var fileName = Path.GetFileName(file);
216var fileWithPath = Path.Combine(folderPath, file);
217var targetPath = tfms.Length > 1 ? Path.Combine(folder, tfm) : folder;
224result.AppendLine(FileElement(Path.Combine(assetsDir, "Install.ps1"), "tools"));
225result.AppendLine(FileElement(Path.Combine(assetsDir, "Uninstall.ps1"), "tools"));
232if (Path.GetExtension(ruleset) == ".ruleset")
234result.AppendLine(FileElement(Path.Combine(rulesetsDir, ruleset), "rulesets"));
246result.AppendLine(FileElement(Path.Combine(directory, editorconfig), $"editorconfig\\{directoryName}"));
255if (Path.GetExtension(globalconfig) == ".globalconfig")
257result.AppendLine(FileElement(Path.Combine(globalAnalyzerConfigsDir, globalconfig), $"buildTransitive\\config"));
268var fileWithPath = Path.Combine(analyzerDocumentationFileDir, analyzerDocumentationFileName);
277var fileWithPath = Path.Combine(analyzerSarifFileDir, analyzerSarifFileName);
286var fileWithPath = Path.Combine(analyzerConfigurationFileDir, analyzerConfigurationFileName);
293result.AppendLine(FileElement(Path.Combine(assetsDir, "ThirdPartyNotices.txt"), ""));
GenerateDocumentationAndConfigFiles (21)
Program.cs (21)
273var assemblyName = Path.GetFileNameWithoutExtension(assembly);
274string path = Path.Combine(args.BinDirectory, assemblyName, args.Configuration, args.Tfm, assembly);
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
542var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerDocumentationFileName);
546var fileTitle = Path.GetFileNameWithoutExtension(args.AnalyzerDocumentationFileName);
638var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerSarifFileName);
732Validate(Path.Combine(directory.FullName, args.AnalyzerSarifFileName), stringWriter.ToString(), fileNamesWithValidationFailures);
774var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
897var assemblyDir = Path.GetDirectoryName(assemblyPath);
903var assemblyName = Path.GetFileNameWithoutExtension(assembly);
904var shippedFile = Path.Combine(assemblyDir, "AnalyzerReleases", assemblyName, ReleaseTrackingHelper.ShippedFileName);
905var unshippedFile = Path.Combine(assemblyDir, "AnalyzerReleases", assemblyName, ReleaseTrackingHelper.UnshippedFileName);
1077var assemblyName = Path.GetFileNameWithoutExtension(assembly);
1078var assemblyDir = Path.Combine(args.BinDirectory, assemblyName, args.Configuration, args.Tfm);
1079return Path.Combine(assemblyDir, assembly);
1110var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
1174var directory = Directory.CreateDirectory(Path.Combine(analyzerEditorconfigsDir, editorconfigFolder));
1175var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1398var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1610var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GenerateRulesMissingDocumentation (3)
GetDocument.Insider (5)
HelixTestRunner (23)
TestRunner.cs (17)
36var nugetRestore = Path.Combine(helixDir, "nugetRestore");
38var dotnetEFFullPath = Path.Combine(nugetRestore, helixDir, "dotnet-ef.exe");
67DisplayContents(Path.Combine(Options.DotnetRoot, "host", "fxr"));
68DisplayContents(Path.Combine(Options.DotnetRoot, "shared", "Microsoft.NETCore.App"));
69DisplayContents(Path.Combine(Options.DotnetRoot, "shared", "Microsoft.AspNetCore.App"));
70DisplayContents(Path.Combine(Options.DotnetRoot, "packs", "Microsoft.AspNetCore.App.Ref"));
89ProcessUtil.PrintMessage(Path.GetFileName(file));
93ProcessUtil.PrintMessage(Path.GetFileName(file));
231var diagLog = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"), "vstest.log");
315var logName = $"{Path.GetFileName(Path.GetDirectoryName(file))}_{Path.GetFileName(file)}";
316ProcessUtil.PrintMessage($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, logName)}");
317File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, logName));
329var fileName = Path.GetFileName(file);
330ProcessUtil.PrintMessage($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName)}");
331File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName));
HttpClientApp (3)
HttpStress (4)
IdeBenchmarks (10)
IdeCoreBenchmarks (19)
Identity.ExternalClaims (1)
IIS.FunctionalTests (38)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (4)
55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS)
61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml");
65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml");
95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
IIS.LongTests (47)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (4)
55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS)
61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml");
65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml");
95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
107using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
125using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
179File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation);
210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture));
214Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
215Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
281Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
282Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
346File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
406File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
447File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
616parameters.TransformArguments((arguments, root) => "exec " + Path.Combine(root, "bin", arguments));
624parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
632parameters.TransformArguments((arguments, root) => Path.Combine(root, pathWithSpace, arguments));
640parameters.TransformArguments((arguments, root) => "exec \"" + Path.Combine(root, pathWithSpace, arguments) + "\" extra arguments");
648parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
656parameters.TransformArguments((arguments, root) => Path.Combine(root, "bin", arguments) + " extra arguments");
687parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
696parameters.TransformPath((path, root) => Path.Combine(root, pathWithSpace, path));
715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory"));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (47)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (4)
55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS)
61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml");
65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml");
95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
107using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
125using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
179File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation);
210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture));
214Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
215Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
281Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
282Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
346File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
406File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
447File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
616parameters.TransformArguments((arguments, root) => "exec " + Path.Combine(root, "bin", arguments));
624parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
632parameters.TransformArguments((arguments, root) => Path.Combine(root, pathWithSpace, arguments));
640parameters.TransformArguments((arguments, root) => "exec \"" + Path.Combine(root, pathWithSpace, arguments) + "\" extra arguments");
648parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
656parameters.TransformArguments((arguments, root) => Path.Combine(root, "bin", arguments) + " extra arguments");
687parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
696parameters.TransformPath((path, root) => Path.Combine(root, pathWithSpace, path));
715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory"));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.NewShim.FunctionalTests (47)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (4)
55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS)
61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml");
65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml");
95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
107using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
125using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
179File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation);
210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture));
214Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
215Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
281Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
282Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
346File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
406File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
447File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
616parameters.TransformArguments((arguments, root) => "exec " + Path.Combine(root, "bin", arguments));
624parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
632parameters.TransformArguments((arguments, root) => Path.Combine(root, pathWithSpace, arguments));
640parameters.TransformArguments((arguments, root) => "exec \"" + Path.Combine(root, pathWithSpace, arguments) + "\" extra arguments");
648parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
656parameters.TransformArguments((arguments, root) => Path.Combine(root, "bin", arguments) + " extra arguments");
687parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
696parameters.TransformPath((path, root) => Path.Combine(root, pathWithSpace, path));
715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory"));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.ShadowCopy.Tests (47)
ShadowCopyTests.cs (26)
46var directoryName = Path.GetRandomFileName();
63var tempDirectoryPath = Path.Combine(deploymentResult.ContentRoot, directoryName);
150var deleteDirPath = Path.Combine(deploymentResult.ContentRoot, "wwwroot/deletethis");
152File.WriteAllText(Path.Combine(deleteDirPath, "file.dll"), "");
181DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
208DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
220Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
231Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "2")), "Expected 2 shadow copy directory");
248DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
249DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "3"), copySubDirs: true);
250DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "10"), copySubDirs: true);
262Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
273Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "11")), "Expected 11 shadow copy directory");
279Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "1")), "Expected 1 shadow copy directory to be deleted");
280Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "3")), "Expected 3 shadow copy directory to be deleted");
292DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
305Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
307Assert.False(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy", "0", "ShadowCopy")));
322DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
335Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
337Assert.False(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy", "0", "ShadowCopy")));
347var directoryPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
415string tempPath = Path.Combine(destDirName, file.Name);
428string tempPath = Path.Combine(destDirName, subdir.Name);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (4)
55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS)
61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml");
65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml");
95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
IIS.Tests (5)
IISExpress.FunctionalTests (57)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (4)
25var path = Path.Combine(AppContext.BaseDirectory, GetProfileName(deploymentParameters));
48var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName);
51var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters));
72return Path.GetFileNameWithoutExtension(_applicationName) + "-" + profileName;
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
107using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
125using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
179File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation);
210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture));
214Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
215Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
281Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
282Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
346File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
406File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
447File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
616parameters.TransformArguments((arguments, root) => "exec " + Path.Combine(root, "bin", arguments));
624parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
632parameters.TransformArguments((arguments, root) => Path.Combine(root, pathWithSpace, arguments));
640parameters.TransformArguments((arguments, root) => "exec \"" + Path.Combine(root, pathWithSpace, arguments) + "\" extra arguments");
648parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
656parameters.TransformArguments((arguments, root) => Path.Combine(root, "bin", arguments) + " extra arguments");
687parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
696parameters.TransformPath((path, root) => Path.Combine(root, pathWithSpace, path));
715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory"));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
illink (26)
Linker.Steps\OutputStep.cs (13)
149 using (var fs = File.Open (Path.Combine (Context.OutputDirectory, Context.PInvokesListFile), FileMode.Create)) {
165 File.Delete (Path.ChangeExtension (target, "pdb"));
206 var satelliteAssembly = Path.Combine (subDirectory, resourceFile);
210 string cultureName = subDirectory.Substring (subDirectory.LastIndexOf (Path.DirectorySeparatorChar) + 1);
211 string culturePath = Path.Combine (directory, cultureName);
214 File.Copy (satelliteAssembly, Path.Combine (culturePath, resourceFile), true);
224 string target = Path.GetFullPath (GetConfigFile (GetAssemblyFileName (assembly, directory)));
234 return Path.GetFileNameWithoutExtension (assembly) + ".resources.dll";
250 string target = Path.GetFullPath (Path.Combine (directory, fi.Name));
264 var pdb = Path.ChangeExtension (source, "pdb");
266 File.Copy (pdb, Path.ChangeExtension (target, "pdb"), true);
272 return Path.Combine (directory, file);
ILLink.Tasks (6)
Infrastructure.Common (1)
InMemory.FunctionalTests (5)
InProcessWebSite (2)
installer.tasks (10)
InteractiveHost.UnitTests (15)
Interop.FunctionalTests (13)
Http3\Http3TlsTests.cs (5)
411new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")),
436Directory.CreateDirectory(Path.GetDirectoryName(path));
511var basePath = appData != null ? Path.Combine(appData, "ASP.NET", "https") : null;
512basePath = basePath ?? (home != null ? Path.Combine(home, ".aspnet", "https") : null);
513return Path.Combine(basePath, $"{typeof(Http3TlsTests).Assembly.GetName().Name}.pfx");
InteropTests (2)
InteropWebsite (2)
IOperationGenerator (3)
KeyManagementSample (1)
Metrics (13)
Metrics.Legacy (13)
Microsoft.Analyzers.Extra.Tests (4)
Microsoft.Analyzers.Local (2)
Microsoft.Analyzers.Local.Tests (4)
Microsoft.Arcade.Common (13)
Microsoft.Arcade.Test.Common (6)
Microsoft.AspNetCore (8)
Microsoft.AspNetCore.Analyzer.Testing (4)
Microsoft.AspNetCore.Analyzers.Test (1)
Microsoft.AspNetCore.App.Analyzers.Test (5)
Microsoft.AspNetCore.App.UnitTests (36)
TargetingPackTests.cs (21)
28_targetingPackRoot = Path.Combine(
38var actualAssemblies = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll")
39.Select(Path.GetFileNameWithoutExtension)
73IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll", SearchOption.AllDirectories);
78var expectedVersion = repoAssemblies.Contains(Path.GetFileNameWithoutExtension(path)) ?
82var fileName = Path.GetFileNameWithoutExtension(path);
90if (repoAssemblies.Contains(Path.GetFileNameWithoutExtension(path)))
113IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref", _targetingPackTfm), "*.dll", SearchOption.AllDirectories);
127Assert.True(result, $"In {Path.GetFileName(path)}, {reference.GetAssemblyName()} has unexpected version {reference.Version}.");
135var packageOverridePath = Path.Combine(_targetingPackRoot, "data", "PackageOverrides.txt");
195IEnumerable<string> dlls = Directory.GetFiles(Path.Combine(_targetingPackRoot, "ref"), "*.dll", SearchOption.AllDirectories);
227var platformManifestPath = Path.Combine(_targetingPackRoot, "data", "PlatformManifest.txt");
232var fileName = Path.GetFileName(i);
292var frameworkListPath = Path.Combine(_targetingPackRoot, "data", "FrameworkList.xml");
305var analyzersDir = Path.Combine(_targetingPackRoot, "analyzers");
308.Select(p => Path.GetFileNameWithoutExtension(p))
359var frameworkListPath = Path.Combine(_targetingPackRoot, "data", "FrameworkList.xml");
369var targetingPackPath = Path.Combine(
401var frameworkListPath = Path.Combine(_targetingPackRoot, "data", "FrameworkList.xml");
415string expectedLanguage = Path.GetFileName(Path.GetDirectoryName(assemblyPath));
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (92)
Microsoft.AspNetCore.BrowserTesting (11)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Server (11)
Microsoft.AspNetCore.Components.WebView (3)
Microsoft.AspNetCore.Components.WebView.Maui (4)
Microsoft.AspNetCore.Components.WebView.Photino (3)
Microsoft.AspNetCore.Components.WebView.Test (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (10)
Microsoft.AspNetCore.Components.WebView.Wpf (10)
Microsoft.AspNetCore.Components.WebViewE2E.Test (3)
Microsoft.AspNetCore.DataProtection (10)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (12)
DataProtectionProviderTests.cs (12)
51var keysPath = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName());
121var filePath = Path.Combine(GetTestFilesPath(), "TestCert.pfx");
148var certWithoutKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCertWithoutPrivateKey.pfx"), "password");
176var certWithoutKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCert3WithoutPrivateKey.pfx"), "password3", X509KeyStorageFlags.Exportable);
193var certWithKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCert3.pfx"), "password3");
216var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
245var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
287var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
323string uniqueTempPath = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName());
340=> Path.Combine(AppContext.BaseDirectory, "TestFiles");
Microsoft.AspNetCore.DataProtection.Tests (17)
Repositories\FileSystemXmlRepositoryTests.cs (10)
19? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ASP.NET")
20: Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".aspnet");
21var expectedDir = new DirectoryInfo(Path.Combine(baseDir, "DataProtection-Keys")).FullName;
205var filePath1 = Path.Combine(dirInfo.FullName, "friendly1.xml");
206var filePath2 = Path.Combine(dirInfo.FullName, "friendly2.xml");
207var filePath3 = Path.Combine(dirInfo.FullName, "friendly3.xml");
222fileLock2 = new FileStream(Path.Combine(dirInfo.FullName, "friendly2.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
255var filePath = Path.Combine(dirInfo.FullName, "friendly1.xml");
318string uniqueTempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
XmlEncryption\EncryptedXmlDecryptorTests.cs (7)
18var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password");
32var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password");
33var testCert2 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert2.pfx"), "password");
50var fullCert = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password");
51var publicKeyOnly = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.PublicKeyOnly.cer"), "");
68var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password");
69var testCert2 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert2.pfx"), "password");
Microsoft.AspNetCore.DeveloperCertificates.XPlat (11)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (3)
Microsoft.AspNetCore.Diagnostics (2)
Microsoft.AspNetCore.Diagnostics.Tests (2)
Microsoft.AspNetCore.FunctionalTests (18)
WebApplicationFunctionalTests.cs (13)
16var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
21await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
59var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
64await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.Development.json"), @"
102var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
107await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
143await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
WebHostFunctionalTests.cs (5)
154var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
209var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitectures.Current)
240var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "DefaultBuilder.slnf"));
243return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "testassets"));
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Microsoft.AspNetCore.Hosting (13)
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
Microsoft.AspNetCore.Hosting.Tests (28)
HostingEnvironmentExtensionsTests.cs (12)
24env.Initialize(Path.GetFullPath("."), webHostOptions);
26Assert.Equal(Path.GetFullPath("."), env.ContentRootPath);
27Assert.Equal(Path.GetFullPath("testroot"), env.WebRootPath);
37env.Initialize(Path.GetFullPath("testroot"), CreateWebHostOptions());
39Assert.Equal(Path.GetFullPath("testroot"), env.ContentRootPath);
40Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.WebRootPath);
50env.Initialize(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), CreateWebHostOptions());
52Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.ContentRootPath);
71env.Initialize(Path.GetFullPath("."), webHostOptions);
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Extensions.Tests (11)
Microsoft.AspNetCore.Http.Microbenchmarks (7)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.Http.Results.Tests (59)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (40)
38var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
69var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
101var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
128var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
158var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
186var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
215var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
242var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
270var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
294var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
327var path = Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile_ASCII.txt"));
337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name);
347var path = Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt"));
357Assert.Equal(Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
Microsoft.AspNetCore.HttpLogging (4)
Microsoft.AspNetCore.HttpLogging.Tests (23)
FileLoggerProcessorTests.cs (21)
22TempPath = Path.Combine(Environment.CurrentDirectory, "_");
34var path = Path.Combine(TempPath, Path.GetRandomFileName());
70var path = Path.Combine(TempPath, Path.GetRandomFileName());
112var path = Path.Combine(TempPath, Path.GetRandomFileName());
152var path = Path.Combine(TempPath, Path.GetRandomFileName());
154File.WriteAllText(Path.Combine(path, "randomFile.txt"), "Text");
207var path = Path.Combine(TempPath, Path.GetRandomFileName());
272var path = Path.Combine(TempPath, Path.GetRandomFileName());
358var path = Path.Combine(TempPath, Path.GetRandomFileName());
421var path = Path.Combine(TempPath, Path.GetRandomFileName());
490var path = Path.Combine(TempPath, Path.GetRandomFileName());
589return Path.Combine(path, GetLogFileName(prefix, dateTime, fileNumber));
Microsoft.AspNetCore.Identity.Test (6)
IdentityUIScriptsTest.cs (6)
84var wwwrootDir = Path.Combine(GetProjectBasePath(), "assets", scriptTag.Version);
87Path.Combine(wwwrootDir, scriptTag.FallbackSrc.Replace("Identity", "").TrimStart('~').TrimStart('/')));
109var uiDirV4 = Path.Combine(GetProjectBasePath(), "Areas", "Identity", "Pages", "V4");
110var uiDirV5 = Path.Combine(GetProjectBasePath(), "Areas", "Identity", "Pages", "V5");
166return Directory.Exists(projectPath) ? projectPath : Path.Combine(FindHelixSlnFileDirectory(), "UI");
171var applicationPath = Path.GetDirectoryName(typeof(IdentityUIScriptsTest).Assembly.Location);
Microsoft.AspNetCore.Identity.UI (4)
Microsoft.AspNetCore.InternalTesting (16)
Microsoft.AspNetCore.InternalTesting.Tests (16)
Microsoft.AspNetCore.Mvc.Core (3)
Microsoft.AspNetCore.Mvc.Core.Test (62)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (40)
38var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
69var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
101var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
128var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
158var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
186var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
215var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
242var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
270var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
294var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
327var path = Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile_ASCII.txt"));
337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name);
347var path = Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt"));
357Assert.Equal(Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
Microsoft.AspNetCore.Mvc.Localization (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (18)
FileProviderRazorProjectFileSystemTest.cs (17)
53Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath);
60Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), file.PhysicalPath);
89var file5 = fileProvider.AddFile(Path.Combine("Level1-Dir2", "File5.cshtml"), "content");
104Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath);
111Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File2.cshtml"), file.PhysicalPath);
112Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath);
118Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File3.cshtml"), file.PhysicalPath);
119Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath);
125Assert.Equal(Path.Combine("BasePath", "Level1-Dir2", "File5.cshtml"), file.PhysicalPath);
126Assert.Equal(Path.Combine("Level1-Dir2", "File5.cshtml"), file.RelativePhysicalPath);
154var file5 = fileProvider.AddFile(Path.Combine("Level1-Dir2", "File5.cshtml"), "content");
169Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File2.cshtml"), file.PhysicalPath);
170Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath);
176Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File3.cshtml"), file.PhysicalPath);
177Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath);
199Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), item.PhysicalPath);
221Assert.Equal(Path.Combine("BasePath2", "File3.cshtml"), item.PhysicalPath);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
Microsoft.AspNetCore.Mvc.Testing (5)
Microsoft.AspNetCore.Mvc.Views.TestCommon (5)
Microsoft.AspNetCore.OpenApi.Build.Tests (16)
Microsoft.AspNetCore.OpenApi.Tests (2)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Microsoft.AspNetCore.Server.IIS (4)
Microsoft.AspNetCore.Server.IntegrationTesting (22)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (23)
IISDeployer.cs (11)
100_debugLogFile = Path.GetTempFileName();
113IISDeploymentParameters.ServerConfigLocation = Path.Combine(@"C:\inetpub\temp\apppools", _appPoolName, $"{_appPoolName}.config");
185var file = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, debugLogLocation);
308_configPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
309_applicationHostConfig = Path.Combine(_configPath, "applicationHost.config");
510HelixHelper.PreserveFile(Path.Combine(DeploymentParameters.PublishedApplicationRootPath, "web.config"), fileNamePrefix + ".web.config");
511HelixHelper.PreserveFile(Path.Combine(_configPath, "applicationHost.config"), fileNamePrefix + ".applicationHost.config");
512HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\ApplicationHost.config"), fileNamePrefix + ".inetsrv.applicationHost.config");
513HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\redirection.config"), fileNamePrefix + ".inetsrv.redirection.config");
514var tmpFile = Path.GetRandomFileName();
IISExpressDeployer.cs (7)
69var entryPoint = Path.Combine(dllRoot, DeploymentParameters.ApplicationName + executableExtension);
120dllRoot = Path.Combine(DeploymentParameters.ApplicationPath, "bin", DeploymentParameters.RuntimeArchitecture.ToString(),
126dllRoot = Path.Combine(DeploymentParameters.ApplicationPath, "bin", DeploymentParameters.Configuration, targetFramework);
185WorkingDirectory = Path.GetDirectoryName(iisExpressPath)
298var webConfigPath = Path.Combine(contentRoot, "web.config");
308DeploymentParameters.ServerConfigLocation = Path.GetTempFileName();
384var iisExpressPath = Path.Combine(Environment.GetEnvironmentVariable("SystemDrive") + "\\", programFiles, "IIS Express", "iisexpress.exe");
Microsoft.AspNetCore.Server.Kestrel.Core (28)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (23)
CertificatePathWatcherTests.cs (20)
22var fileName = Path.GetRandomFileName();
23var filePath = Path.Combine(dir, fileName);
79dirs[i] = Path.Combine(rootDir, $"dir{i}");
122var fileName = Path.GetRandomFileName();
123var filePath = Path.Combine(dir, fileName);
172var fileName = Path.GetRandomFileName();
173var filePath = Path.Combine(dir, fileName);
211var dir = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
222Path = Path.Combine(dir, "test.pfx"),
239var fileName = Path.GetRandomFileName();
240var filePath = Path.Combine(dir, fileName);
273var fileName = Path.GetRandomFileName();
274var filePath = Path.Combine(dir, fileName);
313var fileName = Path.GetRandomFileName();
314var filePath = Path.Combine(dir, fileName);
344var fileName = Path.GetRandomFileName();
345var filePath = Path.Combine(dir, fileName);
404var fileName = Path.GetRandomFileName();
405var filePath = Path.Combine(dir, fileName);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Tests (49)
GeneratedCodeTests.cs (10)
24var httpHeadersGeneratedPath = Path.Combine(AppContext.BaseDirectory, "shared", "GeneratedContent", "HttpHeaders.Generated.cs");
25var httpProtocolGeneratedPath = Path.Combine(AppContext.BaseDirectory, "shared", "GeneratedContent", "HttpProtocol.Generated.cs");
26var httpUtilitiesGeneratedPath = Path.Combine(AppContext.BaseDirectory, "shared", "GeneratedContent", "HttpUtilities.Generated.cs");
27var transportMultiplexedConnectionGeneratedPath = Path.Combine(AppContext.BaseDirectory, "shared", "GeneratedContent", "TransportMultiplexedConnection.Generated.cs");
28var transportConnectionGeneratedPath = Path.Combine(AppContext.BaseDirectory, "shared", "GeneratedContent", "TransportConnection.Generated.cs");
30var testHttpHeadersGeneratedPath = Path.GetTempFileName();
31var testHttpProtocolGeneratedPath = Path.GetTempFileName();
32var testHttpUtilitiesGeneratedPath = Path.GetTempFileName();
33var testTransportMultiplexedConnectionGeneratedPath = Path.GetTempFileName();
34var testTransportConnectionGeneratedPath = Path.GetTempFileName();
HttpsConfigurationTests.cs (6)
28serverOptions.TestOverrideDefaultCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword");
90new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")),
127new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")),
160new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")),
193serverOptions.TestOverrideDefaultCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword");
222ServerCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"),
KestrelConfigurationLoaderTests.cs (30)
279Directory.CreateDirectory(Path.GetDirectoryName(path));
320Directory.CreateDirectory(Path.GetDirectoryName(devCertPath));
446Directory.CreateDirectory(Path.GetDirectoryName(path));
493Directory.CreateDirectory(Path.GetDirectoryName(path));
542Directory.CreateDirectory(Path.GetDirectoryName(path));
595new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
596new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key"))
619new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
620new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-ecdsa.key")),
644new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
645new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key")),
669new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
670new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.pub")),
702var certificate = new X509Certificate2(TestResources.GetCertPath(Path.ChangeExtension(certificateFile, "crt")));
708new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", certificateFile)),
709new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", certificateKey)),
736Directory.CreateDirectory(Path.GetDirectoryName(path));
892Directory.CreateDirectory(Path.GetDirectoryName(certificatePath));
972var oldDir = Directory.CreateDirectory(Path.Combine(tempDir, "old"));
973var newDir = Directory.CreateDirectory(Path.Combine(tempDir, "new"));
974var oldCertPath = Path.Combine(oldDir.FullName, "tls.key");
975var newCertPath = Path.Combine(newDir.FullName, "tls.key");
977var dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./old");
978var fileLink = File.CreateSymbolicLink(Path.Combine(tempDir, "tls.key"), "./link/tls.key");
1023dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./new");
1380var certPath = Path.Combine("shared", "TestCertificates", "https-ecdsa.pem");
1381var keyPath = Path.Combine("shared", "TestCertificates", "https-ecdsa.key");
1896var basePath = appData != null ? Path.Combine(appData, "ASP.NET", "https") : null;
1897basePath = basePath ?? (home != null ? Path.Combine(home, ".aspnet", "https") : null);
1898return Path.Combine(basePath, $"TestApplication.pfx");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (4)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Microsoft.AspNetCore.SpaProxy (6)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.StaticAssets.Tests (11)
StaticAssetsIntegrationTests.cs (11)
325var filePath = Path.Combine(webRoot, "sample.txt");
382File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
435File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
444Assert.Equal(GetGzipEtag(Path.Combine(webRoot, "sample.txt")), response.Headers.ETag.Tag);
473var contentRoot = Path.Combine(AppContext.BaseDirectory, appName);
474var webRoot = Path.Combine(contentRoot, "wwwroot");
482var manifestPath = Path.Combine(AppContext.BaseDirectory, $"{appName}.staticwebassets.endpoints.json");
491var filePath = Path.Combine(webRoot, resource.Path);
514var compressedFilePath = Path.Combine(webRoot, resource.Path + ".gz");
1036return Path.GetExtension(filePath) switch
1085public string Name => Path.GetFileName(testResource.Path);
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (7)
Microsoft.AspNetCore.StaticFiles.Tests (33)
StaticFileMiddlewareTests.cs (19)
51var badLink = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName() + ".txt");
53Process.Start("ln", $"-s \"/tmp/{Path.GetRandomFileName()}\" \"{badLink}\"").WaitForExit();
72var response = await server.CreateClient().GetAsync(Path.GetFileName(badLink));
177using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
185var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
213using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
224var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
253using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
266var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
296using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
316var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
340using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, ".")))
359var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
388using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, ".")))
444using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, "."));
470using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
478var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
530using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.Tests (47)
WebApplicationTests.cs (47)
389var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
390var webRoot = Path.Combine(contentRoot, "wwwroot");
409var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
410var webRoot = Path.Combine(contentRoot, "wwwroot");
466var contentRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
474builder.Host.UseContentRoot(contentRoot + Path.DirectorySeparatorChar);
478builder.WebHost.UseContentRoot(contentRoot + Path.DirectorySeparatorChar);
500var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
502var fullWebRootPath = Path.Combine(contentRoot, "wwwroot2");
529var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
531var fullWebRootPath = Path.Combine(contentRoot, "wwwroot");
571var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
573var fullWebRootPath = Path.Combine(contentRoot, "wwwroot");
620builder.Host.UseContentRoot(Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory));
624builder.WebHost.UseContentRoot(Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory));
631Path.TrimEndingDirectorySeparator(Path.GetFullPath(unnormalizedPath));
786var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
789var fullWebRootPath = Path.Combine(contentRoot, webRoot);
829var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
832var fullWebRootPath = Path.Combine(contentRoot, webRoot);
878var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
881var fullWebRootPath = Path.Combine(contentRoot, webRoot);
1077var contentRoot = Path.GetTempPath().ToString();
2214var wwwroot = Path.Combine(AppContext.BaseDirectory, "wwwroot");
2247var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
2279ContentRootPath = Path.GetTempPath()
2298Assert.Equal(Path.GetTempPath(), hostEnv.ContentRootPath);
Microsoft.AspNetCore.WebSockets.ConformanceTests (9)
Microsoft.AspNetCore.WebUtilities (6)
Microsoft.AspNetCore.WebUtilities.Tests (3)
Microsoft.Build (346)
BackEnd\Components\Scheduler\Scheduler.cs (4)
2568using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2592using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2706using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2746using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
Evaluation\Evaluator.cs (8)
1186string projectFileWithoutExtension = EscapingUtilities.Escape(Path.GetFileNameWithoutExtension(_projectRootElement.FullPath));
1187string projectExtension = EscapingUtilities.Escape(Path.GetExtension(_projectRootElement.FullPath));
1190string projectFullPath = Path.Combine(projectDirectory, projectFile);
1192int rootLength = Path.GetPathRoot(projectDirectory).Length;
1847ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
1860ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
2089if (directoryOfImportingFile != null && !Path.IsPathRooted(importFileUnescaped))
2091importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Evaluation\Expander\WellKnownFunctions.cs (22)
38var logFile = Path.Combine(Directory.GetCurrentDirectory(), fileName);
50if (string.Equals(methodName, nameof(Path.Combine), StringComparison.OrdinalIgnoreCase))
62returnVal = Path.Combine(arg0);
69returnVal = Path.Combine(arg0, arg1);
76returnVal = Path.Combine(arg0, arg1, arg2);
83returnVal = Path.Combine(arg0, arg1, arg2, arg3);
90returnVal = Path.Combine(Array.ConvertAll(args, o => (string)o));
96else if (string.Equals(methodName, nameof(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase))
100returnVal = Path.DirectorySeparatorChar;
104else if (string.Equals(methodName, nameof(Path.GetFullPath), StringComparison.OrdinalIgnoreCase))
108returnVal = Path.GetFullPath(arg0);
112else if (string.Equals(methodName, nameof(Path.IsPathRooted), StringComparison.OrdinalIgnoreCase))
116returnVal = Path.IsPathRooted(arg0);
120else if (string.Equals(methodName, nameof(Path.GetTempPath), StringComparison.OrdinalIgnoreCase))
124returnVal = Path.GetTempPath();
128else if (string.Equals(methodName, nameof(Path.GetFileName), StringComparison.OrdinalIgnoreCase))
132returnVal = Path.GetFileName(arg0);
136else if (string.Equals(methodName, nameof(Path.GetDirectoryName), StringComparison.OrdinalIgnoreCase))
140returnVal = Path.GetDirectoryName(arg0);
144else if (string.Equals(methodName, nameof(Path.GetFileNameWithoutExtension), StringComparison.OrdinalIgnoreCase))
148returnVal = Path.GetFileNameWithoutExtension(arg0);
836else if (receiverType == typeof(Path))
FileUtilities.cs (38)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
277path.Substring(start) + Path.DirectorySeparatorChar);
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
498return NormalizePath(Path.Combine(paths));
517Path.HasExtension(uncheckedFullPath);
521return IsUNCPath(uncheckedFullPath) ? Path.GetFullPath(uncheckedFullPath) : uncheckedFullPath;
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
FrameworkLocationHelper.cs (31)
410? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
420? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
430? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
440? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
450? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
460? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
470? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
480? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
557Path.DirectorySeparatorChar.ToString(),
561Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
566s_pathToV35ToolsInFallbackDotNetFrameworkSdk += Path.DirectorySeparatorChar;
606s_pathToV4ToolsInFallbackDotNetFrameworkSdk = Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin", "NetFX 4.0 Tools");
781var frameworkPath = Path.Combine(NativeMethodsShared.FrameworkBasePath, prefix ?? string.Empty);
791return Path.Combine(complusInstallRoot, complusVersion);
796string leaf = Path.GetFileName(currentRuntimePath);
804string baseLocation = Path.GetDirectoryName(currentRuntimePath);
924combinedPath = Path.GetFullPath(combinedPath);
932? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
933: Path.Combine(NativeMethodsShared.FrameworkBasePath, "xbuild-frameworks");
935return Path.GetFullPath(combinedPath);
983string path = Path.Combine(targetFrameworkRootPath, frameworkName.Identifier, "v" + frameworkName.Version.ToString());
986path = Path.Combine(path, "Profile", frameworkName.Profile);
989return Path.GetFullPath(path);
1013var endedWithASlash = path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)
1015Path.AltDirectorySeparatorChar.ToString(),
1034fixedPath += Path.DirectorySeparatorChar;
1092string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1390Path.GetDirectoryName(typeof(object).Module.FullyQualifiedName),
1402(!File.Exists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) &&
1403!File.Exists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1435frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Microsoft.Build.BuildCheck.UnitTests (65)
ConfigurationProvider_Tests.cs (10)
33var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
55var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
89var customConfiguration = configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
115var buildConfig = configurationProvider.GetUserConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
146configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
151configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
178configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
183configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
209configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
214configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
EndToEndTests.cs (45)
35private static string AssemblyLocation { get; } = Path.Combine(Path.GetDirectoryName(typeof(EndToEndTests).Assembly.Location) ?? AppContext.BaseDirectory);
37private static string TestAssetsRootPath { get; } = Path.Combine(AssemblyLocation, "TestAssets");
162CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
163ReplaceStringInFile(Path.Combine(workFolder.Path, referencedProjectName, $"{referencedProjectName}.csproj"),
166Path.Combine(workFolder.Path, referencedProjectName, "Resource1.resx"),
167Path.Combine(workFolder.Path, referencedProjectName, $"Resource1.{resourceExtension}.resx"));
169_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
176string[] depsFiles = Directory.GetFiles(Path.Combine(workFolder.Path, entryProjectName), $"{entryProjectName}.deps.json", SearchOption.AllDirectories);
272CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
274_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
377CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
378ReplaceStringInFile(Path.Combine(workFolder.Path, $"{projectName}.csproj"),
545$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore" +
580var projectDirectory = Path.GetDirectoryName(projectFile.Path);
584$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore {(checkRequested ? "-check" : string.Empty)} -bl:{logFile}",
593$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic",
635$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check",
659string checkCandidatePath = Path.Combine(TestAssetsRootPath, "CheckCandidate");
665string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
675$"{Path.Combine(checkCandidatePath, $"CheckCandidate.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success, timeoutMilliseconds: 1200_0000);
694string? projectDirectory = Path.GetDirectoryName(projectFile.Path);
698$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -bl:{logFile}",
704$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic {(checkRequested ? "-check" : string.Empty)}",
749$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output);
785$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output);
809$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -restore -check" +
839var checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
843$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n",
872string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
876string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
883$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool _);
901string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
905string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
912$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success);
932$"{Path.GetFileName(projectFile.Path)} /m:1 -nr:False -t:restore -check",
947var nugetTemplatePath = Path.Combine(TestAssetsRootPath, "CheckCandidate", nugetTemplateName);
948File.Copy(nugetTemplatePath, Path.Combine(workFolder.Path, nugetTemplateName));
957var buildCheckTemplatePath = Path.Combine(BuildCheckUnitTestsConstants.RepoRoot, "template_feed", "content", "Microsoft.CheckTemplate");
972var nugetTemplatePath = Path.Combine(checkCandidatePath, "nugetTemplate.config");
981string checksPackagesPath = Path.Combine(Directory.GetParent(AssemblyLocation)?.Parent?.FullName ?? string.Empty, "CustomChecks");
987doc.Save(Path.Combine(checkCandidatePath, "nuget.config"));
1039_env.SetCurrentDirectory(Path.GetDirectoryName(projectFile.Path));
1049File.ReadAllText(Path.Combine(TestAssetsRootPath, testAssetsFolderName, fileName))
1073string configContent = File.ReadAllText(Path.Combine(TestAssetsRootPath, testAssetsFolderName, $"{EditorConfigFileName}test"));
Microsoft.Build.CommandLine.UnitTests (53)
XMake_Tests.cs (39)
1099string tempdir = Path.GetTempPath();
1100string projectFileName = Path.Combine(tempdir, "msbEnvironmenttest.proj");
1137string tempdir = Path.GetTempPath();
1138string projectFileName = Path.Combine(tempdir, "msbLoggertest.proj");
1139string logFile = Path.Combine(tempdir, "logFile");
1185? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe")
1237Directory.SetCurrentDirectory(Path.GetDirectoryName(RunnerUtilities.PathToCurrentlyRunningMsBuildExe));
1260string projectPath = Path.Combine(directory, "my.proj");
1261string rspPath = Path.Combine(directory, AutoResponseFileName);
1367directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
1369string projectPath = Path.Combine(directory, "my.proj");
1370string rspPath = Path.Combine(directory, AutoResponseFileName);
1373string exePath = Path.Combine(exeDirectory, MSBuildExeName);
1374string mainRspPath = Path.Combine(exeDirectory, AutoResponseFileName);
1411string projectPath = Path.Combine(directory, "my.proj");
1412string rspPath = Path.Combine(directory, AutoResponseFileName);
1413string exePath = Path.Combine(directory, MSBuildExeName);
1526output.ShouldContain($"[A={directory.Path}{Path.DirectorySeparatorChar}]");
1970if (Path.GetExtension(file).Contains("proj"))
1986string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2009string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2127distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2140distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2153distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2166distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($";Parameter1;logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2183fileLoggerParameters = new[] { "Parameter1", "verbosity=Normal;logfile=" + Path.Combine("..", "cat.log") + ";Parameter1" };
2190distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"Parameter1;verbosity=Normal;logFile={Path.Combine(Directory.GetCurrentDirectory(), "..", "cat.log")};Parameter1", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2199distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"Parameter1;Parameter;;;Parameter;Parameter;logFile={Path.Combine(Directory.GetCurrentDirectory(), "msbuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2721string binlogPath = Path.Combine(testProject.TestRoot, match.Groups[1] + ".binlog");
2768string source = Path.GetDirectoryName(RunnerUtilities.PathToCurrentlyRunningMsBuildExe);
2769dest = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
2781if (Path.GetFileName(d).Equals("TestTemp", StringComparison.InvariantCultureIgnoreCase))
2790File.Copy(file, Path.Combine(dest, Path.GetFileName(file)));
2795string dirName = Path.GetFileName(directory);
2796string destSubDir = Path.Combine(dest, dirName);
2835File.WriteAllText(Path.Combine(testProject.TestRoot, item.Key), item.Value);
Microsoft.Build.Engine.OM.UnitTests (217)
Construction\ProjectRootElement_Tests.cs (16)
159Assert.Equal(project.FullPath, Path.Combine(Directory.GetCurrentDirectory(), "X"));
188projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
206ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
225ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
242projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
535string path = Path.Combine(toolsPath, target);
634directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
636string path = Path.Combine(directory, file);
662Directory.SetCurrentDirectory(Path.GetTempPath()); // should be used for project.DirectoryPath; it must exist
666string file = "bar" + Path.DirectorySeparatorChar + "foo.proj";
667string path = Path.Combine(curDir, file);
668directory = Path.Combine(curDir, "bar");
1672var fullPath = Path.GetFullPath("foo");
1775projectFileAssert.Invoke(Path.GetDirectoryName(initialLocation), Path.GetDirectoryName(reloadLocation), rootElement.DirectoryPath);
Definition\DefinitionEditing_Tests.cs (17)
285string wildcard = Path.Combine(Path.GetDirectoryName(paths[0]), "*.xxx;");
667string directory = Path.GetDirectoryName(paths[0]);
668string wildcard = Path.Combine(directory, "*.xxx;");
788string directory = Path.GetDirectoryName(paths[0]);
789string wildcard = Path.Combine(directory, "*.xxx;");
1093string directory = Path.GetDirectoryName(paths[0]);
1094string wildcard = Path.Combine(directory, "*.xxx;");
1111ProjectCollection.Escape(Path.Combine(directory, "i2.xxx")));
1133string directory = Path.GetDirectoryName(paths[0]);
1134string wildcard = Path.Combine(directory, "*.xxx;");
1143item.Rename(Path.Combine(directory, "i2.xxx"));
1388string directory = Path.GetDirectoryName(paths[0]);
1389string wildcard = Path.Combine(directory, "*.xxx;");
1408ProjectCollection.Escape(Path.Combine(directory, "i2.xxx")));
2209string wildcard = Path.Combine(Path.GetDirectoryName(paths[0]), "*.xxx;");
Definition\Project_Tests.cs (42)
206string file = Path.GetTempPath() + Path.DirectorySeparatorChar + Guid.NewGuid().ToString("N");
654Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386", "foo.dll"));
685project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
686projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
690project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
691projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
721project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
722projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
757project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
758projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
777<IntermediateAssembly Include='obj" + Path.DirectorySeparatorChar + "i386"
778+ Path.DirectorySeparatorChar
796project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386"));
797projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386"));
1730testFileRoot = Path.Combine(Path.GetTempPath(), "foodir");
1736string filePath = Path.Combine(testFileRoot, fileName);
1742projectConstruction.AddItem("foo", Path.Combine(testFileRoot, "*.foo"));
2490directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
2491string subdirectory = Path.Combine(directory, "sub");
2494string projectPath = Path.Combine(subdirectory, "a.proj");
2495string targetsPath = Path.Combine(directory, "b.targets");
2497string unevaluatedInclude = ".." + Path.DirectorySeparatorChar + "*";
2498string evaluatedInclude = ".." + Path.DirectorySeparatorChar + "b.targets";
2596string myTempDir = Path.Combine(Path.GetTempPath() + "MyTempDir");
2603ProjectRootElement one = ProjectRootElement.Create(Path.Combine(myTempDir, "1.targets"));
2607ProjectRootElement two = ProjectRootElement.Create(Path.Combine(myTempDir, "2.targets"));
2611ProjectRootElement zero = ProjectRootElement.Create(Path.Combine(myTempDir, "0.targets"));
2615zero.AddImport(Path.Combine(myTempDir, "*.targets"));
3294var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "1.foo");
3772var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "a.cs");
4111string importPath = Path.Combine(pre.DirectoryPath, Guid.NewGuid().ToString());
4154string importGlob = Path.Combine(pre.DirectoryPath, @"__NoMatch__\**");
Definition\ProjectItem_Tests.cs (22)
350directory = Path.Combine(Path.GetTempPath(), "a");
356subdirectory = Path.Combine(directory, "b");
362file = Path.Combine(subdirectory, "c");
397directory = Path.Combine(Path.GetTempPath(), "a");
403subdirectory = Path.Combine(directory, "b");
409file = Path.Combine(subdirectory, "c");
761expectedInclude = expectedInclude.Select(p => setSlashes(p, Path.DirectorySeparatorChar)).ToArray();
1091? Path.GetFullPath(Path.Combine(testRoot, relativeFragmentFromRootToFile, file))
1092: Path.Combine(relativeFragmentFromRootToFile, file);
1102var projectFileDir = Path.GetDirectoryName(projectFile);
1985string projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
1989string sourceFile = Path.Combine(projectDirectory, "a.cs");
1990string renamedSourceFile = Path.Combine(projectDirectory, "b.cs");
1994project.FullPath = Path.Combine(projectDirectory, "test.proj"); // assign a path so the wildcards can lock onto something.
1998Assert.Equal(Path.GetFileName(sourceFile), projectItem.EvaluatedInclude);
2000projectItem.Rename(Path.GetFileName(renamedSourceFile));
2004Assert.Equal(Path.GetFileName(renamedSourceFile), projectItem.EvaluatedInclude);
FileUtilities.cs (36)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar)));
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
498return NormalizePath(Path.Combine(paths));
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
Instance\ProjectInstance_Tests.cs (22)
285directory = Path.Combine(Path.GetTempPath(), "WildcardsInsideTargets");
287file1 = Path.Combine(directory, "a.exe");
288file2 = Path.Combine(directory, "b.exe");
289file3 = Path.Combine(directory, "c.bat");
294string path = Path.Combine(directory, "*.exe");
420projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
421projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
456projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
457projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
499string tempDir = Path.GetTempFileName();
502File.Create(Path.Combine(tempDir, "aItem.cs")).Dispose();
504projA.FullPath = Path.Combine(tempDir, "a.proj");
505projB.FullPath = Path.Combine(tempDir, "b.proj");
530string projectA = Path.Combine(ObjectModelHelpers.TempProjectDir, "a.proj");
531string projectB = Path.Combine(ObjectModelHelpers.TempProjectDir, "b.proj");
533string includeFileA = Path.Combine(ObjectModelHelpers.TempProjectDir, "aaa4.cs");
534string includeFileB = Path.Combine(ObjectModelHelpers.TempProjectDir, "bbb4.cs");
Microsoft.Build.Engine.UnitTests (842)
BackEnd\BuildRequestEngine_Tests.cs (3)
442BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
448BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
466Assert.Equal(Path.GetFullPath("OtherFile"), _newConfiguration_Config.ProjectFullPath);
BackEnd\SdkResolverLoader_Tests.cs (26)
62var d1 = Directory.CreateDirectory(Path.Combine(root, "Resolver1"));
65var f1 = Path.Combine(d1.FullName, "Resolver1.dll");
68var f2 = Path.Combine(d1.FullName, "Dependency.dll");
69var f3 = Path.Combine(d1.FullName, "InvalidName.dll");
70var f4 = Path.Combine(d1.FullName, "NoResolver.txt");
95var testFolder = Directory.CreateDirectory(Path.Combine(root, "MyTestResolver"));
97var wrongResolverDll = Path.Combine(testFolder.FullName, "MyTestResolver.dll");
98var resolverManifest = Path.Combine(testFolder.FullName, "MyTestResolver.xml");
99var assemblyToLoad = Path.Combine(root, "SomeOtherResolver.dll");
221var resolverPath = Path.Combine(root, "MyTestResolver");
222var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
246var resolverPath = Path.Combine(root, "MyTestResolver");
247var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
273var resolverPath = Path.Combine(root, "MyTestResolver");
274var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
297var resolverPath = Path.Combine(root, "MyTestResolver");
313var resolverPath = Path.Combine(root, "MyTestResolver");
314var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
371var resolver1Path = Path.Combine(additionalRoot, resolver1, $"{resolver1}.dll");
372Directory.CreateDirectory(Path.Combine(testRoot, resolver1));
373File.WriteAllText(Path.Combine(testRoot, resolver1, $"{resolver1}.dll"), string.Empty);
374Directory.CreateDirectory(Path.Combine(additionalRoot, resolver1));
377var resolver2Path = Path.Combine(testRoot, resolver2, $"{resolver2}.dll");
378Directory.CreateDirectory(Path.Combine(testRoot, resolver2));
381var resolver3Path = Path.Combine(additionalRoot, resolver3, $"{resolver3}.dll");
382Directory.CreateDirectory(Path.Combine(additionalRoot, resolver3));
BackEnd\SdkResultOutOfProc_Tests.cs (10)
107string projectPath = Path.Combine(projectFolder, "TestProject.proj");
142string entryProjectPath = Path.Combine(projectFolder, "EntryProject.proj");
152string projectWithSdkImportPath = Path.Combine(projectFolder, "ProjectWithSdkImport.proj");
200var sdkResolver = SetupSdkResolver(Path.GetDirectoryName(projectPath));
216Directory.CreateDirectory(Path.Combine(projectFolder, "Sdk1"));
217Directory.CreateDirectory(Path.Combine(projectFolder, "Sdk2"));
233File.WriteAllText(Path.Combine(projectFolder, "Sdk1", "Sdk.props"), CleanupFileContents(sdk1propsContents));
234File.WriteAllText(Path.Combine(projectFolder, "Sdk2", "Sdk.props"), CleanupFileContents(sdk2propsContents));
241Path.Combine(projectFolder, "Sdk1"),
242Path.Combine(projectFolder, "Sdk2")
BinaryLogger_Tests.cs (15)
358RunnerUtilities.ExecMSBuild($"{_logFile} -flp:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic", out success);
361string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
415RunnerUtilities.ExecMSBuild($"{projectFile.Path} -nr:False -bl:{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile2.log")};verbosity=normal", out bool success);
420string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
424string text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile2.log"));
427RunnerUtilities.ExecMSBuild($"{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile3.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile4.log")};verbosity=normal", out success);
429text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile3.log"));
433text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile4.log"));
458var projectImportsZipPath = Path.ChangeExtension(_logFile, ".ProjectImports.zip");
478string symlinkPath = Path.Combine(testFolder2.Path, symlinkName);
479string symlinkLvl2Path = Path.Combine(testFolder2.Path, symlinkLvl2Name);
518var projectImportsZipPath = Path.ChangeExtension(_logFile, ".ProjectImports.zip");
665string expectedLog = Path.GetFullPath(expectedBinlogFile);
BuildEnvironmentHelper_Tests.cs (32)
26var msbuildPath = Path.GetDirectoryName(FileUtilities.ExecutingAssemblyPath);
27string expectedMSBuildPath = Path.Combine(msbuildPath, MSBuildExeName).ToLowerInvariant();
35Path.GetDirectoryName(expectedMSBuildPath).ShouldBe(toolsDirectoryPath);
45var msBuildPath = Path.Combine(path, MSBuildExeName);
46var msBuildConfig = Path.Combine(path, $"{MSBuildExeName}.config");
72var msBuildPath = Path.Combine(msbuildBinDirectory, MSBuildExeName);
73var msBuildConfig = Path.Combine(msbuildBinDirectory, $"{MSBuildExeName}.config");
74var vsMSBuildDirectory = Path.Combine(env.TempFolderRoot, "MSBuild");
183Path.GetFileName(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath).ShouldBe(MSBuildExeName);
358var msBuild64Exe = Path.Combine(env.BuildDirectory, "amd64", MSBuildExeName);
363BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
379BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
404var entryProcess = Path.Combine(Path.GetTempPath(), "foo.exe");
409BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory.ShouldBe(Path.GetDirectoryName(entryProcess));
420var msBuildAssembly = Path.Combine(env.BuildDirectory, "Microsoft.Build.dll");
437var msBuildAssembly = Path.Combine(env.BuildDirectory64, "Microsoft.Build.dll");
462public string MSBuildExePath64 => Path.Combine(BuildDirectory64, MSBuildExeName);
469BuildDirectory = Path.Combine(TempFolderRoot, "MSBuild", toolsVersion, "Bin");
470BuildDirectory64 = Path.Combine(BuildDirectory, "amd64");
471DevEnvPath = Path.Combine(TempFolderRoot, "Common7", "IDE", "devenv.exe");
472BlendPath = Path.Combine(TempFolderRoot, "Common7", "IDE", "blend.exe");
477File.WriteAllText(Path.Combine(BuildDirectory, file), string.Empty);
483File.WriteAllText(Path.Combine(BuildDirectory64, file), string.Empty);
486Directory.CreateDirectory(Path.Combine(TempFolderRoot, "Common7", "IDE"));
505public string MSBuildExePath => Path.Combine(BuildDirectory, MSBuildExeName);
516TempFolderRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
517BuildDirectory = Path.Combine(TempFolderRoot, "MSBuild");
527Directory.CreateDirectory(Path.Combine(BuildDirectory, "amd64"));
528File.WriteAllText(Path.Combine(BuildDirectory, "amd64", msBuildExeName), string.Empty);
529File.WriteAllText(Path.Combine(BuildDirectory, "amd64", $"{MSBuildExePath}.config"), string.Empty);
Construction\SolutionFile_OldParser_Tests.cs (26)
170string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
221string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
222string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproja.proj");
322Project('{F14B399A-7131-4C87-9E4B-1186C45EF12D}') = 'RptProj', '" + Path.GetFileName(rptprojPath) + @"', '{CCCCCCCC-9925-4D57-9DAF-E0A9D936ABDB}'
326Project('{D2ABAB84-BF74-430A-B69E-9DC6D40DDA17}') = 'DwProj', '" + Path.GetFileName(dqprojPath) + @"', '{DEA89696-F42B-4B58-B7EE-017FF40817D1}'
346string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
347string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj2.etp");
541string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
542string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj2.etp");
543string proj3Path = Path.Combine(FileUtilities.TempFileDirectory, "ETPProjUpgradeTest", "someproj3.etp");
588<FILE>" + Path.Combine("..", "SomeFolder", "ClassLibrary1.csproj") + @"</FILE>
596Directory.CreateDirectory(Path.Combine(FileUtilities.TempFileDirectory, "ETPProjUpgradeTest"));
613solution.ProjectsInOrder[3].RelativePath.ShouldBe(Path.Combine("ETPProjUpgradeTest", "..", "SomeFolder", "ClassLibrary1.csproj"));
631string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
689string proj1Path = Path.Combine(Path.GetTempPath(), "someproj.etp");
773var solutionFolder = env.CreateFolder(Path.Combine(FileUtilities.GetTemporaryDirectory(), "sln"));
774env.CreateFolder(Path.Combine(solutionFolder.Path, "RelativePath"));
777p.FullPath = Path.Combine(solutionFolder.Path, "RelativePath", "project file");
778p.SolutionFileDirectory = Path.GetFullPath(solutionFolder.Path);
786proj.RelativePath.ShouldBe(Path.Combine("RelativePath", "project file"));
803sp.SolutionFileDirectory = Path.GetTempPath();
2426string expectedRelativePath = Path.Combine("..", "ProjectA", "ProjectA.csproj");
2429solution.ProjectsInOrder[0].AbsolutePath.ShouldBe(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(solution.FullPath)!, expectedRelativePath)));
Construction\SolutionFilter_Tests.cs (28)
54TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "ClassLibrary"), createFolder: true);
55TransientTestFolder classLibSubFolder = testEnvironment.CreateFolder(Path.Combine(classLibFolder.Path, "ClassLibrary"), createFolder: true);
64TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "SimpleProject"), createFolder: true);
65TransientTestFolder simpleProjectSubFolder = testEnvironment.CreateFolder(Path.Combine(simpleProjectFolder.Path, "SimpleProject"), createFolder: true);
125Directory.GetCurrentDirectory().ShouldNotBe(Path.GetDirectoryName(filterFile.Path));
232TransientTestFolder src = testEnvironment.CreateFolder(Path.Combine(folder.Path, "src"), createFolder: true);
244Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build"", """ + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)) + @""", ""{69BE05E2-CBDA-4D27-9733-44E12B0F5627}""
246Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""MSBuild"", """ + Path.Combine("src", Path.GetFileName(msbuild.Path)) + @""", ""{6F92CA55-1D15-4F34-B1FE-56C0B7EB455E}""
248Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.CommandLine.UnitTests"", """ + Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)) + @""", ""{0ADDBC02-0076-4159-B351-2BF33FAA46B2}""
250Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.Tasks.UnitTests"", """ + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)) + @""", ""{CF999BDE-02B3-431B-95E6-E88D621D9CBF}""
270""" + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!).Replace("\\", "\\\\") + @""",
271""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!).Replace("\\", "\\\\") + @"""
276sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!)).ShouldBeTrue();
277sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!)).ShouldBeTrue();
280(sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)!))
281|| sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(msbuild.Path)!))
282|| sp.ProjectShouldBuild(Path.Combine("src", "notAProject.csproj")))
293folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, $"test@folder%special$symbols"), createFolder: true);
Construction\SolutionProjectGenerator_Tests.cs (24)
122TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
132TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
167TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
183TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
242TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
258TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
910<ProjectConfiguration Project="{786E302A-96CE-43DC-B640-D6B6CC9BF6C0}" AbsolutePath="##temp##{{Path.Combine("Project1", "A.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
911<ProjectConfiguration Project="{881C1674-4ECA-451D-85B6-D7C59B7F16FA}" AbsolutePath="##temp##{{Path.Combine("Project2", "B.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU<ProjectDependency Project="{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}" /></ProjectConfiguration>
912<ProjectConfiguration Project="{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}" AbsolutePath="##temp##{{Path.Combine("Project3", "C.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
1158string tempProjectPath = Path.Combine(FileUtilities.TempFileDirectory, "ClassLibrary1", "ClassLibrary1.csproj");
1161tempProjectPath = Path.GetFullPath(tempProjectPath);
1165tempProjectPath = Path.Combine(FileUtilities.TempFileDirectory, "MainApp", "MainApp.vcxproj");
1166tempProjectPath = Path.GetFullPath(tempProjectPath);
2600string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2620ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2659string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2679ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2737string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2757string projectPath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, projectName),
2769ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.props"),
2778ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.targets"),
2847projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.RelativePath));
Definition\ProjectEvaluationContext_Tests.cs (53)
123{Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 1},
124{Path.Combine(_env.DefaultTestDirectory.Path, "2.file"), 1}
182{ Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 2 }
378File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.cs"), "");
388File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.cs"), "");
438File.WriteAllText(Path.Combine(projectDirectory1, $"1.{evaluationCount}.cs"), "");
439File.WriteAllText(Path.Combine(projectDirectory2, $"2.{evaluationCount}.cs"), "");
445Path.Combine(projectDirectory1, "1"),
448<i Include=`{Path.Combine("**", "*.cs")}` />
452Path.Combine(projectDirectory2, "2"),
455<i Include=`{Path.Combine("**", "*.cs")}` />
462var projectName = Path.GetFileNameWithoutExtension(project.FullPath);
472File.WriteAllText(Path.Combine(projectDirectory1, $"1.{evaluationCount}.cs"), "");
473File.WriteAllText(Path.Combine(projectDirectory2, $"2.{evaluationCount}.cs"), "");
493File.WriteAllText(Path.Combine(project1GlobDirectory, $"1.{evaluationCount}.cs"), "");
494File.WriteAllText(Path.Combine(project2GlobDirectory, $"2.{evaluationCount}.cs"), "");
500Path.Combine(project1Directory, "1"),
503<i Include=`{Path.Combine("..", "Glob", "**", "*.cs")}`/>
507Path.Combine(project2Directory, "2"),
510<i Include=`{Path.Combine("..", "Glob", "**", "*.cs")}`/>
517var projectName = Path.GetFileNameWithoutExtension(project.FullPath);
521.Select(i => Path.Combine("..", "Glob", projectName, $"{projectName}.{i}"))
529File.WriteAllText(Path.Combine(project1GlobDirectory, $"1.{evaluationCount}.cs"), "");
530File.WriteAllText(Path.Combine(project2GlobDirectory, $"2.{evaluationCount}.cs"), "");
555File.WriteAllText(Path.Combine(project1GlobDirectory, $"{evaluationCount}.cs"), "");
562Path.Combine(project1Directory.Path, "1"),
565<i Include=`{Path.Combine("Glob", "**", "*.cs")}` />
570Path.Combine(project2Directory.Path, "2"),
573<i Include=`{Path.Combine(project1Directory.Path, "Glob", "**", "*.cs")}` />
580var projectName = Path.GetFileNameWithoutExtension(project.FullPath);
584.Select(i => Path.Combine("Glob", "1", i))
591.Select(i => Path.Combine(project1Directory.Path, i))
600File.WriteAllText(Path.Combine(project1GlobDirectory, $"{evaluationCount}.cs"), "");
622File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
628Path.Combine(project1Directory.Path, "1"),
635Path.Combine(project2Directory.Path, "2"),
645var projectName = Path.GetFileNameWithoutExtension(project.FullPath);
647? Path.Combine("..", "..", "glob")
648: Path.Combine("..", "..", "..", "glob");
652.Select(i => Path.Combine(globFixedDirectoryPart, i))
660File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
686? Path.Combine("..", "GlobDirectory")
702prependedGlobExpansion[i] = Path.Combine(itemSpecDirectoryPart, globExpansion[i]);
710<i Include=`{Path.Combine("{0}", "**", "*.cs")}`/>
715<i Include=`{Path.Combine("{0}", "**", "*.cs")}`/>
720.Select((p, i) => new ProjectSpecification(Path.Combine(testDirectory.Path, $"ProjectDirectory{i}", $"Project{i}.proj"), p));
726File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
736File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
763File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.props"), $"<Project><ItemGroup><i Include=`{evaluationCount}.cs`/></ItemGroup></Project>".Cleanup());
773File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.props"), $"<Project><ItemGroup><i Include=`{evaluationCount}.cs`/></ItemGroup></Project>".Cleanup());
804var theFile = Path.Combine(projectDirectory, "0.cs");
958projectContents.Select((p, i) => new ProjectSpecification(Path.Combine(_env.DefaultTestDirectory.Path, $"Project{i}.proj"), p)),
992Directory.CreateDirectory(Path.GetDirectoryName(projectFilePath));
Evaluation\Evaluator_Tests.cs (146)
107TransientTestFolder projDirectory = env.CreateFolder(Path.Combine(env.CreateNewTempPath().TempPath, projectPathCandidate), createFolder: true);
140yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""Exists('{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}')""", true };
141yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""'true'""", false };
142yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}""", false };
143yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "*.*proj")}""", true };
146yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}"" Condition=""Exists('{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}')""", true };
147yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}"" Condition=""'true'""", false };
148yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}""", false };
149yield return new object[] { $@"Project=""{Path.Combine("realFolder", "*.*proj")}""", true };
152yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}"" Condition=""Exists('{Path.Combine("realFolder", "realFile.csproj")}')""", true };
153yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}"" Condition=""'true'""", true };
154yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}""", true };
155yield return new object[] { $@"Project=""{Path.Combine("realFolder", "*.*proj")}""", true };
160yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""Exists('{Path.Combine("$(VSToolsPath)", "nonexistentDirectory", "projectThatDoesNotExist.csproj")}')""", true };
161yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""'true'""", false };
162yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "nonexistentDirectory", "projectThatDoesNotExist.csproj")}""", false };
163yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "nonexistentDirectory", "*.*proj")}""", true };
164yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "*.*proj")}""", true };
332string tempPath = Path.GetTempPath();
333string targetDirectory = Path.Combine(tempPath, "VerifyConditionsInsideOutsideTargets");
334string subDirectory = Path.Combine(targetDirectory, "subdir");
336string testTargetPath = Path.Combine(targetDirectory, "test.targets");
337string targetDirectoryTargetsPath = Path.Combine(targetDirectory, "targetdir.targets");
338string targetDirectoryTargetsPath2 = Path.Combine(targetDirectory, "targetdir2.targets");
339string subdirProjPath = Path.Combine(subDirectory, "test.proj");
340string projectDirectoryTargetsPath = Path.Combine(subDirectory, "projdir.targets");
341string projectDirectoryTargetsPath2 = Path.Combine(subDirectory, "projdir2.targets");
342string textTextPath = Path.Combine(targetDirectory, "test.txt");
461string tempPath = Path.GetTempPath();
462string targetDirectory = Path.Combine(tempPath, "VerifyConditionsInsideOutsideTargets");
463string subDirectory = Path.Combine(targetDirectory, "subdir");
465string testTargetPath = Path.Combine(targetDirectory, "test.targets");
466string targetDirectoryTargetsPath = Path.Combine(targetDirectory, "targetdir.targets");
467string targetDirectoryTargetsPath2 = Path.Combine(targetDirectory, "targetdir2.targets");
468string subdirProjPath = Path.Combine(subDirectory, "test.proj");
469string projectDirectoryTargetsPath = Path.Combine(subDirectory, "projdir.targets");
470string projectDirectoryTargetsPath2 = Path.Combine(subDirectory, "projdir2.targets");
471string textTextPath = Path.Combine(targetDirectory, "test.txt");
489logger.AssertLogContains("PropertyOutsideTarget: " + Path.Combine("..", "test.txt"));
491logger.AssertLogContains("PropertyInsideTarget: " + Path.Combine("..", "test.txt"));
492logger.AssertLogContains("PropertyGroupInsideTarget: " + Path.Combine("..", "test.txt"));
533string tempPath = Path.GetTempPath();
534string targetDirectory = Path.Combine(tempPath, "VerifyUsedUnInitializedPropertyInImports");
536string targetAPath = Path.Combine(targetDirectory, "targetA.targets");
537string targetBPath = Path.Combine(targetDirectory, "targetB.targets");
538string projectPath = Path.Combine(targetDirectory, "test.proj");
580string tempPath = Path.GetTempPath();
581string targetDirectory = Path.Combine(tempPath, "EmptyPropertyIsThenSet");
582string testTargetPath = Path.Combine(targetDirectory, "test.proj");
622string tempPath = Path.GetTempPath();
623string targetDirectory = Path.Combine(tempPath, "EmptyPropertyIsThenSet");
624string testTargetPath = Path.Combine(targetDirectory, "test.proj");
668string tempPath = Path.GetTempPath();
669string targetDirectory = Path.Combine(tempPath, "SetPropertyToItself");
670string testTargetPath = Path.Combine(targetDirectory, "test.proj");
714string tempPath = Path.GetTempPath();
715string targetDirectory = Path.Combine(tempPath, "UsePropertyInCondition");
716string testTargetPath = Path.Combine(targetDirectory, "test.proj");
758string tempPath = Path.GetTempPath();
759string targetDirectory = Path.Combine(tempPath, "UsePropertyBeforeSet");
760string testTargetPath = Path.Combine(targetDirectory, "test.proj");
804string tempPath = Path.GetTempPath();
805string targetDirectory = Path.Combine(tempPath, "UsePropertyBeforeSetDuplicates");
806string testTargetPath = Path.Combine(targetDirectory, "test.proj");
1156directory = Path.Combine(Path.GetTempPath(), "fol$der");
1157directory2 = Path.Combine(Path.GetTempPath(), "fol$der" + Path.DirectorySeparatorChar + "fol$der2");
1160string importPathRelativeEscaped = Path.Combine("fol$(x)$der2", "Escap%3beab$(x)leChar$ac%3BtersInI*tPa?h");
1161string importRelative1 = Path.Combine("fol$der2", "Escap;eableChar$ac;tersInImportPath");
1162string importRelative2 = Path.Combine("fol$der2", "Escap;eableChar$ac;tersInI_XXXX_tPath");
1163importPath1 = Path.Combine(directory, importRelative1);
1164importPath2 = Path.Combine(directory, importRelative2);
1185projectPath = Path.Combine(directory, "my.proj"); // project path has $ in too
1418logger.AssertLogContains(aProjName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar);
1425logger.AssertLogContains(targets1FileName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar);
1432logger.AssertLogContains(targets2FileName + @": MSBuildThisFileDirectoryNoRoot=a" + Path.DirectorySeparatorChar + "b" + Path.DirectorySeparatorChar);
2272string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative");
2273string directory2 = Path.Combine(directory, "sub");
2275VerifyImportTargetRelativePath(directory, directory2, new string[] { Path.Combine("**", "*.targets") });
2284string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative2");
2285string directory2 = Path.Combine(directory, "sub");
2290new string[] { Path.Combine(directory2, "*.targets"), Path.Combine(directory, "*.targets") });
2299string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative3");
2300string directory2 = Path.Combine(directory, "sub");
2307Path.Combine(directory2, "..", "*.targets"), Path.Combine(
2321string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsFullPath");
2322string directory2 = Path.Combine(directory, "sub");
2325string file1 = Path.Combine(directory, "1.targets");
2326string file2 = Path.Combine(directory2, "2.targets");
2327string file3 = Path.Combine(directory2, "3.cpp.targets");
3422string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyPropertySetInImportStillOverrides");
3433string primaryProject = Path.Combine(projectDirectory, "project.proj");
3434string import = Path.Combine(projectDirectory, "import.proj");
3483string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyInImportDoesntAffectParentProjectAboveIt");
3494string primaryProject = Path.Combine(projectDirectory, "project.proj");
3495string import = Path.Combine(projectDirectory, "import.proj");
3543string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyInImportAffectsParentProjectBelowIt");
3554string primaryProject = Path.Combine(projectDirectory, "project.proj");
3555string import = Path.Combine(projectDirectory, "import.proj");
3615string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyUnionBetweenImports");
3626string primaryProject = Path.Combine(projectDirectory, "project.proj");
3627string import = Path.Combine(projectDirectory, "import.proj");
3688string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyDuplicateTreatAsLocalProperty");
3699string primaryProject = Path.Combine(projectDirectory, "project.proj");
3700string import = Path.Combine(projectDirectory, "import.proj");
3753string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyGlobalPropertyPassedToP2P");
3764string primaryProject = Path.Combine(projectDirectory, "project.proj");
3765string project2 = Path.Combine(projectDirectory, "project2.proj");
3815string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyLocalPropertyPropagatesIfExplicitlyPassedToP2P");
3826string primaryProject = Path.Combine(projectDirectory, "project.proj");
3827string project2 = Path.Combine(projectDirectory, "project2.proj");
4400string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyDTDProcessingIsDisabled");
4411string projectFilename = Path.Combine(projectDirectory, "project.proj");
4553string projectDirectory = Path.Combine(Path.GetTempPath(), "ThrownInvalidProjectExceptionProperlyHandled");
4564string primaryProject = Path.Combine(projectDirectory, "project.proj");
4565string import = Path.Combine(projectDirectory, "import.proj");
5086string tempPath = Path.GetTempPath();
5087string targetDirectory = Path.Combine(tempPath, "LogPropertyAssignments");
5088string testTargetPath = Path.Combine(targetDirectory, "test.proj");
5233string file0 = Path.Combine(directory, "my.proj");
5234file1 = Path.Combine(directory, "1.targets");
5235file2 = Path.Combine(directory2, "2.targets");
5236file3 = Path.Combine(directory2, "3.cpp.targets");
5237file4 = Path.Combine(directory2, "4.nottargets");
Evaluation\Expander_Tests.cs (87)
41private static readonly string s_rootPathPrefix = NativeMethodsShared.IsWindows ? "C:\\" : Path.VolumeSeparatorChar.ToString();
261Assert.Equal(Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory"), itemsTrue[0].EvaluatedInclude);
267Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"seconddirectory"), itemsDir[0].EvaluatedInclude);
287Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
343Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, result);
535log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar));
557log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar));
579log.AssertLogContains(String.Format(@"[{0}foo;{0}bar]", current + Path.DirectorySeparatorChar));
660Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
698Assert.Equal(Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory"), itemsTrue[5].EvaluatedInclude);
719Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"secondd;rectory"), items[5].EvaluatedInclude);
720Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"someo;herplace"), items[6].EvaluatedInclude);
761pi.SetMetadata("Meta" + m.ToString(), Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory", "file") + m.ToString() + ".ext");
763pi.SetMetadata("Meta9", Path.Combine("seconddirectory", "file.ext"));
764pi.SetMetadata("Meta10", String.Format(";{0};{1};", Path.Combine("someo%3bherplace", "foo.txt"), Path.Combine("secondd%3brectory", "file.ext")));
1435subdir1" + Path.DirectorySeparatorChar + @": aaa=111
1436subdir2" + Path.DirectorySeparatorChar + @": bbb=222
1486"subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar,
1538@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" +
1539Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi",
1560@"string$(p);dialogs%253b ; splash.bmp ; ; ; ; \jk ; l\mno%253bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%253bdef;ghi",
1671Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandAll, MockElementLocation.Instance));
1699Assert.Equal("subdir1" + Path.DirectorySeparatorChar, expanded[5]);
1700Assert.Equal("subdir2" + Path.DirectorySeparatorChar, expanded[6]);
2147pg.Set(ProjectPropertyInstance.Create("RootPath", Path.Combine(s_rootPathPrefix, "this", "is", "the", "root")));
2148pg.Set(ProjectPropertyInstance.Create("MyPath", Path.Combine(s_rootPathPrefix, "this", "is", "the", "root", "my", "project", "is", "here.proj")));
2154Assert.Equal(Path.Combine(Path.DirectorySeparatorChar.ToString(), "my", "project", "is", "here.proj"), result);
2181pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2182pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2186string result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot2.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
2188result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
2316pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2317pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2323@"'$(PathRoot2.Endswith(`" + Path.DirectorySeparatorChar + "`))' == 'true'",
2333@"'$(PathRoot.EndsWith(" + Path.DirectorySeparatorChar + "))' == 'false'",
2516pg.Set(ProjectPropertyInstance.Create("ParentPath", Path.Combine(s_rootPathPrefix, "abc", "def")));
2517pg.Set(ProjectPropertyInstance.Create("FilePath", Path.Combine(s_rootPathPrefix, "abc", "def", "foo.cpp")));
2534pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2540Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result);
2679pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2685Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result);
2695pg.Set(ProjectPropertyInstance.Create("File", "foo goo" + Path.DirectorySeparatorChar + "file.txt"));
2700Path.Combine(s_rootPathPrefix, "foo goo") + "`, `$(File)`))",
2703Assert.Equal(Path.Combine(s_rootPathPrefix, "foo goo", "foo goo", "file.txt"), result);
2713pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2718Path.Combine(s_rootPathPrefix, "foo baz") + @"`, `$(File)`))",
2721Assert.Equal(Path.Combine(s_rootPathPrefix, "foo baz", "foo bar", "baz.txt"), result);
2731pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2736Path.Combine(s_rootPathPrefix, "foo baz") + @" `, `$(File)`))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
2738Assert.Equal(Path.Combine(s_rootPathPrefix, "foo baz ", "foo bar", "baz.txt"), result);
2794pg.Set(ProjectPropertyInstance.Create("File", "foo" + Path.DirectorySeparatorChar + "file.txt"));
2802Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result);
2812pg.Set(ProjectPropertyInstance.Create("File", "foo" + Path.DirectorySeparatorChar + "file.txt"));
3385string tempFile = Path.GetFileName(FileUtilities.GetTemporaryFile());
3389string directoryStart = Path.Combine(tempPath, "one\\two\\three\\four\\five");
3420MockElementLocation mockElementLocation = new MockElementLocation(Path.Combine(ObjectModelHelpers.TempProjectDir, "one", "two", "three", "four", "five", Path.GetRandomFileName()));
3427pg.Set(ProjectPropertyInstance.Create("FileToFind", Path.GetFileName(fileToFind)));
3465string fileWithPath = Path.Combine("foo", "bar", "file.txt");
3615$"{Path.GetFullPath("one")}{Path.DirectorySeparatorChar}",
3619$"{Path.GetFullPath(Path.Combine("one", "two"))}{Path.DirectorySeparatorChar}",
3916pg.Set(ProjectPropertyInstance.Create("SomePath", Path.Combine(s_rootPathPrefix, "some", "path")));
3926Assert.Equal(Path.Combine(s_rootPathPrefix, "some", "path", "fOo.Cs"), result);
4344string path = Path.Combine("foo", "bar");
4355Assert.Equal(path + Path.DirectorySeparatorChar, result);
4360Assert.Equal(path + Path.DirectorySeparatorChar, result);
4874var expectedAlphaSquigglePath = Path.Combine("Alpha", ".squiggle");
4875var expectedBetaSquigglePath = Path.Combine("Beta", ".squiggle");
4876var expectedAlphaGammaSquigglePath = Path.Combine("Alpha", "Gamma", ".squiggle");
4921var alphaOnePath = Path.Combine("alpha", "One.cs");
4922var alphaThreePath = Path.Combine("alpha", "Three.cs");
4962var alphaBetaPath = Path.Combine("alpha", "beta");
4963var alphaDeltaPath = Path.Combine("alpha", "delta");
5145string reflectionInfoPath = Path.Combine(Directory.GetCurrentDirectory(), "PropertyFunctionsRequiringReflection");
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (40)
50extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), GetExtensionTargetsFileContent1());
55projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", extnDir1, Path.Combine("tmp", "nonexistent")));
92string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContentWithCondition);
95CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir1, Path.Combine("tmp", "nonexistent") },
128string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
129string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn2.proj"),
133new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
158string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
196string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
198string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"),
204new[] { extnDir1, Path.Combine("tmp", "nonexistent"), extnDir2 },
246string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("circularwildcardtest", "extn.proj"),
248string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("circularwildcardtest", "extn.proj"),
250string extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("circularwildcardtest", "extn3.proj"),
256string mainProjectPath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine("extensions2", "circularwildcardtest", "main.proj"), mainTargetsFileContent);
283string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
286CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { Path.Combine("tmp", "nonexistent"), extnDir1 },
300extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
305Path.Combine("tmp", "nonexistent")));
355string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
356string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
359CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
399string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
400string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
407projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", Path.Combine("tmp", "non-existent"), extnDir1));
486extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
488extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
490extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("xyz", "extn3.proj"),
566extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
627extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
698extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("Microsoft", "VisualStudio", "v99", "DNX", "Microsoft.DNX.Props"),
763extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("file.props"),
804extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("file.props"), string.Empty);
837logger.AssertLogContains(@"MSB4226: The imported project """ + Path.Combine("$(UndefinedProperty)", "filenotfound.props")
889extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
891extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
999var extnDir = Path.Combine(ObjectModelHelpers.TempProjectDir, extnDirName);
1000Directory.CreateDirectory(Path.Combine(extnDir, Path.GetDirectoryName(relativeFilePath)));
1001File.WriteAllText(Path.Combine(extnDir, relativeFilePath), fileContents);
Evaluation\Preprocessor_Tests.cs (57)
94" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
102" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
109" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
138" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
146" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
153" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
182" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
190" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
197" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
226" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
234" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
244" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
274" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
308" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
319" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
326" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
386" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
429" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
441" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
451" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
487" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
499" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
509" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
516" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3
526" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
560" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
568" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
575" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
582" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3
589" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
621" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
629" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p2
636" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
643" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p3
650" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
681" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
707directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
711xml0.AddImport(directory + Path.DirectorySeparatorChar + "*.targets");
713xml1 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "1.targets");
717xml2 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "2.targets");
721xml3 = ProjectRootElement.Create(directory + Path.DirectorySeparatorChar + "3.xxxxxx");
737" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
743<Import Project=""" + Path.Combine(directoryXmlCommentFriendly, "*.targets") + @""">
745" + Path.Combine(directoryXmlCommentFriendly, "1.targets") + @"
758<Import Project=""" + Path.Combine(directoryXmlCommentFriendly, "*.targets") + @""">
760" + Path.Combine(directoryXmlCommentFriendly, "2.targets") + @"
770" + CurrentDirectoryXmlCommentFriendly + Path.DirectorySeparatorChar + @"p1
858string sdkPropsPath = Path.Combine(testSdkDirectory, "Sdk.props");
859string sdkTargetsPath = Path.Combine(testSdkDirectory, "Sdk.targets");
974string importedPropsPath = Path.Combine(testDirectory, "Import.props");
981string projectPath = Path.Combine(testDirectory, "TestProject.csproj");
1065string sdkPropsPath1 = Path.Combine(sdk1, "Sdk.props");
1066string sdkTargetsPath1 = Path.Combine(sdk1, "Sdk.targets");
1079string sdkPropsPath2 = Path.Combine(sdk2, "Sdk.props");
1080string sdkTargetsPath2 = Path.Combine(sdk2, "Sdk.targets");
1099string importPath = Path.GetFullPath(import.ProjectFile);
Evaluation\ProjectSdkImplicitImport_Tests.cs (13)
89_testSdkDirectory = Path.Combine(_testSdkRoot, SdkName, "Sdk");
90_sdkPropsPath = Path.Combine(_testSdkDirectory, "Sdk.props");
91_sdkTargetsPath = Path.Combine(_testSdkDirectory, "Sdk.targets");
192string testSdkDirectory = Directory.CreateDirectory(Path.Combine(_testSdkRoot, sdkName, "Sdk")).FullName;
194File.WriteAllText(Path.Combine(testSdkDirectory, "Sdk.props"), $"<Project><PropertyGroup><InitialImportProperty>{sdkName}</InitialImportProperty></PropertyGroup></Project>");
195File.WriteAllText(Path.Combine(testSdkDirectory, "Sdk.targets"), $"<Project><PropertyGroup><FinalImportProperty>{sdkName}</FinalImportProperty></PropertyGroup></Project>");
211VerifyPropertyFromImplicitImport(project, "InitialImportProperty", Path.Combine(_testSdkRoot, sdkNames.Last(), "Sdk", "Sdk.props"), sdkNames.Last());
212VerifyPropertyFromImplicitImport(project, "FinalImportProperty", Path.Combine(_testSdkRoot, sdkNames.Last(), "Sdk", "Sdk.targets"), sdkNames.Last());
359var p1Path = Path.Combine(projectFolder, "p1.proj");
360var p2Path = Path.Combine(projectFolder, "p2.proj");
548import.SdkResult.Path.ShouldBe(Path.GetDirectoryName(expectedSdkPath));
676var expectedSdkPath = Path.GetDirectoryName(_sdkPropsPath);
679expectedSdkPath.ShouldBe(Path.GetDirectoryName(_sdkTargetsPath));
Evaluation\SdkResultEvaluation_Tests.cs (20)
130string projectPath = Path.Combine(_testFolder, "project.proj");
163string projectPath = Path.Combine(_testFolder, "project.proj");
193Path.Combine(_testFolder, "Sdk"),
200new[] { Path.Combine(_testFolder, "Sdk") },
225string projectPath = Path.Combine(_testFolder, "project.proj");
235string sdkPropsPath = Path.Combine(_testFolder, "Sdk", "Sdk.props");
236Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
288Path.Combine(_testFolder, "Sdk1"),
289Path.Combine(_testFolder, "Sdk2")
313string projectPath = Path.Combine(_testFolder, "project.proj");
323string sdk1PropsPath = Path.Combine(_testFolder, "Sdk1", "Sdk.props");
324Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk1"));
334string sdk2PropsPath = Path.Combine(_testFolder, "Sdk2", "Sdk.props");
335Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk2"));
389new[] { Path.Combine(_testFolder, "Sdk") },
405string projectPath = Path.Combine(_testFolder, "project.proj");
415string sdkPropsPath = Path.Combine(_testFolder, "Sdk", "Sdk.props");
416Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
426string sdkTargetsPath = Path.Combine(_testFolder, "Sdk", "Sdk.targets");
482string projectPath = Path.Combine(_testFolder, "project.proj");
FileLogger_Tests.cs (15)
338string directory = Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"));
339string log = Path.Combine(directory, "build.log");
497fileLogger.Parameters = "logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile.log");
499Assert.Equal(0, string.Compare(fileLogger.InternalFilelogger.Parameters, "ForceNoAlign;ShowEventId;ShowCommandLine;logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile3.log") + ";", StringComparison.OrdinalIgnoreCase));
503fileLogger.Parameters = "logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile.log");
505Assert.Equal(0, string.Compare(fileLogger.InternalFilelogger.Parameters, "ForceNoAlign;ShowEventId;ShowCommandLine;logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile4.log") + ";", StringComparison.OrdinalIgnoreCase));
508Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "tempura"));
510fileLogger.Parameters = "logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "tempura", "mylogfile.log");
512Assert.Equal(0, string.Compare(fileLogger.InternalFilelogger.Parameters, "ForceNoAlign;ShowEventId;ShowCommandLine;logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "tempura", "mylogfile1.log") + ";", StringComparison.OrdinalIgnoreCase));
517if (Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "tempura")))
519File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "tempura", "mylogfile1.log"));
520FileUtilities.DeleteWithoutTrailingBackslash(Path.Combine(Directory.GetCurrentDirectory(), "tempura"));
522File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile0.log"));
523File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile3.log"));
524File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile4.log"));
FileMatcher_Tests.cs (57)
65File.WriteAllBytes(Path.Combine(testFolder.Path, file), new byte[1]);
79TransientTestFolder tf2 = _env.CreateFolder(Path.Combine(testFolder.Path, "subfolder"));
80string symlinkPath = Path.Combine(tf2.Path, "mySymlink");
104foreach (string fullPath in GetFilesComplexGlobbingMatchingInfo.FilesToCreate.Select(i => Path.Combine(testFolder.Path, i.ToPlatformSlash())))
106Directory.CreateDirectory(Path.GetDirectoryName(fullPath));
126.Select(i => i.Replace(Path.DirectorySeparatorChar, '\\'))
618return new string[] { Path.Combine(path, "LongDirectoryName") };
625return new string[] { Path.Combine(path, "LongSubDirectory") };
632return new string[] { Path.Combine(path, "LongFileName.txt") };
639return new string[] { Path.Combine(path, "pomegranate") };
656private static readonly char S = Path.DirectorySeparatorChar;
787"Source" + Path.DirectorySeparatorChar + "**",
790"Source" + Path.DirectorySeparatorChar + "Bart.txt",
791"Source" + Path.DirectorySeparatorChar + "Sub" + Path.DirectorySeparatorChar + "Homer.txt",
795"Destination" + Path.DirectorySeparatorChar + "Bart.txt",
796"Destination" + Path.DirectorySeparatorChar + "Sub" + Path.DirectorySeparatorChar + "Homer.txt",
995ValidateFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.txt"), false);
996ValidateNoFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.bin"), false);
1002ValidateFileMatch(Path.Combine("..", "..", "*.*"), Path.Combine("..", "..", "File.txt"), false);
1006ValidateFileMatch(Path.Combine("..", "..", "*.*"), Path.Combine("..", "..", "File"), false);
1008ValidateNoFileMatch(Path.Combine("..", "..", "*.*"), Path.Combine(new[] { "..", "..", "dir1", "dir2", "File.txt" }), false);
1009ValidateNoFileMatch(Path.Combine("..", "..", "*.*"), Path.Combine(new[] { "..", "..", "dir1", "dir2", "File" }), false);
1020ValidateFileMatch(Path.Combine("**", "*.cs"), Path.Combine("dir1", "dir2", "file.cs"), true);
1021ValidateFileMatch(Path.Combine("**", "*.cs"), "file.cs", true);
1224string workingPathSubfolder = Path.Combine(workingPath, "SubDir");
1225string offendingPattern = Path.Combine(workingPath, @"*\..\bar");
1238string fileName = Path.Combine(workingPath, "MyFile.txt");
1239string offendingPattern = Path.Combine(workingPath, @"**\**");
1255string workingPathSubdir = Path.Combine(workingPath, "subdir");
1256string workingPathSubdirBing = Path.Combine(workingPathSubdir, "bing");
1258string offendingPattern = Path.Combine(workingPath, @"**\sub*\*.");
2068candidateDirectoryName = Path.GetDirectoryName(normalizedCandidate);
2110if (normalizedCandidate == Path.Combine(path, pattern))
2152string baseMatch = Path.GetFileName(normalizedCandidate.Substring(0, nextSlash));
2225string normalized = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
2226if (Path.DirectorySeparatorChar != '\\')
2228normalized = path.Replace("\\", Path.DirectorySeparatorChar.ToString());
2237normalized = normalized.Replace(@".." + Path.DirectorySeparatorChar, "<:PARENT:>");
2240string doubleSeparator = Path.DirectorySeparatorChar.ToString() + Path.DirectorySeparatorChar.ToString();
2241normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString());
2242normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString());
2243normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString());
2246normalized = normalized.Replace(@"." + Path.DirectorySeparatorChar, "");
2250normalized = normalized.Replace("<:PARENT:>", @".." + Path.DirectorySeparatorChar);
2267if (path.Length == 0 && !Path.IsPathRooted(candidate))
2460return new string[] { Path.Combine(path, pattern) };
FileUtilities_Tests.cs (29)
43Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier);
47Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier);
418Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
432Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
554Assert.True(FileUtilities.FileOrDirectoryExistsNoThrow(Path.GetTempPath()));
775Assert.StartsWith(Path.GetTempPath(), path);
797Assert.StartsWith(Path.GetTempPath(), path);
812string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "subfolder");
843Assert.StartsWith(Path.GetTempPath(), path);
882var secondSlash = SystemSpecificAbsolutePath.Substring(1).IndexOf(Path.DirectorySeparatorChar) + 1;
906string firstDirectory = Path.GetDirectoryName(Path.GetDirectoryName(filePath));
907string tmpDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(filePath)));
937string firstDirectory = Path.GetDirectoryName(Path.GetDirectoryName(filePath));
938string tmpDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(filePath)));
965string path = Path.Combine(root, "1", "2", "3", "4", "5");
967Assert.Equal(Path.Combine(root, "1", "2", "3", "4", "5"), FileUtilities.GetFolderAbove(path, 0));
968Assert.Equal(Path.Combine(root, "1", "2", "3", "4"), FileUtilities.GetFolderAbove(path));
969Assert.Equal(Path.Combine(root, "1", "2", "3"), FileUtilities.GetFolderAbove(path, 2));
970Assert.Equal(Path.Combine(root, "1", "2"), FileUtilities.GetFolderAbove(path, 3));
971Assert.Equal(Path.Combine(root, "1"), FileUtilities.GetFolderAbove(path, 4));
985Path.Combine(root, "path1"),
989Path.Combine(root, "path1", "path2", "file.txt"),
1031expectedTruncatedPath = expectedTruncatedPath.Replace('/', Path.DirectorySeparatorChar);
Graph\GetCompatiblePlatformGraph_Tests.cs (6)
354TransientTestFolder project1Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, firstProjectName), createFolder: true);
355TransientTestFolder project1SubFolder = testEnvironment.CreateFolder(Path.Combine(project1Folder.Path, firstProjectName), createFolder: true);
369TransientTestFolder project2Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, secondProjectName), createFolder: true);
370TransientTestFolder project2SubFolder = testEnvironment.CreateFolder(Path.Combine(project2Folder.Path, secondProjectName), createFolder: true);
380TransientTestFolder project3Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, thirdProjectName), createFolder: true);
381TransientTestFolder project3SubFolder = testEnvironment.CreateFolder(Path.Combine(project3Folder.Path, thirdProjectName), createFolder: true);
ProjectCache\ProjectCacheTests.cs (8)
53Path.GetFullPath(
54Path.Combine(
608var projectName = Path.GetFileNameWithoutExtension(projectPath);
638var projectName = Path.GetFileNameWithoutExtension(projectPath);
835private static int GetProjectNumber(string projectPath) => int.Parse(Path.GetFileNameWithoutExtension(projectPath));
866itemResult.GetMetadata("File").ShouldBe(Path.GetFileName(projectPath));
1716output = RunnerUtilities.RunProcessAndGetOutput(Path.Combine(directory.Path, "bin/net8.0/app"), "", out success, false, _output);
1724output = RunnerUtilities.RunProcessAndGetOutput(Path.Combine(directory.Path, "bin/net8.0/app"), "", out success, false, _output);
TypeLoader_Tests.cs (18)
21private static readonly string ProjectFileFolder = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "PortableTask");
24private static string PortableTaskFolderPath = Path.GetFullPath(
25Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "..", "..", "..", "Samples", "PortableTask"));
67string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
75string dllPath = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, dllName);
84string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
90string dllPath = Path.Combine(dir.Path, DLLFileName);
104string newAssemblyLocation = Path.Combine(folder.Path, Path.GetFileName(currentAssembly));
107string portableTaskPath = Path.Combine(Directory.GetDirectories(PortableTaskFolderPath).First(), "netstandard2.0", "OldMSBuild");
108string utilities = Path.Combine(portableTaskPath, utilitiesName);
109File.Copy(utilities, Path.Combine(folder.Path, utilitiesName));
123string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
124string originalDLLPath = Path.Combine(dir.Path, DLLFileName);
148string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
149string originalDLLPath = Path.Combine(dir.Path, DLLFileName);
174var newDllPath = Path.Combine(temporaryDirectory, DLLFileName);
201var tempDirectoryPath = Path.GetDirectoryName(newDllPath);
Microsoft.Build.Framework (17)
Microsoft.Build.Framework.UnitTests (20)
FileClassifier_Tests.cs (15)
32classifier.RegisterImmutableDirectory($"{Path.Combine(volume, "Test1")}");
33classifier.RegisterImmutableDirectory($"{Path.Combine(volume, "Test2")}");
35classifier.IsNonModifiable(Path.Combine(volume, "Test1", "File.ext")).ShouldBeTrue();
36classifier.IsNonModifiable(Path.Combine(volume, "Test2", "File.ext")).ShouldBeTrue();
37classifier.IsNonModifiable(Path.Combine(volume, "Test3", "File.ext")).ShouldBeFalse();
49classifier.RegisterImmutableDirectory($"{Path.Combine(volume, "Test1")}");
50classifier.RegisterImmutableDirectory($"{Path.Combine(volume, "Test2")}");
53classifier.IsNonModifiable(Path.Combine(volume, "Test1", "File.ext")).ShouldBeTrue();
54classifier.IsNonModifiable(Path.Combine(volume, "Test2", "File.ext")).ShouldBeTrue();
55classifier.IsNonModifiable(Path.Combine(volume, "Test3", "File.ext")).ShouldBeFalse();
64classifier.RegisterImmutableDirectory($"{Path.Combine(volume, "Test1")}");
68classifier.IsNonModifiable(Path.Combine(volume, "Test1", "File.ext")).ShouldBeTrue();
69classifier.IsNonModifiable(Path.Combine(volume, "test1", "File.ext")).ShouldBeFalse();
73classifier.IsNonModifiable(Path.Combine(volume, "Test1", "File.ext")).ShouldBeTrue();
74classifier.IsNonModifiable(Path.Combine(volume, "test1", "File.ext")).ShouldBeTrue();
Microsoft.Build.Tasks.CodeAnalysis (25)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (89)
CscTests.cs (20)
468csc.ToolExe = Path.Combine("path", "to", "custom_csc");
471Assert.Equal(Path.Combine("path", "to", "custom_csc"), csc.GeneratePathToTool());
474csc.ToolExe = Path.Combine("path", "to", "custom_csc");
477Assert.Equal(Path.Combine("path", "to", "custom_csc"), csc.GeneratePathToTool());
484csc.ToolPath = Path.Combine("path", "to", "custom_csc");
489Assert.StartsWith(Path.Combine("path", "to", "custom_csc", "csc."), csc.GeneratePathToTool());
492csc.ToolPath = Path.Combine("path", "to", "custom_csc");
495Assert.StartsWith(Path.Combine("path", "to", "custom_csc", "csc."), csc.GeneratePathToTool());
509Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents());
656var taskPath = Path.GetDirectoryName(typeof(ManagedCompiler).Assembly.Location)!;
658? Path.Combine("bincore", "csc.dll")
661Assert.Equal(Path.Combine(taskPath, relativePath), task.PathToBuiltInTool);
669var taskPath = Path.GetDirectoryName(typeof(ManagedCompiler).Assembly.Location)!;
674Assert.Equal(Path.Combine(taskPath, "..", "bincore", "csc.dll"), task.PathToBuiltInTool);
710_ = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(dirPath), "bincore"));
723File.WriteAllText(Path.Combine(dirPath, "csc.exe"), "real code");
735var taskPath = Path.GetDirectoryName(taskFilePath);
738File.Copy(dllPath, Path.Combine(dirPath, Path.GetFileName(dllPath)));
DotNetSdkTests.cs (36)
28var root1 = Path.GetFullPath(ProjectDir.Path + Path.DirectorySeparatorChar);
29var root2 = Path.GetFullPath(sourcePackageDir.Path + Path.DirectorySeparatorChar);
31root3 ??= Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages");
32root3 += Path.DirectorySeparatorChar;
38var sourceLinkJsonPath = Path.Combine(ObjDir.Path, ProjectName + ".sourcelink.json");
54<SourceRoot Include=""{root1}sub1{Path.DirectorySeparatorChar}"" SourceControl=""git"" NestedRoot=""sub1"" ContainingRoot=""{root1}"" SourceLinkUrl=""https://raw.githubusercontent.com/M1/*""/>
55<SourceRoot Include=""{root1}sub2{Path.DirectorySeparatorChar}"" SourceControl=""git"" NestedRoot=""sub2"" ContainingRoot=""{root1}"" SourceLinkUrl=""https://raw.githubusercontent.com/M2/*""/>
100$@"{root1}sub1{Path.DirectorySeparatorChar}: /_/sub1/",
101$@"{root1}sub2{Path.DirectorySeparatorChar}: /_/sub2/",
140$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}",
141$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}",
150$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," +
151$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]",
178$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}",
179$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}",
188$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," +
189$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]",
216$@"{root1}sub1{Path.DirectorySeparatorChar}: {root1}sub1{Path.DirectorySeparatorChar}",
217$@"{root1}sub2{Path.DirectorySeparatorChar}: {root1}sub2{Path.DirectorySeparatorChar}",
226$@"[{root1}sub1{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M1/*]," +
227$@"[{root1}sub2{Path.DirectorySeparatorChar}]=[https://raw.githubusercontent.com/M2/*]",
347$"X{Path.DirectorySeparatorChar}",
348$"Y{Path.DirectorySeparatorChar}",
349$"Z{Path.DirectorySeparatorChar}",
432Path.Combine(ProjectDir.Path, ".editorconfig"),
493Path.Combine(ProjectDir.Path, ".editorconfig"),
528Path.Combine(ProjectDir.Path, ".editorconfig"),
653Path.Combine(ProjectDir.Path, ".editorconfig"),
TestUtilities\DotNetSdkTestBase.cs (19)
64=> Path.Combine(dotnetInstallDir, "sdk", version);
68s_dotnetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
73=> dotnetDir != null && File.Exists(Path.Combine(dotnetDir, s_dotnetExeName)) && Directory.Exists(GetSdkPath(dotnetDir, s_dotnetSdkVersion));
78dotnetInstallDir = Environment.GetEnvironmentVariable("PATH")?.Split(Path.PathSeparator).FirstOrDefault(isMatchingDotNetInstance);
98var filePath = Path.Combine(objDirectory, projectFileName + ".TestHelpers.g.props");
116var filePath = Path.Combine(objDirectory, projectFileName + ".TestHelpers.g.targets");
126<MakeDir Directories=""{Path.GetDirectoryName(outputFile)}"" />
151DotNetPath = Path.Combine(s_dotnetInstallDir, s_dotnetExeName);
152var testBinDirectory = Path.GetDirectoryName(typeof(DotNetSdkTests).Assembly.Location) ?? string.Empty;
153var sdksDir = Path.Combine(s_dotnetSdkPath ?? string.Empty, "Sdks");
174var csharpCoreTargets = Path.Combine(testBinDirectory, "Microsoft.CSharp.Core.targets");
175var visualBasicCoreTargets = Path.Combine(testBinDirectory, "Microsoft.VisualBasic.Core.targets");
196Assert.True(File.Exists(Path.Combine(ObjDir.Path, "project.assets.json")));
197Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.props")));
198Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.targets")));
207var workingDirectory = Path.GetDirectoryName(projectFilePath)!;
210var projectFileName = Path.GetFileName(projectFilePath);
221var evaluationResultsFile = Path.Combine(OutDir.Path, "EvaluationResult.txt");
227var testBinDirectory = Path.GetDirectoryName(typeof(DotNetSdkTests).Assembly.Location);
Microsoft.Build.Tasks.Core (363)
BootstrapperUtil\BootstrapperBuilder.cs (27)
174string strOutputExe = System.IO.Path.Combine(settings.OutputPath, SETUP_EXE);
361string setupSourceFile = System.IO.Path.Combine(bootstrapperPath, SETUP_BIN);
430invariantPath = Util.AddTrailingChar(invariantPath, System.IO.Path.DirectorySeparatorChar);
453packagePaths.AddRange(Util.AdditionalPackagePaths.Select(p => Util.AddTrailingChar(p.ToLowerInvariant(), System.IO.Path.DirectorySeparatorChar)));
457string folder = System.IO.Path.GetDirectoryName(file);
503private string BootstrapperPath => System.IO.Path.Combine(Path, ENGINE_PATH);
505private string PackagePath => System.IO.Path.Combine(Path, PACKAGE_PATH);
507private string SchemaPath => System.IO.Path.Combine(Path, SCHEMA_PATH);
528string startDirectory = System.IO.Path.Combine(BootstrapperPath, RESOURCES_PATH);
535string resourceDirectory = System.IO.Path.Combine(startDirectory, subDirectory);
536string resourceFilePath = System.IO.Path.Combine(resourceDirectory, SETUP_RESOURCES_FILE);
606if (strSubDirectory[nStartIndex] == System.IO.Path.DirectorySeparatorChar)
880string strSubDirectoryFullPath = System.IO.Path.Combine(packagePath, strSubDirectory);
883string strBaseManifestFilename = System.IO.Path.Combine(strSubDirectoryFullPath, ROOT_MANIFEST_FILE);
884string strBaseManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
922UpdatePackageFileNodes(packageFilesNode, System.IO.Path.Combine(packagePath, strSubDirectory), strSubDirectory);
935string strLangManifestFilename = System.IO.Path.Combine(strLanguageDirectory, CHILD_MANIFEST_FILE);
936string strLangManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
967System.IO.Path.DirectorySeparatorChar)
1172string strSourceFile = System.IO.Path.Combine(strSourcePath, relativePath);
1176targetPathAttribute.Value = System.IO.Path.Combine(strTargetPath, relativePath);
1179string newNameValue = System.IO.Path.Combine(strTargetPath, relativePath);
1468string strDestinationFileName = System.IO.Path.Combine(settings.OutputPath, packageFileDestination.Value);
1477EnsureFolderExists(System.IO.Path.GetDirectoryName(strDestinationFileName));
2000using (var xmlwriter = new XmlTextWriter(System.IO.Path.Combine(s_logPath, fileName), Encoding.UTF8))
2042using (var fileWriter = new StreamWriter(System.IO.Path.Combine(s_logPath, fileName), append))
2203string logPath = System.IO.Path.Combine(
FileUtilities.cs (36)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar)));
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
498return NormalizePath(Path.Combine(paths));
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
GenerateResource.cs (16)
570commandLineBuilder.AppendFileNameIfNotNull(Path.Combine(_resgenPath, "resgen.exe"));
1522string extension = Path.GetExtension(sourceFilePath);
2063OutputResources[i] = new TaskItem(Path.ChangeExtension(Sources[i].ItemSpec, ".resources"));
2540_assemblyNames[i] = new AssemblyNameExtension(Path.GetFileNameWithoutExtension(assemblyFile.ItemSpec));
2670string priDirectory = Path.Combine(outFileOrDir ?? String.Empty,
2672currentOutputDirectory = Path.Combine(priDirectory,
2680currentOutputFile = Path.Combine(currentOutputDirectory, currentOutputFileNoPath);
2827return Path.GetFullPath(currentOutputFile);
2838currentOutputFile = Path.GetFullPath(currentOutputFile);
2848string shorterPath = Path.Combine(outputDirectory ?? String.Empty, cultureName ?? String.Empty);
2853currentOutputFile = Path.Combine(shorterPath, currentOutputFileNoPath);
2858currentOutputFile = Path.GetFullPath(currentOutputFile);
2909extension = Path.GetExtension(filename);
2939_logger.LogErrorWithCodeFromResources("GenerateResource.UnknownFileExtension", Path.GetExtension(filename), filename);
3433_stronglyTypedClassName = Path.GetFileNameWithoutExtension(outFile);
3498return Path.ChangeExtension(outputResourcesFile, provider.FileExtension);
GetSDKReferenceFiles.cs (12)
512string directory = Path.GetDirectoryName(reference.AssemblyLocation);
513string fileNameNoExtension = Path.GetFileNameWithoutExtension(reference.AssemblyLocation);
514string xmlFile = Path.Combine(directory, fileNameNoExtension + ".xml");
553if (Path.GetExtension(file.RedistFile).Equals(".PRI", StringComparison.OrdinalIgnoreCase))
578string fileExtension = Path.GetExtension(file);
630string targetPath = Path.Combine(targetPathRoot, relativeToBase);
731FileName = Path.GetFileNameWithoutExtension(assemblyLocation);
960referencesCacheFile = Path.Combine(_cacheFileDirectory, GetCacheFileName(saveContext.SdkIdentity, saveContext.SdkRoot, cacheFileInfo.Hash.ToString("X", CultureInfo.InvariantCulture)));
1030group reference by Path.GetDirectoryName(reference);
1085string referencesCacheFile = Path.Combine(cacheFileFolder, GetCacheFileName(sdkIdentity, sdkRoot, hash.ToString("X", CultureInfo.InvariantCulture)));
1165string redistPath = Path.Combine(sdkRoot, "Redist");
1179string referencesPath = Path.Combine(sdkRoot, "References");
InstalledSDKResolver.cs (4)
60string referenceAssemblyFilePath = Path.Combine(sdkDirectory, "References", configuration, architecture);
61string referenceAssemblyCommonArchFilePath = Path.Combine(sdkDirectory, "References", "CommonConfiguration", architecture);
62string referenceAssemblyPathNeutral = Path.Combine(sdkDirectory, "References", configuration, "Neutral");
63string referenceAssemblyArchFilePathNeutral = Path.Combine(sdkDirectory, "References", "CommonConfiguration", "Neutral");
Microsoft.Build.Tasks.UnitTests (1222)
AddToWin32Manifest_Tests.cs (8)
20private static string TestAssetsRootPath { get; } = Path.Combine(
21Path.GetDirectoryName(typeof(AddToWin32Manifest_Tests).Assembly.Location) ?? AppContext.BaseDirectory,
49task.ApplicationManifest = new TaskItem(Path.Combine(TestAssetsRootPath, manifestName));
59string expectedManifest = Path.Combine(TestAssetsRootPath, $"{manifestName ?? "default.win32manifest"}_expected");
109File.Copy(Path.Combine(TestAssetsRootPath, manifestName), Path.Combine(projectFolder.Path, manifestName));
118byte[]? actualManifestBytes = AssemblyNativeResourceManager.GetResourceFromExecutable(Path.Combine(outputPath, "test.dll"), "#2", "#24");
123string expectedManifest = Path.Combine(TestAssetsRootPath, $"{manifestName ?? "default.win32manifest"}_expected");
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (228)
189protected static readonly string s_rootPathPrefix = NativeMethodsShared.IsWindows ? "C:\\" : Path.VolumeSeparatorChar.ToString();
190protected static readonly string s_myProjectPath = Path.Combine(s_rootPathPrefix, "MyProject");
192protected static readonly string s_myVersion20Path = Path.Combine(s_rootPathPrefix, "WINNT", "Microsoft.NET", "Framework", "v2.0.MyVersion");
193protected static readonly string s_myVersion40Path = Path.Combine(s_rootPathPrefix, "WINNT", "Microsoft.NET", "Framework", "v4.0.MyVersion");
194protected static readonly string s_myVersion90Path = Path.Combine(s_rootPathPrefix, "WINNT", "Microsoft.NET", "Framework", "v9.0.MyVersion");
198protected static readonly string s_myMissingAssemblyAbsPath = Path.Combine(s_rootPathPrefix, "MyProject", "MyMissingAssembly.dll");
199protected static readonly string s_myMissingAssemblyRelPath = Path.Combine("MyProject", "MyMissingAssembly.dll");
200protected static readonly string s_myPrivateAssemblyRelPath = Path.Combine("MyProject", "MyPrivateAssembly.exe");
202protected static readonly string s_frameworksPath = Path.Combine(s_rootPathPrefix, "Frameworks");
204protected static readonly string s_myComponents2RootPath = Path.Combine(s_rootPathPrefix, "MyComponents2");
205protected static readonly string s_myComponentsRootPath = Path.Combine(s_rootPathPrefix, "MyComponents");
206protected static readonly string s_myComponents10Path = Path.Combine(s_myComponentsRootPath, "1.0");
207protected static readonly string s_myComponents20Path = Path.Combine(s_myComponentsRootPath, "2.0");
208protected static readonly string s_myComponentsMiscPath = Path.Combine(s_myComponentsRootPath, "misc");
210protected static readonly string s_myComponentsV05Path = Path.Combine(s_myComponentsRootPath, "v0.5");
211protected static readonly string s_myComponentsV10Path = Path.Combine(s_myComponentsRootPath, "v1.0");
212protected static readonly string s_myComponentsV20Path = Path.Combine(s_myComponentsRootPath, "v2.0");
213protected static readonly string s_myComponentsV30Path = Path.Combine(s_myComponentsRootPath, "v3.0");
215protected static readonly string s_unifyMeDll_V05Path = Path.Combine(s_myComponentsV05Path, "UnifyMe.dll");
216protected static readonly string s_unifyMeDll_V10Path = Path.Combine(s_myComponentsV10Path, "UnifyMe.dll");
217protected static readonly string s_unifyMeDll_V20Path = Path.Combine(s_myComponentsV20Path, "UnifyMe.dll");
218protected static readonly string s_unifyMeDll_V30Path = Path.Combine(s_myComponentsV30Path, "UnifyMe.dll");
220protected static readonly string s_myComponents40ComponentPath = Path.Combine(s_myComponentsRootPath, "4.0Component");
221protected static readonly string s_40ComponentDependsOnOnlyv4AssembliesDllPath = Path.Combine(s_myComponents40ComponentPath, "DependsOnOnlyv4Assemblies.dll");
223protected static readonly string s_myLibrariesRootPath = Path.Combine(s_rootPathPrefix, "MyLibraries");
224protected static readonly string s_myLibraries_V1Path = Path.Combine(s_myLibrariesRootPath, "v1");
225protected static readonly string s_myLibraries_V2Path = Path.Combine(s_myLibrariesRootPath, "v2");
226protected static readonly string s_myLibraries_V1_EPath = Path.Combine(s_myLibraries_V1Path, "E");
228protected static readonly string s_myLibraries_ADllPath = Path.Combine(s_myLibrariesRootPath, "A.dll");
229protected static readonly string s_myLibraries_BDllPath = Path.Combine(s_myLibrariesRootPath, "B.dll");
230protected static readonly string s_myLibraries_CDllPath = Path.Combine(s_myLibrariesRootPath, "C.dll");
231protected static readonly string s_myLibraries_TDllPath = Path.Combine(s_myLibrariesRootPath, "T.dll");
233protected static readonly string s_myLibraries_V1_DDllPath = Path.Combine(s_myLibraries_V1Path, "D.dll");
234protected static readonly string s_myLibraries_V1_E_EDllPath = Path.Combine(s_myLibraries_V1_EPath, "E.dll");
235protected static readonly string s_myLibraries_V2_DDllPath = Path.Combine(s_myLibraries_V2Path, "D.dll");
236protected static readonly string s_myLibraries_V1_GDllPath = Path.Combine(s_myLibraries_V1Path, "G.dll");
237protected static readonly string s_myLibraries_V2_GDllPath = Path.Combine(s_myLibraries_V2Path, "G.dll");
239protected static readonly string s_regress454863_ADllPath = Path.Combine(s_rootPathPrefix, "Regress454863", "A.dll");
240protected static readonly string s_regress454863_BDllPath = Path.Combine(s_rootPathPrefix, "Regress454863", "B.dll");
242protected static readonly string s_regress444809RootPath = Path.Combine(s_rootPathPrefix, "Regress444809");
243protected static readonly string s_regress444809_ADllPath = Path.Combine(s_regress444809RootPath, "A.dll");
244protected static readonly string s_regress444809_BDllPath = Path.Combine(s_regress444809RootPath, "B.dll");
245protected static readonly string s_regress444809_CDllPath = Path.Combine(s_regress444809RootPath, "C.dll");
246protected static readonly string s_regress444809_DDllPath = Path.Combine(s_regress444809RootPath, "D.dll");
248protected static readonly string s_regress444809_V2RootPath = Path.Combine(s_regress444809RootPath, "v2");
249protected static readonly string s_regress444809_V2_ADllPath = Path.Combine(s_regress444809_V2RootPath, "A.dll");
251protected static readonly string s_regress442570_RootPath = Path.Combine(s_rootPathPrefix, "Regress442570");
252protected static readonly string s_regress442570_ADllPath = Path.Combine(s_regress442570_RootPath, "A.dll");
253protected static readonly string s_regress442570_BDllPath = Path.Combine(s_regress442570_RootPath, "B.dll");
255protected static readonly string s_myAppRootPath = Path.Combine(s_rootPathPrefix, "MyApp");
256protected static readonly string s_myApp_V05Path = Path.Combine(s_myAppRootPath, "v0.5");
257protected static readonly string s_myApp_V10Path = Path.Combine(s_myAppRootPath, "v1.0");
258protected static readonly string s_myApp_V20Path = Path.Combine(s_myAppRootPath, "v2.0");
259protected static readonly string s_myApp_V30Path = Path.Combine(s_myAppRootPath, "v3.0");
261protected static readonly string s_netstandardLibraryDllPath = Path.Combine(s_rootPathPrefix, "NetStandard", "netstandardlibrary.dll");
262protected static readonly string s_netstandardDllPath = Path.Combine(s_rootPathPrefix, "NetStandard", "netstandard.dll");
264protected static readonly string s_portableDllPath = Path.Combine(s_rootPathPrefix, "SystemRuntime", "Portable.dll");
265protected static readonly string s_systemRuntimeDllPath = Path.Combine(s_rootPathPrefix, "SystemRuntime", "System.Runtime.dll");
267protected static readonly string s_dependsOnNuGet_ADllPath = Path.Combine(s_rootPathPrefix, "DependsOnNuget", "A.dll");
268protected static readonly string s_dependsOnNuGet_NDllPath = Path.Combine(s_rootPathPrefix, "DependsOnNuget", "N.dll");
269protected static readonly string s_dependsOnNuGet_NExePath = Path.Combine(s_rootPathPrefix, "DependsOnNuget", "N.exe");
270protected static readonly string s_dependsOnNuGet_NWinMdPath = Path.Combine(s_rootPathPrefix, "DependsOnNuget", "N.winmd");
272protected static readonly string s_nugetCache_N_Lib_NDllPath = Path.Combine(s_rootPathPrefix, "NugetCache", "N", "lib", "N.dll");
274protected static readonly string s_assemblyFolder_RootPath = Path.Combine(s_rootPathPrefix, "AssemblyFolder");
275protected static readonly string s_assemblyFolder_SomeAssemblyDllPath = Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.dll");
376Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"),
377Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"),
378Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"),
379Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"),
380Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"),
381Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"),
382Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"),
383Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"),
384Path.Combine(s_myVersion20Path, "System.Data.dll"),
385Path.Combine(s_myVersion20Path, "System.Xml.dll"),
386Path.Combine(s_myVersion20Path, "System.Xml.pdb"),
387Path.Combine(s_myVersion20Path, "System.Xml.xml"),
388Path.Combine(s_myVersion20Path, "en", "System.Xml.resources.dll"),
389Path.Combine(s_myVersion20Path, "en", "System.Xml.resources.pdb"),
390Path.Combine(s_myVersion20Path, "en", "System.Xml.resources.config"),
391Path.Combine(s_myVersion20Path, "xx", "System.Xml.resources.dll"),
392Path.Combine(s_myVersion20Path, "en-GB", "System.Xml.resources.dll"),
393Path.Combine(s_myVersion20Path, "en-GB", "System.Xml.resources.pdb"),
394Path.Combine(s_myVersion20Path, "en-GB", "System.Xml.resources.config"),
395Path.Combine(s_rootPathPrefix, s_myPrivateAssemblyRelPath),
396Path.Combine(s_myProjectPath, "MyCopyLocalAssembly.dll"),
397Path.Combine(s_myProjectPath, "MyDontCopyLocalAssembly.dll"),
398Path.Combine(s_myVersion20Path, "BadImage.dll"), // An assembly that will give a BadImageFormatException from GetAssemblyName
399Path.Combine(s_myVersion20Path, "BadImage.pdb"),
400Path.Combine(s_myVersion20Path, "MyGacAssembly.dll"),
401Path.Combine(s_myVersion20Path, "MyGacAssembly.pdb"),
402Path.Combine(s_myVersion20Path, "xx", "MyGacAssembly.resources.dll"),
403Path.Combine(s_myVersion20Path, "System.dll"),
404Path.Combine(s_myVersion40Path, "System.dll"),
405Path.Combine(s_myVersion90Path, "System.dll"),
406Path.Combine(s_myVersion20Path, "mscorlib.dll"),
407Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"),
409Path.Combine(s_myProjectPath, "mscorlib.dll"), // This is an mscorlib.dll that has no metadata (i.e. GetAssemblyName returns null)
410Path.Combine(s_myProjectPath, "System.Data.dll"), // This is a System.Data.dll that has the wrong pkt, it shouldn't be matched.
411Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), // A vendor component that we should find in the registry.
429Path.Combine(s_myComponentsV30Path, "MyControlWithFutureTargetNDPVersion.dll"), // The future version of a component.
430Path.Combine(s_myComponentsV20Path, "MyControlWithFutureTargetNDPVersion.dll"), // The current version of a component.
431Path.Combine(s_myComponentsV10Path, "MyNDP1Control.dll"), // A control that only has an NDP 1.0 version
432Path.Combine(s_myComponentsV20Path, "MyControlWithPastTargetNDPVersion.dll"), // The current version of a component.
433Path.Combine(s_myComponentsV10Path, "MyControlWithPastTargetNDPVersion.dll"), // The past version of a component.
437Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), // A devices mscorlib.
454Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"),
502Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pdb"),
503Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.xml"),
504Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pri"),
505Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.licenses"),
506Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.config"),
515Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"),
516Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"),
517Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"),
518Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"),
519Path.Combine(s_myAppRootPath, "DependsOnWeaklyNamedUnified.dll"),
520Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"),
526Path.Combine(s_myComponentsMiscPath, "DependsOnOnlyv4Assemblies.dll"), // Only depends on 4.0.0 assemblies
527Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), // Is in redist list and is a 9.0 assembly
528Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), // Depends on 9.0 assemblies
529Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), // Depends on 9.0 assemblies
530Path.Combine(s_myComponents10Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
531Path.Combine(s_myComponents20Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
549Path.Combine(s_myComponentsRootPath, "V.dll"),
550Path.Combine(s_myComponents2RootPath, "W.dll"),
551Path.Combine(s_myComponentsRootPath, "X.dll"),
552Path.Combine(s_myComponentsRootPath, "X.pdb"),
553Path.Combine(s_myComponentsRootPath, "Y.dll"),
554Path.Combine(s_myComponentsRootPath, "Z.dll"),
556Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"),
557Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"),
652string baseDir = Path.GetDirectoryName(file);
656string fileExtension = Path.GetExtension(file);
762else if (fullPath.StartsWith(@"C:\DirectoryContains", StringComparison.OrdinalIgnoreCase) && Path.GetExtension(fullPath).Equals(".winmd", StringComparison.OrdinalIgnoreCase))
766else if (fullPath.StartsWith(@"C:\WinMDArchVerification", StringComparison.OrdinalIgnoreCase) && Path.GetExtension(fullPath).Equals(".winmd", StringComparison.OrdinalIgnoreCase))
858if (!Path.IsPathRooted(path))
860path = Path.GetFullPath(path);
887Path.GetTempPath()
913Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
922Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
1052if (!Path.IsPathRooted(path))
1054path = Path.GetFullPath(path);
1076String.Equals(path, Path.Combine(s_myVersion20Path, "BadImage.dll"), StringComparison.OrdinalIgnoreCase))
1078throw new System.BadImageFormatException(@"The format of the file '" + Path.Combine(s_myVersion20Path, "BadImage.dll") + "' is invalid");
1083String.Equals(path, Path.Combine(s_myProjectPath, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1084|| String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1085|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1093String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1094|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1105if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1110if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1115if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1203if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1208if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1213if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.XML.dll"), StringComparison.OrdinalIgnoreCase))
1220if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1227if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1233if (path.EndsWith(Path.Combine(s_myVersion20Path, "MyGacAssembly.dll")))
1239if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1245if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1251if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1259String.Equals(path, Path.Combine(s_myVersion20Path, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1300if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
1305if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1320if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1325if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1330if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1381if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
1387if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1393if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
1398if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1403if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1438if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.pdb"), StringComparison.OrdinalIgnoreCase))
1486if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
1490if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
1494if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
1499if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
1504if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
1509if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
1514if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
1781string defaultName = String.Format("{0}, Version=0.0.0.0, PublicKeyToken=null, Culture=Neutral", Path.GetFileNameWithoutExtension(path));
1823if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1827else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1831else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1835else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1839else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1843else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1858if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1866if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1874if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1996if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2092String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
2093|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
2103if (String.Equals(path, Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"), StringComparison.OrdinalIgnoreCase))
2151if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), StringComparison.OrdinalIgnoreCase))
2212if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnWeaklyNamedUnified.dll"), StringComparison.OrdinalIgnoreCase))
2220if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
2228if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2236if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2244if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2252if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2276if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
2286if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2296if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
2304if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2312if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2345if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
2353if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
2358if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
2366if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
2371if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
2379if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
2384if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
2392if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2401if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2410if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2989string tempPath = Path.GetTempPath();
2990string redistListPath = Path.Combine(tempPath, Guid.NewGuid() + ".xml");
2991string rarCacheFile = Path.Combine(tempPath, Guid.NewGuid() + ".RarCache");
AssemblyDependency\SuggestedRedirects.cs (2)
206warningMessage.ShouldContain(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.FourSpaceIndent", ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.ReferenceDependsOn", "D, Version=1.0.0.0, CulTUre=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa", Path.Combine(s_myLibraries_V1Path, "D.dll"))));
251warningMessage.ShouldContain(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.FourSpaceIndent", ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.ReferenceDependsOn", "D, Version=1.0.0.0, CulTUre=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa", Path.Combine(s_myLibraries_V1Path, "D.dll"))));
AssignLinkMetadata_Tests.cs (9)
20private readonly string _defaultItemSpec = Path.Combine(Path.GetTempPath(), "SubFolder", "a.cs");
80Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link"));
107Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link"));
116ITaskItem item = GetParentedTaskItem(_defaultItemSpec, Path.Combine("SubFolder2", "SubSubFolder", "a.cs"));
137? Path.Combine("//subfolder/a.cs")
158ITaskItem item = new TaskItem(Path.Combine("SubFolder", "a.cs"));
179FullPath = Path.Combine(Path.GetTempPath(), "a.proj")
Copy_Tests.cs (87)
223Directory.Exists(Path.Combine(destinationFolder.Path, "source0")).ShouldBeTrue();
224Directory.Exists(Path.Combine(destinationFolder.Path, "source1")).ShouldBeTrue();
952string destinationFolder = Path.Combine(Path.GetTempPath(), "2A333ED756AF4dc392E728D0F874A398");
953string destination1 = Path.Combine(destinationFolder, Path.GetFileName(source1));
954string destination2 = Path.Combine(destinationFolder, Path.GetFileName(source2));
1304string sourceFile = Path.GetTempPath();
1353string destinationFile = Path.GetTempFileName();
1354string sourceFile = Path.GetTempFileName();
1522string destinationFile = Path.GetTempPath();
1568string temp = Path.GetTempPath();
1569string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
1570string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
1572string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
1656string temp = Path.GetTempPath();
1657string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1728string file = Path.Combine(currdir, filename);
1779string temp = Path.GetTempPath();
1780string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1781string invalidFile = NativeMethodsShared.IsUnixLike ? Path.Combine(temp, "!@#$%^&*()|") : "!@#$%^&*()|";
1844string temp = Path.GetTempPath();
1845string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1846string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
1914string sourceFileEscaped = Path.GetTempPath() + "a%253A_" + Guid.NewGuid().ToString("N") + ".txt";
1916string temp = Path.GetTempPath();
1917string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1918string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
1976string tempPath = Path.GetTempPath();
1980new TaskItem(Path.Combine(tempPath, "a.cs")),
1981new TaskItem(Path.Combine(tempPath, "b.cs")),
1982new TaskItem(Path.Combine(tempPath, "a.cs")),
1983new TaskItem(Path.Combine(tempPath, "a.cs")),
2001DestinationFolder = new TaskItem(Path.Combine(tempPath, "foo")),
2020filesActuallyCopied.Select(f => Path.GetFileName(f.Key.Name)).ShouldBe(new[] { "a.cs", "b.cs" }, ignoreOrder: true);
2033string tempPath = Path.GetTempPath();
2037new TaskItem(Path.Combine(tempPath, "a.cs")),
2038new TaskItem(Path.Combine(tempPath, "b.cs")),
2039new TaskItem(Path.Combine(tempPath, "a.cs")),
2040new TaskItem(Path.Combine(tempPath, "a.cs")),
2041new TaskItem(Path.Combine(tempPath, "a.cs")),
2054new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs
2055new TaskItem(Path.Combine(tempPath, @"xa.cs")), // b.cs -> xa.cs should copy because it's a different source
2056new TaskItem(Path.Combine(tempPath, @"xb.cs")), // a.cs -> xb.cs should copy because it's a different destination
2057new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs should copy because it's a different source from the b.cs copy done previously
2058new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs should not copy because it's the same source
2087string xaPath = Path.Combine(tempPath, "xa.cs");
2090Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Name);
2091Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Name);
2092Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Name);
2094string xbPath = Path.Combine(tempPath, "xb.cs");
2097Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Name);
2110string temp = Path.GetTempPath();
2111string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2112string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
2113string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
2548string temp = Path.GetTempPath();
2549string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2550string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2619string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2620string destFile1 = Path.Combine(destFolder, Path.GetFileName(sourceFile1));
2621string destFile2 = Path.Combine(destFolder, Path.GetFileName(sourceFile2));
2626string nothingFile = Path.Combine(destFolder, "nothing.txt");
2722string temp = Path.GetTempPath();
2723string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2724string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2751string destLink = Path.Combine(destFolder, Path.GetFileNameWithoutExtension(sourceFile) + "." + n);
2804string temp = Path.GetTempPath();
2805string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2806string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2870string temp = Path.GetTempPath();
2871string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2872string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2940string destFile = Path.Combine(destFolder.Path, "The Destination");
2984Path.Combine(Path.GetDirectoryName(sourceFile2.Path), ".", Path.GetFileName(sourceFile2.Path))) // sourceFile2.Path with a "." inserted before the file name
GetInstalledSDKLocations_Tests.cs (52)
47string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory");
52Path.Combine(new[] { tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0" }));
54Path.Combine(new[] { tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0" }));
56Path.Combine(new[] { tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0" }));
58Path.Combine(
62Path.Combine(
66Path.Combine(
72Path.Combine(new[] { tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "v1.1" }));
75Directory.CreateDirectory(Path.Combine(tempPath, "Windows", "v3.0") + Path.DirectorySeparatorChar);
79Path.Combine(tempPath, "Windows", "NotAVersion") + Path.DirectorySeparatorChar);
83Path.Combine(
90Path.Combine(new[] { tempPath, "Doors", "2.0", "ExtensionSDKs", "MyAssembly", "3.0" }));
92Path.Combine(
98Directory.CreateDirectory(Path.Combine(tempPath, "Walls" + Path.DirectorySeparatorChar + "1.0" + Path.DirectorySeparatorChar));
99File.WriteAllText(Path.Combine(tempPath, "Walls", "1.0", "SDKManifest.xml"), "Hello");
115string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory2");
120Path.Combine(new[] { tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "4.0" }));
122Path.Combine(new[] { tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "5.0" }));
124Path.Combine(new[] { tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "6.0" }));
126Path.Combine(
130Path.Combine(
134Path.Combine(
343Path.Combine(
345+ Path.DirectorySeparatorChar,
349Path.Combine(
351+ Path.DirectorySeparatorChar,
355Path.Combine(
357+ Path.DirectorySeparatorChar,
362Path.Combine(
364+ Path.DirectorySeparatorChar,
368Path.Combine(
370+ Path.DirectorySeparatorChar,
374Path.Combine(
376+ Path.DirectorySeparatorChar,
417Path.Combine(
419+ Path.DirectorySeparatorChar,
423Path.Combine(
425+ Path.DirectorySeparatorChar,
429Path.Combine(
431+ Path.DirectorySeparatorChar,
436Path.Combine(
438+ Path.DirectorySeparatorChar,
442Path.Combine(
444+ Path.DirectorySeparatorChar,
448Path.Combine(
450+ Path.DirectorySeparatorChar,
GetSDKReference_Tests.cs (107)
50string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
51sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
52string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
53string referenceAssemblyDirectoryConfigx64 = Path.Combine(sdkDirectory, "References\\Retail\\X64");
54string referenceAssemblyDirectoryConfigNeutral = Path.Combine(sdkDirectory, "References\\Retail\\Neutral");
55string referenceAssemblyDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\Neutral");
56string referenceAssemblyDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X86");
57string referenceAssemblyDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X64");
59string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
60string redistDirectoryConfigx64 = Path.Combine(sdkDirectory, "Redist\\Retail\\X64");
61string redistDirectoryConfigNeutral = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
62string redistDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
63string redistDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X86");
64string redistDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X64");
66string designTimeDirectoryConfigx86 = Path.Combine(sdkDirectory, "DesignTime\\Retail\\X86");
67string designTimeDirectoryConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\Retail\\Neutral");
68string designTimeDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\Neutral");
69string designTimeDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\X86");
84Directory.CreateDirectory(Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep"));
94string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "A.winmd");
95string testWinMD64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "A.winmd");
96string testWinMDNeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.winmd");
97string testWinMDNeutralWinXML = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.xml");
98string testWinMDCommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "C.winmd");
99string testWinMDCommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "C.winmd");
100string testWinMDCommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "D.winmd");
101string testWinMDCommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.winmd");
103string testRA = Path.Combine(referenceAssemblyDirectoryConfigx86, "E.dll");
104string testRA64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "E.dll");
105string testRANeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "F.dll");
106string testRACommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "G.dll");
107string testRACommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "G.dll");
108string testRACommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "H.dll");
110string testRACommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.dll");
112string redist = Path.Combine(redistDirectoryConfigx86, "A.dll");
113string redist64 = Path.Combine(redistDirectoryConfigx64, "A.dll");
114string redistNeutral = Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep\\B.dll");
115string redistNeutralPri = Path.Combine(redistDirectoryConfigNeutral, "B.pri");
116string redistCommonConfigurationx86 = Path.Combine(redistDirectoryCommonConfigX86, "C.dll");
117string redistCommonConfigurationx64 = Path.Combine(redistDirectoryCommonConfigX64, "C.dll");
118string redistCommonConfigurationNeutral = Path.Combine(redistDirectoryCommonConfigNeutral, "D.dll");
119string redistCommonConfigurationNeutralDupe = Path.Combine(redistDirectoryCommonConfigNeutral, "A.dll");
154string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
155sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\AnotherSDK\\2.0\\");
156string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
157string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
165string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "B.winmd");
166string redist = Path.Combine(redistDirectoryConfigx86, "B.pri");
167string redist2 = Path.Combine(redistDirectoryConfigx86, "B.dll");
190private readonly string _cacheDirectory = Path.Combine(Path.GetTempPath(), "GetSDKReferenceFiles");
299Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
300Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
305Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
306Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
311Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\X86\\"), sdkFolders[0]);
312Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[1]);
313Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\X86\\"), sdkFolders[2]);
314Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[3]);
433string winmd = Path.Combine(_sdkDirectory, "References\\Retail\\X86\\A.winmd");
436Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec), true);
445Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec), true);
454Assert.Equal("A.winmd", Path.GetFileName(t.CopyLocalFiles[0].ItemSpec), true);
463Assert.Equal("E.dll", Path.GetFileName(t.CopyLocalFiles[5].ItemSpec), true);
472Assert.Equal("B.xml", Path.GetFileName(t.CopyLocalFiles[2].ItemSpec));
557Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec), true);
566Assert.Equal("B.winmd", Path.GetFileName(t.References[1].ItemSpec), true);
575Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec), true);
684Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec));
691Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec));
730Assert.Equal("A.dll", Path.GetFileName(t.References[0].ItemSpec), true);
737Assert.Equal("h.dll", Path.GetFileName(t.References[4].ItemSpec), true);
826Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec));
835Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec));
878Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec));
887Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec));
963Assert.Equal("A.dll", Path.GetFileName(t.RedistFiles[0].ItemSpec));
969Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[1].ItemSpec), true);
975Assert.Equal("B.PRI", Path.GetFileName(t.RedistFiles[2].ItemSpec), true);
981Assert.Equal("C.dll", Path.GetFileName(t.RedistFiles[3].ItemSpec), true);
987Assert.Equal("D.dll", Path.GetFileName(t.RedistFiles[4].ItemSpec), true);
1236string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1237string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1238string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1239string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
1282string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\ASubDirectory\\TwoDeep\\B.dll");
1283string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.dll");
1325string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1326string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1327string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1328string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
1369Assert.Equal("A.dll", Path.GetFileName(t.RedistFiles[0].ItemSpec), true);
1375Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[1].ItemSpec), true);
1381Assert.Equal("B.dll", Path.GetFileName(t.RedistFiles[2].ItemSpec), true);
1387Assert.Equal("B.pri", Path.GetFileName(t.RedistFiles[3].ItemSpec), true);
1393Assert.Equal("B.PRI", Path.GetFileName(t.RedistFiles[4].ItemSpec), true);
1399Assert.Equal("C.dll", Path.GetFileName(t.RedistFiles[5].ItemSpec), true);
1405Assert.Equal("D.dll", Path.GetFileName(t.RedistFiles[6].ItemSpec), true);
1414if (Path.GetFileName(path).Equals("C.winmd", StringComparison.OrdinalIgnoreCase))
1419if (Path.GetExtension(path).Equals(".winmd", StringComparison.OrdinalIgnoreCase) || Path.GetExtension(path).Equals(".dll", StringComparison.OrdinalIgnoreCase))
1421string fileName = Path.GetFileNameWithoutExtension(path);
1430if (Path.GetFileName(path).Equals("A.winmd", StringComparison.OrdinalIgnoreCase))
1434if (Path.GetExtension(path).Equals(".winmd", StringComparison.OrdinalIgnoreCase))
1439if (Path.GetExtension(path).Equals(".dll", StringComparison.OrdinalIgnoreCase))
Move_Tests.cs (15)
419string temp = Path.GetTempPath();
420string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
421string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
423string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
594string file = Path.Combine(currdir, filename);
635string temp = Path.GetTempPath();
636string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
680string temp = Path.GetTempPath();
681string destFolder = Path.Combine(temp, "2A333ED756AF4d1392E728D0F864A398");
682string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
734string temp = Path.GetTempPath();
735string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
736string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
737string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
MSBuild_Tests.cs (8)
47Directory.SetCurrentDirectory(Path.GetTempPath());
62string fileName = Path.GetFileName(tempProject);
70int rootLength = Path.GetPathRoot(tempProject).Length;
401Path.Combine("bug'533'369", "Sub;Dir", "ConsoleApplication1", "ConsoleApplication1.csproj"), $@"
441Path.Combine("bug'533'369", "Sub;Dir", "ConsoleApplication1", "Program.cs"), @"
464Path.Combine("bug'533'369", "Sub;Dir", "TeamBuild.proj"), @"
482ObjectModelHelpers.BuildTempProjectFileExpectSuccess(Path.Combine("bug'533'369", "Sub;Dir", "TeamBuild.proj"), logger);
484ObjectModelHelpers.AssertFileExistsInTempProjectDirectory(Path.Combine("bug'533'369", "Sub;Dir", "binaries", "ConsoleApplication1.exe"));
RARPrecomputedCache_Tests.cs (8)
31{ Path.Combine(standardCache.Path, "assembly1"), new SystemState.FileState(now) },
32{ Path.Combine(standardCache.Path, "assembly2"), new SystemState.FileState(now) { Assembly = new Shared.AssemblyNameExtension("hi") } } };
75string dllName = Path.Combine(Path.GetDirectoryName(standardCache.Path), "randomFolder", "dll.dll");
116string dllName = Path.Combine(Path.GetDirectoryName(precomputedCache.Path), "randomFolder", "dll.dll");
118{ Path.Combine(precomputedCache.Path, "..", "assembly1", "assembly1"), new SystemState.FileState(DateTime.Now) },
119{ Path.Combine(precomputedCache.Path, "assembly2"), new SystemState.FileState(DateTime.Now) { Assembly = new Shared.AssemblyNameExtension("hi") } },
ResolveAssemblyReference_CustomCultureTests.cs (9)
18private static string TestAssetsRootPath { get; } = Path.Combine(
19Path.GetDirectoryName(typeof(AddToWin32Manifest_Tests).Assembly.Location) ?? AppContext.BaseDirectory,
43var projectBFolder = Path.Combine(solutionPath, projectBName);
45var projBContent = File.ReadAllText(Path.Combine(testAssetsPath, projectBName))
49env.CreateFile(Path.Combine(projectBFolder, projectBName), projBContent);
62var yueCultureResourceDll = Path.Combine(projBOutputPath, "yue", "ProjectA.resources.dll");
65var euyCultureResourceDll = Path.Combine(projBOutputPath, "euy", "ProjectA.resources.dll");
84var sourcePath = Path.Combine(sourceFolder, fileName);
86File.Copy(sourcePath, Path.Combine(destinationFolder, fileName));
ResolveNonMSBuildProjectOutput_Tests.cs (44)
137projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
143projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
145projectOutputs, true, Path.Combine("obj", "correct.dll"));
149projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
150projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
151projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
157projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
158projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
159projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
160projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
162projectOutputs, true, Path.Combine("obj", "correct.dll"));
224projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "managed.dll"));
225projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "unmanaged.dll"));
227TestUnresolvedReferencesHelper(projectRefs, projectOutputs, path => (path == Path.Combine("obj", "managed.dll")), out unresolvedOutputs, out resolvedOutputs);
230Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "managed.dll")));
231Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "unmanaged.dll")));
232Assert.Equal("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "managed.dll")]).GetMetadata("ManagedAssembly"));
233Assert.NotEqual("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "unmanaged.dll")]).GetMetadata("ManagedAssembly"));
250projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
251projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
252projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
265projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
266projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
267projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
268projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
273Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
279projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
280projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
281projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
282projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
283projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "correct2.dll"));
288Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
289Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct2.dll")));
294projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
295projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
296projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
307projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
308projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
309projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
310projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
316Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
321projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
322projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
323projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
ResolveSDKReference_Tests.cs (299)
123string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "TestMaxPlatformVersionWithTargetFrameworkVersion");
124string testDirectory = Path.Combine(new[] { testDirectoryRoot, "MyPlatform", "8.0", "ExtensionSDKs", "SDkWithManifest", "2.0" }) + Path.DirectorySeparatorChar;
176string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
462string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyDependsOnWarningFromManifest");
463string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
484string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
577string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit1");
578string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
588string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
632string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit2");
633string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
643string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
690string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit3");
691string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
701string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
745string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit4");
746string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
756string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
800string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit5");
801string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
811string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
855string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit6");
856string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
866string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
912string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit7");
913string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
923string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
967string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit8");
968string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
977string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1021string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit9");
1022string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1032string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1491string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SDKFoundButBadlyFormattedSDKManifestWarnings");
1492string testDirectory = Path.Combine(testDirectoryRoot, "BadTestSDK", "2.0") + Path.DirectorySeparatorChar;
1498string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1550string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SDKFoundButBadlyFormattedSDKManifestErrors");
1551string testDirectory = Path.Combine(testDirectoryRoot, "BadTestSDK\\2.0\\");
1557string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1601string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "TestMaxPlatformVersionWithTargetFrameworkVersion");
1602string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1654string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1707string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "EmptySDKManifestAttributes");
1708string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1734string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1792string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestAttributes");
1793string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1816string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1890string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigAndArch");
1891string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1911string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1963string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigOnly");
1964string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
1982string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2032string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "NoCopyOnPlatformIdentityFound");
2033string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2047string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2099string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigOnly");
2100string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2120string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2173string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ManifestOnlyHasArmLocation");
2174string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2189string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2241string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ManifestArmLocationWithOthers");
2242string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2259string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2312string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MatchNoNamesButNamesExistWarning");
2313string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2330string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2384string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MatchNoNamesButNamesExistError");
2385string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2402string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2453string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SingleSupportedArchitectureMatchesProject");
2454string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2472string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2526string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ProductFamilySetInManifest");
2527string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2546string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2591string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ProductFamilySetInManifestAndMetadata");
2592string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2611string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2658string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsNotInManifest");
2659string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2678string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2722string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsBadMetadata");
2723string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2743string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2790string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilySameName");
2791string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar;
2792string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
2793string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "3.0") + Path.DirectorySeparatorChar;
2821string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2822string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
2823string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
2888string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilyDiffName");
2889string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar;
2890string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK1", "2.0") + Path.DirectorySeparatorChar;
2891string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "3.0") + Path.DirectorySeparatorChar;
2919string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2920string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
2921string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
2986string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilyDiffName");
2987string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar;
2988string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK2", "2.0") + Path.DirectorySeparatorChar;
2989string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "3.0") + Path.DirectorySeparatorChar;
2990string testDirectory4 = Path.Combine(testDirectoryRoot, "GoodTestSDK3", "4.0") + Path.DirectorySeparatorChar;
3024string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3025string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
3026string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
3027string sdkManifestFile4 = Path.Combine(testDirectory4, "SDKManifest.xml");
3099string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameSDKName");
3100string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "1.0") + Path.DirectorySeparatorChar;
3101string testDirectory2 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3102string testDirectory3 = Path.Combine(testDirectoryRoot, "GoodTestSDK", "3.0") + Path.DirectorySeparatorChar;
3130string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3131string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
3132string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
3205string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsVerifyManifestReading");
3206string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3226string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3279string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadata");
3280string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3300string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3356string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadataButMetadataDoesNotMatch");
3357string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3376string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3422string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadata");
3423string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3444string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3500string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SingleSupportedArchitectureDoesNotMatchProject");
3501string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3520string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3564string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MultipleSupportedArchitectureMatchesProject");
3565string testDirectory = Path.Combine(testDirectoryRoot, "GoodTestSDK", "2.0") + Path.DirectorySeparatorChar;
3583string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3636string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MultipleSupportedArchitectureMatchesProject");
3638Path.Combine(new[] { testDirectoryRoot, "MyPlatform", "8.0", "ExtensionSDKs", "SDkWithManifest", "2.0" })
3639+ Path.DirectorySeparatorChar;
3657string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3704string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsWithFramework");
3705string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3706string archRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3707string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3708string archCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3709string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
3711string sdkDirectory3 = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\FrameworkSDkWithManifest\\2.0\\");
3712string archRedist3 = Path.Combine(sdkDirectory3, "Redist\\Retail\\x64");
3713string archRedist33 = Path.Combine(sdkDirectory3, "Redist\\Retail\\Neutral");
3714string archCommonRedist3 = Path.Combine(sdkDirectory3, "Redist\\CommonConfiguration\\x64");
3785string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
3786string sdkManifestFile2 = Path.Combine(sdkDirectory3, "SDKManifest.xml");
3787string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3794string redist1 = Path.Combine(archRedist, "A.dll");
3795string redist2 = Path.Combine(neutralRedist, "B.dll");
3796string redist3 = Path.Combine(archCommonRedist, "C.dll");
3797string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
3798string redist5 = Path.Combine(archRedist33, "A.dll");
3799string redist6 = Path.Combine(archCommonRedist3, "B.dll");
3847string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsWithFramework");
3848string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3849string archRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3850string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3851string archCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3852string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
3854string sdkDirectory3 = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\FrameworkSDkWithManifest\\2.0\\");
3855string archRedist3 = Path.Combine(sdkDirectory3, "Redist\\Retail\\x64");
3856string archRedist33 = Path.Combine(sdkDirectory3, "Redist\\Retail\\Neutral");
3857string archCommonRedist3 = Path.Combine(sdkDirectory3, "Redist\\CommonConfiguration\\x64");
3926string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
3927string sdkManifestFile2 = Path.Combine(sdkDirectory3, "SDKManifest.xml");
3928string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3935string redist1 = Path.Combine(archRedist, "A.dll");
3936string redist2 = Path.Combine(neutralRedist, "B.dll");
3937string redist3 = Path.Combine(archCommonRedist, "C.dll");
3938string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
3939string redist5 = Path.Combine(archRedist3, "D.dll");
3940string redist6 = Path.Combine(archRedist33, "A.dll");
3941string redist7 = Path.Combine(archCommonRedist3, "B.dll");
3991string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsTargetArchitectureDoesNotExists");
3992string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3993string x86Redist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3994string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3995string x86CommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3996string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4043string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
4044string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4050string redist1 = Path.Combine(x86CommonRedist, "A.dll");
4051string redist2 = Path.Combine(x86Redist, "B.dll");
4052string redist3 = Path.Combine(neutralRedist, "C.dll");
4053string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
4100string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "CheckDefaultingOfTargetConfigAndArchitecture");
4101string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
4102string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
4103string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4145string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
4146string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4151string redist1 = Path.Combine(neutralRedist, "B.dll");
4152string redist2 = Path.Combine(neutralCommonRedist, "C.dll");
4200new Dictionary<string, ITaskItem>() { { "sdkName, Version=1.0.2", new TaskItem(Path.GetTempFileName(), new Dictionary<string, string>() { { "PlatformVersion", "1.0.2" } }) } },
4220string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "CheckDefaultingOfTargetConfigAndArchitecture");
4221string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\v8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
4222string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
4223string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4284string redist1 = Path.Combine(neutralRedist, "B.dll");
4285string redist2 = Path.Combine(neutralCommonRedist, "C.dll");
4292string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4295string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
ResourceHandling\GenerateResource_Tests.cs (126)
73Assert.Equal(".resources", Path.GetExtension(resourcesFile));
75Assert.Equal(".resources", Path.GetExtension(resourcesFile));
112string expectedOutFile0 = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(resxFile0, ".resources"));
113string expectedOutFile1 = Path.Combine(Path.GetTempPath(), "resx1.foo.resources");
114string expectedOutFile2 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
115string expectedOutFile3 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
161Assert.Equal(".resources", Path.GetExtension(resourcesFile));
163Assert.Equal(".resources", Path.GetExtension(resourcesFile));
210Assert.Equal(".resources", Path.GetExtension(resourcesFile));
246t.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(resourcesFile, ".resx")) };
248Assert.Equal(".resx", Path.GetExtension(t.FilesWritten[0].ItemSpec));
253t2a.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(resourcesFile, ".txt")) };
255Assert.Equal(".txt", Path.GetExtension(t2a.FilesWritten[0].ItemSpec));
262Assert.Equal(".resx", Path.GetExtension(t2b.FilesWritten[0].ItemSpec));
296string outputFile = Path.ChangeExtension(resourcesFile, ".txt");
301Assert.Equal(".txt", Path.GetExtension(resourcesFile));
333Path.GetExtension(resourceOutput).ShouldBe(".resources");
334Path.GetExtension(t.FilesWritten[0].ItemSpec).ShouldBe(".resources");
410Path.GetExtension(t.OutputResources[0].ItemSpec).ShouldBe(".resources");
411Path.GetExtension(t.FilesWritten[0].ItemSpec).ShouldBe(".resources");
528string outputResource = Path.ChangeExtension(Path.GetFullPath(resxFile), ".resources");
631Path.GetExtension(t.OutputResources[0].ItemSpec).ShouldBe(".resources");
632Path.GetExtension(t.FilesWritten[0].ItemSpec).ShouldBe(".resources");
746Assert.Equal(".resources", Path.GetExtension(resourcesFile));
748Assert.Equal(".resources", Path.GetExtension(resourcesFile));
798resourcesFile1 = Path.ChangeExtension(resxFile, ".resources");
799resourcesFile2 = Path.ChangeExtension(txtFile, ".resources");
1034t.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(textFile, ".resx")) };
1039Assert.Equal(".resx", Path.GetExtension(resourcesFile));
1067t.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(resourcesFile, ".resx")) };
1069Assert.Equal(".resx", Path.GetExtension(t.FilesWritten[0].ItemSpec));
1074t2a.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(t.FilesWritten[0].ItemSpec, ".resources")) };
1076Assert.Equal(".resources", Path.GetExtension(t2a.FilesWritten[0].ItemSpec));
1084Assert.Equal(".resx", Path.GetExtension(t2b.FilesWritten[0].ItemSpec));
1120Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1131Assert.Equal(".txt", Path.GetExtension(resourcesFile));
1167string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);
1169Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1171Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1174string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs");
1230string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);
1232Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1234Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1238string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs");
1271Assert.Equal(t2.FilesWritten[2].ItemSpec, Path.ChangeExtension(t2.Sources[0].ItemSpec, ".cs"));
1309strFile = Path.ChangeExtension(resourcesFile, ".cs"); // STR filename should be generated from output not input filename
1321string stronglyTypedClassName = Path.GetFileNameWithoutExtension(resourcesFile);
1324Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1415Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1417Assert.Equal(".resources", Path.GetExtension(t.FilesWritten[0].ItemSpec));
1474string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".vb");
1478Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1480Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1534Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1536Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1541string STRfile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs");
1546Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
1592Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1594Assert.Equal(".resources", Path.GetExtension(resourcesFile));
1599string STRfile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs");
1604Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
1763resourcesFile1 = Path.ChangeExtension(resxFile1, ".resources");
1764resourcesFile2 = Path.ChangeExtension(resxFile2, ".resources");
1840resourcesFile1 = Path.ChangeExtension(resxFile1, ".resources");
1841resourcesFile2 = Path.ChangeExtension(resxFile2, ".resources");
1939t.OutputResources = new ITaskItem[] { new TaskItem(Path.ChangeExtension(resxFile, ".txt")) };
1975Assert.Equal(".resources", Path.GetExtension(resourcesFile));
2049string resourcesFile = Path.ChangeExtension(resxFile, ".resources");
2100string resourcesFile = Path.ChangeExtension(textFile, ".resources");
2140string resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2231string resourcesFile = Path.ChangeExtension(resxFile, ".resources");
2265string outputFile = Path.ChangeExtension(t.Sources[i].ItemSpec, ".resources");
2342File.Delete(Path.ChangeExtension(taskItem.ItemSpec, ".resources"));
2351string outputFile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".resources");
2354outputFile = Path.ChangeExtension(t.Sources[1].ItemSpec, ".resources");
2358outputFile = Path.ChangeExtension(t.Sources[2].ItemSpec, ".resources");
2361outputFile = Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources");
2366Assert.Equal(t.FilesWritten[0].ItemSpec, Path.ChangeExtension(t.Sources[0].ItemSpec, ".resources"));
2367Assert.Equal(t.FilesWritten[1].ItemSpec, Path.ChangeExtension(t.Sources[1].ItemSpec, ".resources"));
2379Assert.Equal(t.FilesWritten[2].ItemSpec, Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources"));
2430Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.StronglyTypedFileName));
2464File.Delete(Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"));
2473Assert.Equal(t.StronglyTypedFileName, Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"));
2557File.Delete(Path.ChangeExtension(textFile, ".resources"));
2575resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2651string newTextFile = Path.ChangeExtension(textFile, ".foo");
2684string resxFile = Path.ChangeExtension(textFile, ".foo");
2716string resxFile = Path.ChangeExtension(textFile, ".resources");
2811File.Delete(Path.ChangeExtension(resxFile, ".resources"));
2816File.Delete(Path.ChangeExtension(resxFile2, ".resources"));
2873string resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2910string resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2947string resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2986resourcesFile = Path.ChangeExtension(txtFile, ".resources");
2988string csFile = Path.ChangeExtension(txtFile, ".cs");
2992dir = Path.Combine(Path.GetTempPath(), "directory");
3118string p2pReference = Path.Combine(ObjectModelHelpers.TempProjectDir, "bin", "debug", "lib1.dll");
3211t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3360t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3409string resourcesFile = Path.ChangeExtension(resxFile, ".resources");
3445resourcesFile = Path.ChangeExtension(resxFile, ".resources");
3484File.Delete(Path.ChangeExtension(resxFile, ".cs"));
3488resourcesFile = Path.ChangeExtension(resxFile, ".resources");
3531resourcesFile = Path.ChangeExtension(resxFile, ".myresources");
3534string resourcesFile1 = Path.ChangeExtension(resxFile1, ".myresources");
3630Assert.Equal(".resources", Path.GetExtension(resourcesFile));
3632Assert.Equal(".resources", Path.GetExtension(resourcesFile));
3673env.CreateFolder(Path.Combine(env.DefaultTestDirectory.Path, "tmp_dir")),
3688Path.GetExtension(outputResourceFile).ShouldBe(".resources");
4140Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "System.dll");
4185string filename = Path.ChangeExtension(f, extension);
4238Assert.Equal(Path.GetFileNameWithoutExtension(textFile), Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
4241string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);
4245Assert.Equal(".resources", Path.GetExtension(resourcesFile));
4249Assert.Equal(".resources", Path.GetExtension(resourcesFile));
4254Assert.Equal(Path.ChangeExtension(t.Sources[0].ItemSpec, codeFileExtension), t.StronglyTypedFileName);
4261string STRFile = Path.ChangeExtension(textFile, codeFileExtension);
4265Assert.Contains("class " + Path.GetFileNameWithoutExtension(textFile).ToLower(), Utilities.ReadFileContent(STRFile).ToLower());
RoslynCodeTaskFactory_Tests.cs (4)
56<Reference Include=""" + Path.Combine(Path.GetDirectoryName(location), "..", "..", "..", "Samples", "Dependency",
115string output = RunnerUtilities.ExecMSBuild(assemblyProj.Path + $" /p:OutDir={Path.Combine(folder.Path, "subFolder")} /restore", out bool success);
123<Reference Include=""{Path.Combine(folder.Path, "subFolder", "5106.dll")}"" />
Unzip_Tests.cs (18)
87_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
88_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
131_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
132_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
133_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "F83E9633685494E53BEF3794EDEEE6A6.txt"), customMessage: _mockEngine.Log);
134_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "21D6D4596067723B3AC5DF9A8B3CBFE7.txt"), customMessage: _mockEngine.Log);
135Directory.Exists(Path.Combine(destination.Path, "emptyDir"));
236SourceFiles = new ITaskItem[] { new TaskItem(Path.Combine(testEnvironment.DefaultTestDirectory.Path, "foo.zip")), }
269_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
270_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
298_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
299_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
332_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.Log);
333_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.Log);
334_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.Log);
335_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.Log);
336_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "sub", "subfile.js"), customMessage: _mockEngine.Log);
479string unzippedFilePath = Path.Combine(destination.Path, executableName);
VerifyFileHash_Tests.cs (4)
30File = Path.Combine(AppContext.BaseDirectory, "TestResources", "lorem.bin"),
48File = Path.Combine(AppContext.BaseDirectory, "TestResources", "lorem.bin"),
66File = Path.Combine(AppContext.BaseDirectory, "this_does_not_exist.txt"),
87File = Path.Combine(AppContext.BaseDirectory, "TestResources", "lorem.bin"),
WriteCodeFragment_Tests.cs (35)
84task.OutputDirectory = new TaskItem(Path.GetTempPath());
89string file = Path.Combine(Path.GetTempPath(), "CombineFileDirectory.tmp");
108string expectedFile = Path.Combine(folder.ItemSpec, file.ItemSpec);
127TaskItem file = new TaskItem(Path.Combine(env.CreateFolder(folderPath: null, createFolder: false).Path, "File.tmp"));
153string fileName = Path.GetFileName(file.Path);
175string folder = Path.Combine(Path.GetTempPath(), "foo" + Path.DirectorySeparatorChar);
176string file = Path.Combine(folder, "CombineFileDirectory.tmp");
197string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
224string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
286string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
325task.OutputDirectory = new TaskItem(Path.GetTempPath());
351task.OutputDirectory = new TaskItem(Path.GetTempPath());
377task.OutputDirectory = new TaskItem(Path.GetTempPath());
382Assert.Equal(Path.GetTempPath(), task.OutputFile.ItemSpec.Substring(0, Path.GetTempPath().Length));
415string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
458task.OutputDirectory = new TaskItem(Path.GetTempPath());
480task.OutputDirectory = new TaskItem(Path.GetTempPath());
504task.OutputDirectory = new TaskItem(Path.GetTempPath());
528task.OutputDirectory = new TaskItem(Path.GetTempPath());
560task.OutputDirectory = new TaskItem(Path.GetTempPath());
596task.OutputDirectory = new TaskItem(Path.GetTempPath());
628task.OutputDirectory = new TaskItem(Path.GetTempPath());
651task.OutputDirectory = new TaskItem(Path.GetTempPath());
674task.OutputDirectory = new TaskItem(Path.GetTempPath());
699task.OutputDirectory = new TaskItem(Path.GetTempPath());
732task.OutputDirectory = new TaskItem(Path.GetTempPath());
1077return CreateTask(language, new TaskItem(Path.GetTempPath()), null, attributes);
XslTransformation_Tests.cs (14)
863var testingDocsDir = Path.Combine("TestDocuments", "Fdl2Proto");
865xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(testingDocsDir, "sila.xml")) };
866xslPath = new TaskItem(Path.Combine(testingDocsDir, "fdl2proto.xsl"));
883using (StreamReader sr = new StreamReader(Path.Combine(testingDocsDir, "expected.proto")))
950var otherXmlPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString()));
1051var otherXslPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString() + ".xslt"));
1058var myXmlPath1 = new TaskItem(Path.Combine(dir, "a.xml"));
1065var myXmlPath2 = new TaskItem(Path.Combine(dir, "b.xml"));
1107dir = Path.Combine(Path.GetTempPath(), DateTime.Now.Ticks.ToString());
1111xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "doc.xml")) };
1112xslPath = new TaskItem(Path.Combine(dir, "doc.xslt"));
1113xslCompiledPath = new TaskItem(Path.Combine(dir, "doc.dll"));
1114outputPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "testout.xml")) };
Microsoft.Build.UnitTests.Shared (49)
ObjectModelHelpers.cs (24)
147expectedInclude = expectedInclude.Select(i => Path.Combine(testProject.TestRoot, i)).ToArray();
197return path.Replace('/', Path.DirectorySeparatorChar).Replace('\\', Path.DirectorySeparatorChar);
579Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message);
739project.FullPath = Path.Combine(TempProjectDir, "Temporary" + guid.ToString("N") + ".csproj");
843s_tempProjectDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
905string fullFilePath = Path.Combine(TempProjectDir, fileRelativePath);
906Directory.CreateDirectory(Path.GetDirectoryName(fullFilePath));
982string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1015if (string.Equals(Path.GetExtension(projectFileRelativePath), ".sln"))
1017string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1616var projectDir = Path.Combine(root, relativePathFromRootToProject);
1619createdProjectFile = Path.Combine(projectDir, "build.proj");
1629return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
1667var fullPath = Path.Combine(pathFragments.ToArray());
1669var directoryName = Path.GetDirectoryName(fullPath);
1840if (Path.IsPathRooted(path))
1842splits[0] = Path.GetPathRoot(path);
1856var pathsSortedByDepth = paths.OrderByDescending(x => Path.GetDirectoryName(Path.GetFullPath(x)).Length);
1865string directory = Path.GetDirectoryName(path);
2028Path.IsPathRooted(path)
Microsoft.Build.Utilities.Core (176)
FileUtilities.cs (36)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
277path.Substring(start) + Path.DirectorySeparatorChar);
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
498return NormalizePath(Path.Combine(paths));
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
FrameworkLocationHelper.cs (31)
410? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
420? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
430? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
440? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
450? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
460? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
470? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
480? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
557Path.DirectorySeparatorChar.ToString(),
561Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
566s_pathToV35ToolsInFallbackDotNetFrameworkSdk += Path.DirectorySeparatorChar;
606s_pathToV4ToolsInFallbackDotNetFrameworkSdk = Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin", "NetFX 4.0 Tools");
781var frameworkPath = Path.Combine(NativeMethodsShared.FrameworkBasePath, prefix ?? string.Empty);
791return Path.Combine(complusInstallRoot, complusVersion);
796string leaf = Path.GetFileName(currentRuntimePath);
804string baseLocation = Path.GetDirectoryName(currentRuntimePath);
924combinedPath = Path.GetFullPath(combinedPath);
932? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
933: Path.Combine(NativeMethodsShared.FrameworkBasePath, "xbuild-frameworks");
935return Path.GetFullPath(combinedPath);
983string path = Path.Combine(targetFrameworkRootPath, frameworkName.Identifier, "v" + frameworkName.Version.ToString());
986path = Path.Combine(path, "Profile", frameworkName.Profile);
989return Path.GetFullPath(path);
1013var endedWithASlash = path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)
1015Path.AltDirectorySeparatorChar.ToString(),
1034fixedPath += Path.DirectorySeparatorChar;
1092string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1390Path.GetDirectoryName(typeof(object).Module.FullyQualifiedName),
1402(!File.Exists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) &&
1403!File.Exists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1435frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
ToolLocationHelper.cs (48)
658string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata");
839propsFileLocation = Path.Combine(sdkRoot, designTimeFolderName, commonConfigurationFolderName, neutralArchitectureName);
843propsFileLocation = Path.Combine(sdkRoot, designTimeFolderName, commonConfigurationFolderName, neutralArchitectureName, targetPlatformIdentifier, targetPlatformVersion);
1033winmdLocation = Path.Combine(sdkRoot, referencesFolderName, commonConfigurationFolderName, neutralArchitectureName);
1126string referencesRoot = Path.Combine(targetPlatformSdkRoot, referencesFolderName, targetPlatformSdkVersion);
1131string contractPath = Path.Combine(referencesRoot, contract.Name, contract.Version);
1218return Path.Combine(sdkLocation, folderName);
1231? Path.Combine(matchingSdk.Path, folderName, targetPlatformVersion)
1232: Path.Combine(matchingSdk.Path, folderName);
1430var folders = string.IsNullOrEmpty(subFolder) ? vsInstallFolders : vsInstallFolders.Select(i => Path.Combine(i, subFolder));
1495string fullPath = Path.Combine(root, file);
1760if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
1834if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll")))
1851if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
2251Path.DirectorySeparatorChar.ToString(),
2254dotNetFrameworkReferenceAssemblies[i] += Path.DirectorySeparatorChar;
2419string referenceAssemblyPath = Path.Combine(sdkRoot, contentFolderName, targetConfiguration, targetArchitecture);
2546string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml");
2621string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version);
2622string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2645string sdkFolderPath = Path.Combine(platformSDKDirectory, "ExtensionSDKs");
2740string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2818string sdkManifestFileLocation = Path.Combine(directoryName, "SDKManifest.xml");
2896string localAppdataFolder = Path.Combine(userLocalAppData, "Microsoft SDKs");
2903string defaultProgramFilesLocation = Path.Combine(
3021string platformsRoot = Path.Combine(sdk.Path, platformsFolderName);
3049string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml");
3087string path = Path.GetFullPath(targetFrameworkDirectory);
3108string redistListFolder = Path.Combine(path, "RedistList");
3109string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml");
3193pathToReturn = Path.Combine(pathToReturn, includeFramework);
3194pathToReturn = Path.GetFullPath(pathToReturn);
3342pathToSdk = Path.Combine(pathToSdk, "x64");
3345pathToSdk = Path.Combine(pathToSdk, "ia64");
3353string filePath = Path.Combine(pathToSdk, fileName);
3469pathToSdk = Path.Combine(pathToSdk, "bin");
3510pathToSdk = Path.Combine(pathToSdk, "x86");
3513pathToSdk = Path.Combine(pathToSdk, "x64");
3521string filePath = Path.Combine(pathToSdk, fileName);
3584toolPath = Path.Combine(toolPath, fileName);
3614return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
3622public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
3854string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3912string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3913frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion);
3914frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles");
3959string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
3966string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Microsoft.Build.Utilities.UnitTests (364)
ToolLocationHelper_Tests.cs (334)
70string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
78string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
79string referenceDirectory = Path.Combine(tempDirectory, Path.Combine("References", "Foo", "Bar"));
84File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
85File.WriteAllText(Path.Combine(referenceDirectory, "Two.winmd"), "Second");
86File.WriteAllText(Path.Combine(referenceDirectory, "Three.winmd"), "Third");
102string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
104string referenceDirectory = Path.Combine(tempDirectory, @"References", tempVersion, @"Foo\Bar");
109File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
137returnValue.ShouldBe(Path.Combine(sdkRootPath, @"DesignTime\CommonConfiguration\Neutral"));
163returnValue.ShouldBe(Path.Combine(sdkRootPath, "UnionMetadata"));
170string platformRootFolder = Path.Combine(Path.GetTempPath(), @"MockSDK");
171string sdkRootFolder = Path.Combine(platformRootFolder, @"Windows Kits\10");
172string platformFolder = Path.Combine(sdkRootFolder, @"Platforms\UAP\10.0.14944.0");
173string platformFilePath = Path.Combine(platformFolder, "Platform.xml");
174string sdkManifestFilePath = Path.Combine(sdkRootFolder, "SDKManifest.xml");
215returnValue.ShouldBe(Path.Combine(sdkRootFolder, "UnionMetadata", "10.0.14944.0"));
231string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
232string sdkDirectory = Path.Combine(tempDirectory, "Foo", "Bar");
256string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
257string sdkDirectory = Path.Combine(tempDirectory, "Foo", "1.0");
281string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
282string sdkDirectory = Path.Combine(tempDirectory, "Foo", "1.0");
287File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "");
307string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
308string sdkDirectory = Path.Combine(tempDirectory, "Foo", "1.0");
313File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "Garbaggggge");
335string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSFN40");
336string temp35Directory = Path.Combine(tempDirectory, "bin");
337string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
338string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
339string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
402string tempPath = Path.GetTempPath();
403string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootNoVersions");
404string nonVersionFolder = Path.Combine(testPath, ".UnknownFramework", "NotAVersion");
421string tempPath = Path.GetTempPath();
422string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootMultipleVersions");
423string folder10 = Path.Combine(testPath, ".UnknownFramework", "v1.0");
424string folder20 = Path.Combine(testPath, ".UnknownFramework", "v2.0");
425string folder40 = Path.Combine(testPath, ".UnknownFramework", "v4.0");
454string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSF40");
455string temp35Directory = Path.Combine(tempDirectory, "bin");
456string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
457string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
458string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
515Path.GetDirectoryName(typeof(object).GetTypeInfo().Module.FullyQualifiedName),
542path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86dbg"));
554Path.Combine("{runtime-base}", "v1.3.x86dbg"), // Simulate "Orcas" as the current runtime.}
559path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
571Path.Combine("{runtime-base}", "v1.1.x86dbg"), // Simulate "Everett" as the current runtime.
577path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
589Path.Combine(@"{runtime-base}", "v1.1"), // Simulate "everett" as the current runtime
606string tempPath = Path.GetTempPath();
607string fakeWhidbeyPath = Path.Combine(tempPath, "v2.0.50224");
608string fakeEverettPath = Path.Combine(tempPath, "v1.1.43225");
695string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, MSBuildExeName);
718string tv12path = Path.Combine(Path.GetFullPath(toolsPath32.EvaluatedValue), "msbuild.exe");
919string pathToSdk35InstallRoot = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
920string pathToSdkV4InstallRootOnVS10 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
921string pathToSdkV4InstallRootOnVS11 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.0A\");
925if (!Directory.Exists(Path.Combine(pathToSdkV4InstallRootOnVS11, "bin")))
931string pathToSdkV4InstallRootOnVS12 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.1A\");
939string pathToSdkV4InstallRootOnVS14 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v10.0A\");
1276string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1277expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1278expectedPath = Path.Combine(expectedPath, "Profile");
1279expectedPath = Path.Combine(expectedPath, targetFrameworkProfile);
1294string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1295expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1315string targetFrameworkProfile = "PocketPC" + new string(Path.GetInvalidFileNameChars());
1334string targetFrameworkIdentifier = "Compact Framework" + new string(Path.GetInvalidFileNameChars());
1396string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsChain");
1398string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1399string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1400string redist40Directory = Path.Combine(tempDirectory, "v4.0", "RedistList") + Path.DirectorySeparatorChar;
1401string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1409string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1411string expectedChainedPath = Path.Combine(tempDirectory, "v4.0");
1438string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1440string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1441string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1446string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1468string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1470string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1471string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1476string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1498string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoFileList");
1500string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1501string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1506string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1527string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsBadFile");
1529string redist40Directory = Path.Combine(tempDirectory, "v4.0", "RedistList") + Path.DirectorySeparatorChar;
1530string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1536string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.0"));
1558string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPointsToInvalidInclude");
1560string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1561string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1562string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1588char[] invalidFileNameChars = Path.GetInvalidFileNameChars();
1594string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistInvalidPathChars");
1596string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1597string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1598string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1628string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPathTooLong");
1630string redist41Directory = Path.Combine(tempDirectory, "v4.1", "RedistList") + Path.DirectorySeparatorChar;
1631string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1632string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1671string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootGoodWithChain");
1673string framework41Directory = Path.Combine(tempDirectory, "MyFramework", "v4.1") + Path.DirectorySeparatorChar;
1674string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1675string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1677string framework40Directory = Path.Combine(tempDirectory, "MyFramework", "v4.0") + Path.DirectorySeparatorChar;
1678string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1679string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1681string framework39Directory = Path.Combine(tempDirectory, "MyFramework", "v3.9") + Path.DirectorySeparatorChar;
1682string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1683string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1736string tempDirectory = Path.Combine(Path.GetTempPath(), "DisplayNameGeneration");
1738string framework40Directory = Path.Combine(tempDirectory, "MyFramework", "v4.0")
1739+ Path.DirectorySeparatorChar;
1740string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1741string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1744Path.Combine(tempDirectory, "MyFramework", "v3.9", "Profile", "Client");
1745string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1746string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1793string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootCircularReference");
1795string framework41Directory = Path.Combine(tempDirectory, "MyFramework", "v4.1")
1796+ Path.DirectorySeparatorChar;
1797string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1798string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1800string framework40Directory = Path.Combine(tempDirectory, "MyFramework", "v4.0")
1801+ Path.DirectorySeparatorChar;
1802string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1803string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1975string combinedPath = Path.Combine(programFiles32, pathToCombineWith);
1976string fullPath = Path.GetFullPath(combinedPath);
2507string rootDir = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2536string customFrameworkRootPath = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2559string rootDir = Path.Combine(env.CreateFolder().Path, "framework-root");
2560string fallbackPath = Path.Combine(env.CreateFolder().Path, "framework-root");
2590string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2603string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2620string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2637string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2652string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2669string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2690stdLibPaths[0].ShouldBe(Path.Combine(customFrameworkDir, frameworkName, frameworkVersionWithV) + Path.DirectorySeparatorChar, stdLibPaths[0]);
2726string redistPath = Path.Combine(rootDir, frameworkName, frameworkVersion, "RedistList");
2727string asmPath = Path.Combine(rootDir, frameworkName, frameworkVersion);
2732File.WriteAllText(Path.Combine(redistPath, "FrameworkList.xml"), string.Format(frameworkListXml, frameworkName));
2733File.WriteAllText(Path.Combine(asmPath, "mscorlib.dll"), string.Empty);
3004sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3006sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3034Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0")
3035+ Path.DirectorySeparatorChar;
3130string tmpRootDirectory = Path.GetTempPath();
3134string frameworkPath = Path.Combine(tmpRootDirectory, frameworkPathPattern);
3135string manifestFile = Path.Combine(frameworkPath, "SDKManifest.xml");
3137string frameworkPath2 = Path.Combine(tmpRootDirectory, frameworkPathPattern2);
3138string manifestFile2 = Path.Combine(frameworkPath, "SDKManifest.xml");
3281string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3287string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3416string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3422string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3546string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations");
3547string platformDirectory = Path.Combine(testDirectoryRoot, "MyPlatform", "8.0")
3548+ Path.DirectorySeparatorChar;
3549string sdkDirectory = Path.Combine(platformDirectory, "ExtensionSDKs", "SDkWithManifest", "2.0")
3550+ Path.DirectorySeparatorChar;
3578File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), "HI");
3579File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3580string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3615string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations2");
3616string platformDirectory = Path.Combine(testDirectoryRoot, "MyPlatform", "8.0")
3617+ Path.DirectorySeparatorChar;
3618string sdkDirectory = Path.Combine(platformDirectory, "ExtensionSDKs", "SDkWithManifest", "2.0")
3619+ Path.DirectorySeparatorChar;
3650File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), platformSDKManifestContents);
3651File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3652string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3795targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3796targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3798targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=2.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3802targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3804targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=3.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3806targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=4.0"].ShouldBe(Path.Combine(_fakeStructureRoot2, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "4.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3816targetPlatforms[key].ExtensionSDKs["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3820targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3822targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3826targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3828targetPlatforms[key].ExtensionSDKs["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3831targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3835targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "8.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3839targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3844targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "9.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
3848targetPlatforms[key].Platforms["PlatformAssembly, Version=0.1.2.3"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "0.1.2.3") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4064targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4067targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "Windows", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4070targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4073targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "2.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4076targetPlatforms[key].Path.ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase);
4110string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyFindRootFolderWhereAllFilesExist");
4111string[] rootDirectories = new string[] { Path.Combine(testDirectoryRoot, "Root1"), Path.Combine(testDirectoryRoot, "Root2") };
4116string subdir = Path.Combine(rootDirectories[i], "Subdir");
4119File.Create(Path.Combine(rootDirectories[i], "file1.txt")).Close();
4120File.Create(Path.Combine(subdir, fileInSubDir)).Close();
4422string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory");
4427Path.Combine(tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0"));
4429Path.Combine(tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0"));
4431Path.Combine(tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0"));
4433Path.Combine(tempPath, "SomeOtherPlace", "MyPlatformOtherLocation", "4.0", "ExtensionSDKs", "MyAssembly", "1.0"));
4434Directory.CreateDirectory(Path.Combine(tempPath, "WindowsKits", "6.0"));
4435Directory.CreateDirectory(Path.Combine(tempPath, "MyPlatform", "5.0"));
4437Path.Combine(tempPath, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0"));
4439Path.Combine(tempPath, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0"));
4441Path.Combine(tempPath, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0"));
4442Directory.CreateDirectory(Path.Combine(tempPath, "MyPlatform", "1.0"));
4443Directory.CreateDirectory(Path.Combine(tempPath, "MyPlatform", "8.0"));
4445Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "0.1.2.3"));
4447Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "1.2.3.0"));
4449Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "Sparkle", "3.3.3.3"));
4450Directory.CreateDirectory(Path.Combine(tempPath, "MyPlatform", "9.0"));
4452Path.Combine(tempPath, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "0.1.2.3"));
4453Directory.CreateDirectory(Path.Combine(tempPath, "MyPlatform", "9.0", "PlatformAssembly", "Sparkle"));
4455Path.Combine(tempPath, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "Sparkle"));
4458Path.Combine(tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0", "SDKManifest.xml"),
4461Path.Combine(tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0", "SDKManifest.xml"),
4464Path.Combine(tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "3.0", "SDKManifest.xml"),
4468Path.Combine(tempPath, "SomeOtherPlace", "MyPlatformOtherLocation", "4.0", "SDKManifest.xml"),
4471Path.Combine(tempPath, "SomeOtherPlace", "MyPlatformOtherLocation", "4.0", "ExtensionSDKs", "MyAssembly", "1.0", "SDKManifest.xml"),
4473File.WriteAllText(Path.Combine(tempPath, "Windows", "1.0", "SDKManifest.xml"), manifestPlatformSDK1);
4474File.WriteAllText(Path.Combine(tempPath, "Windows", "2.0", "SDKManifest.xml"), manifestPlatformSDK2);
4476Path.Combine(tempPath, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0", "SDKManifest.xml"),
4478File.WriteAllText(Path.Combine(tempPath, "MyPlatform", "3.0", "SDKManifest.xml"), manifestPlatformSDK3);
4479File.WriteAllText(Path.Combine(tempPath, "MyPlatform", "2.0", "SDKManifest.xml"), manifestPlatformSDK4);
4481Path.Combine(tempPath, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0", "SDKManifest.xml"),
4484Path.Combine(tempPath, "MyPlatform", "2.0", "ExtensionSDKs", "MyAssembly", "1.0", "SDKManifest.xml"),
4486File.WriteAllText(Path.Combine(tempPath, "MyPlatform", "1.0", "SDKManifest.xml"), manifestPlatformSDK5);
4490Path.Combine(tempPath, "MyPlatform", "8.0", "SDKManifest.xml"),
4493Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "0.1.2.3", "Platform.xml"),
4496Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "PlatformAssembly", "1.2.3.0", "Platform.xml"),
4499Path.Combine(tempPath, "MyPlatform", "8.0", "Platforms", "Sparkle", "3.3.3.3", "Platform.xml"),
4503File.WriteAllText(Path.Combine(tempPath, "MyPlatform", "9.0", "SDKManifest.xml"), manifestPlatformSDK7);
4505Path.Combine(tempPath, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "0.1.2.3", "Platform.xml"),
4508Path.Combine(tempPath, "MyPlatform", "9.0", "PlatformAssembly", "Sparkle", "Platform.xml"),
4511Path.Combine(tempPath, "MyPlatform", "9.0", "Platforms", "PlatformAssembly", "Sparkle", "Platform.xml"),
4514Path.Combine(tempPath, "MyPlatform", "9.0", "Platforms", "Sparkle", "3.3.3.3")); // no platform.xml
4518Path.Combine(tempPath, "Windows", "v1.0", "ExtensionSDKs", "AnotherAssembly", "v1.1"));
4521Directory.CreateDirectory(Path.Combine(tempPath, "Windows", "v3.0") + Path.DirectorySeparatorChar);
4525Path.Combine(tempPath, "Windows", "NotAVersion") + Path.DirectorySeparatorChar);
4529Path.Combine(tempPath, "Windows", "NotAVersion", "ExtensionSDKs", "Assembly", "1.0"));
4545string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory2");
4550Path.Combine(tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0"));
4552Path.Combine(tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0"));
4554Path.Combine(tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "4.0"));
4557Path.Combine(tempPath, "Windows", "v1.0", "ExtensionSDKs", "MyAssembly", "1.0", "SDKManifest.xml"),
4560Path.Combine(tempPath, "Windows", "1.0", "ExtensionSDKs", "MyAssembly", "2.0", "SDKManifest.xml"),
4563Path.Combine(tempPath, "Windows", "2.0", "ExtensionSDKs", "MyAssembly", "4.0", "SDKManifest.xml"),
Microsoft.Cci.Extensions (9)
Microsoft.CodeAnalysis (76)
Microsoft.CodeAnalysis.Analyzers (17)
Microsoft.CodeAnalysis.AnalyzerUtilities (7)
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
Microsoft.CodeAnalysis.CodeStyle (20)
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.Contracts.Package (1)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (27)
src\Analyzers\CSharp\Tests\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceTests.cs (27)
35=> Path.Combine(Directory, Path.Combine(folders));
39var filePath = Path.Combine(directory ?? Directory, fileName);
421(Path.Combine(folder, "ABClass1.cs"), code1),
422(Path.Combine(folder, "ABClass2.cs"), code2),
435var folder = Path.Combine("B", "C");
577(Path.Combine(folder, "Class1.cs"), code1),
583(Path.Combine(folder, "Class1.cs"), fixed1),
692(Path.Combine(folder, "Class1.cs"), code1),
698(Path.Combine(folder, "Class1.cs"), fixed1),
802(Path.Combine(folder1, "Class1.cs"), code1),
803(Path.Combine(folder2, "Class2.cs"), code2),
804(Path.Combine(folder3, "Class3.cs"), code3),
809(Path.Combine(folder1, "Class1.cs"), fixed1),
810(Path.Combine(folder2, "Class2.cs"), fixed2),
811(Path.Combine(folder3, "Class3.cs"), fixed3),
913var project2folder = Path.Combine(project2Directory, "A", "B", "C");
953(Path.Combine(folder1, "Class1.cs"), code1),
954(Path.Combine(folder2, "Class2.cs"), code2),
955(Path.Combine(folder3, "Class3.cs"), code3),
962Sources = { (Path.Combine(project2folder, "P.cs"), project2Source) },
963AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
971(Path.Combine(folder1, "Class1.cs"), fixed1),
972(Path.Combine(folder2, "Class2.cs"), fixed2),
973(Path.Combine(folder3, "Class3.cs"), fixed3),
980Sources = { (Path.Combine(project2folder, "P.cs"), project2FixedSource) },
981AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (277)
CommandLineTests.cs (239)
63var cscDllPath = Path.Combine(
64Path.GetDirectoryName(typeof(CommandLineTests).GetTypeInfo().Assembly.Location),
65Path.Combine("dependency", "csc.dll"));
69var netStandardDllDir = Path.GetDirectoryName(netStandardDllPath);
72var runtimeConfigPath = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "runtimeconfig.json");
76s_CSharpScriptExecutable = s_CSharpCompilerExecutable.Replace("csc.dll", Path.Combine("csi", "csi.dll"));
153string exePath = Path.Combine(dir.Path, "temp.exe");
173var xmlPath = Path.Combine(dir.Path, docName);
409var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path);
411Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
429var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path);
431Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
461AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path));
478Func<string, string> prependBasePath = fileName => Path.Combine(basePath, fileName);
490{ Path.Combine(dirSubDir.Path, @"b.rsp"), @"
498{ Path.Combine(Path.GetPathRoot(basePath), @"d.rsp"), @"
1546Diagnostic(ErrorCode.ERR_OpenResponseFile).WithArguments(Path.Combine(WorkingDirectory, @"roslyn_test_non_existing_file")));
2009Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2022Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2029Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2096Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2097Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2102Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2109Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2113Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2148Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath);
2212Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2216Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2220Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink);
2254var peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe"));
2286var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2315var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2334new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2340new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2346new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2352new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2358new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2364new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2478using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe"))))
2485MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))))
2513symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")));
2543var name = Path.GetFileName(file);
2884Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah"), "File not found."));
2885Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah"), actual: parsedArgs.RuleSetPath);
2889Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah;blah.ruleset"), "File not found."));
2890Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual: parsedArgs.RuleSetPath);
3592" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3593" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3615" + Path.Combine(dir.Path, @"a.cs") + @"(8,13): error CS0103: The name 'Goo' does not exist in the current context
3619" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3620" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3627" + Path.Combine(dir.Path, @"a.cs") + @"(32,13): error CS0103: The name 'Goo' does not exist in the current context
3795Assert.Equal(Path.Combine(baseDirectory, "MyBinary.dll"), parsedArgs.GetOutputFilePath(parsedArgs.OutputFileName));
4106Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.DocumentationPath);
4210Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.ErrorLogOptions.Path);
4331var srcDirectory = Path.GetDirectoryName(srcFile.Path);
4364var srcDirectory = Path.GetDirectoryName(srcFile.Path);
4365string root = Path.GetPathRoot(srcDirectory); // Make sure we pick a drive that exists and is plugged in to avoid 'Drive not ready'
4501using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, "aa.exe"))))
5657Assert.Equal(Path.Combine(WorkingDirectory, "test.snk"), parsedArgs.CompilationOptions.CryptoKeyFile);
5907var baseDir = Path.GetDirectoryName(source);
5944var baseDir = Path.GetDirectoryName(source2);
5964var baseDir = Path.GetDirectoryName(source2);
5975Assert.Equal("error CS7041: Each linked resource and module must have a unique filename. Filename '" + Path.GetFileName(modfile) + "' is specified more than once in this assembly", outWriter.ToString().Trim());
6057var assemblyName = AssemblyName.GetAssemblyName(Path.Combine(tempDir, name));
6493baseDirectory: Path.DirectorySeparatorChar == '\\' ? @"c:\" : "/");
7090using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, expectedOutputName))))
7808Path.GetFileName(sourceFile.Path),
7818string.Format("/win32manifest:{0}", Path.GetFileName(manifestFile.Path)),
7819Path.GetFileName(sourceFile.Path),
7828IntPtr lib = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 0x00000002);
8016outWriter.ToString().Replace(Path.GetFileName(src.Path), "{FILE}").Trim());
8263Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")));
8396var baseDir = Path.GetDirectoryName(source);
8397var fileName = Path.GetFileName(source);
8455CleanupAllGeneratedFiles(Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(source)), Path.GetFileName(source)));
8533var baseDir = Path.GetDirectoryName(source);
8534var fileName = Path.GetFileName(source);
8539Assert.Equal(Path.GetFileName(source) + "(7,17): warning CS1634: Expected 'disable' or 'restore'", outWriter.ToString().Trim());
8547exitCode = CreateCSharpCompiler(null, baseDir, new[] { "/nologo", "/preferreduilang:en", Path.Combine(baseDir, "nonexistent.cs"), source.ToString() }).Run(outWriter);
8549Assert.Equal("error CS2001: Source file '" + Path.Combine(baseDir, "nonexistent.cs") + "' could not be found.", outWriter.ToString().Trim());
8572var baseDir = Path.GetDirectoryName(source);
8573var fileName = Path.GetFileName(source);
8596var baseDir = Path.GetDirectoryName(source);
8597var fileName = Path.GetFileName(source);
8630var baseDir = Path.GetDirectoryName(source);
8631var fileName = Path.GetFileName(source);
8650var baseDir = Path.GetDirectoryName(source);
8651var fileName = Path.GetFileName(source);
8675var baseDir = Path.GetDirectoryName(source);
8676var fileName = Path.GetFileName(source);
8702var baseDir = Path.GetDirectoryName(source);
8703var fileName = Path.GetFileName(source);
8710System.IO.File.Delete(System.IO.Path.Combine(baseDir, "goo.dll"));
8859AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
8916AssertEx.Equal(new[] { "Lib.cs", "Lib.dll", "Lib.pdb" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
8957AssertEx.Equal(new[] { "Lib.cs", "Lib.dll" }, Directory.GetFiles(dir.Path).Select(p => Path.GetFileName(p)).Order());
8991var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9013var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9014var pdbPath = Path.ChangeExtension(exePath, "pdb");
9036var xmlPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.xml");
9060var sourceLinkPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.json");
9088string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9113string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9114string pdbPath = Path.ChangeExtension(exePath, ".pdb");
9139string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9242string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9438var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9496var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9529var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9569workingDirectory: Path.GetDirectoryName(srcFile.Path),
9589var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9614var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9636var srcDirectory = Path.GetDirectoryName(srcFile.Path);
9664var expectedPath = Path.GetDirectoryName(WorkingDirectory);
9885Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path);
9890Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9891Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9896Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9897Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path);
9901Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path);
9911Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path);
9912Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path);
9913Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path);
9918Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9919Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9924Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9925Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9930Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9931Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9936Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path);
9941Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path);
9957Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths.Single());
9962Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9963Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
9968Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9969Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[1]);
9973Assert.Equal(Path.Combine(WorkingDirectory, "..\\.editorconfig"), args.AnalyzerConfigPaths.Single());
9978Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9979Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
10059string fileName = Path.GetFileName(filePath);
11379Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")));
11394using (var reader = new StreamReader(Path.Combine(dir.ToString(), "doc.xml")))
11400output = ProcessUtilities.RunAndGetOutput(Path.Combine(dir.ToString(), "out.exe"), startFolder: dir.ToString());
11417Assert.Equal(Path.Combine(baseDirectory, @"a.pdb"), args.PdbPath);
11450AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11454AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path));
11458AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path));
11462AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11466AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11470AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11475AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11480AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11485AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
11604var dir = Path.Combine(WorkingDirectory, "a");
11607Assert.Equal(Path.Combine(dir, @"data.pdb"), parsedArgs.PdbPath);
11630var exePath = Path.Combine(dir.Path, "a.exe");
11642var pdbPath = Path.Combine(dir.Path, "a.pdb");
11649var pdbPath = Path.Combine(dir.Path, "a.pdb");
11656var pdbPath = Path.Combine(dir.Path, "a.pdb");
11664var pdbPath = Path.Combine(dir.Path, @"pdb\a.pdb");
11671var pdbPath = Path.Combine(dir.Path, "a.pdb");
11678var pdbPath = Path.Combine(dir.Path, "a.pdb");
11685var pdbPath = Path.Combine(dir.Path, "a.pdb");
11748dir.CopyFile(Path.ChangeExtension(s_CSharpCompilerExecutable, ".exe.config"), "csc32.exe.config");
11749dir.CopyFile(Path.Combine(Path.GetDirectoryName(s_CSharpCompilerExecutable), "csc.rsp"));
11810var exe = Path.Combine(dir.Path, "a.exe");
11819var doc = Path.Combine(dir.Path, "doc.xml");
11843var refDll = Path.Combine(refDir.Path, "a.dll");
11874var dll = Path.Combine(dir.Path, "a.dll");
11877var refDll = Path.Combine(dir.Path, Path.Combine("ref", "a.dll"));
11926var refDll = Path.Combine(dir.Path, "a.dll");
11937var pdb = Path.Combine(dir.Path, "a.pdb");
11940var doc = Path.Combine(dir.Path, "doc.xml");
12240var cscDir = Path.GetDirectoryName(s_CSharpCompilerExecutable);
12245var fileName = Path.GetFileName(filePath);
12257var cscCopy = Path.Combine(dir.Path, "csc.exe");
12301var exePath = Path.Combine(dir.Path, "a.exe");
13488string binaryPath = Path.Combine(dir.Path, "temp.dll");
13491string pdbPath = Path.Combine(dir.Path, pdbName);
13494string xmlDocFilePath = Path.Combine(dir.Path, docName);
13534string binaryPath = Path.Combine(dir.Path, "temp.dll");
13537string pdbPath = Path.Combine(dir.Path, pdbName);
13540string xmlDocFilePath = Path.Combine(dir.Path, docName);
13584string binaryPath = Path.Combine(dir.Path, "temp.dll");
13587string pdbPath = Path.Combine(dir.Path, pdbName);
13590string xmlDocFilePath = Path.Combine(dir.Path, docName);
13615string binaryPath = Path.Combine(dir.Path, "temp.dll");
13933ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, $"generatedSource.cs"), generatedSource } }, dir, true);
13974ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, "generatedSource.cs"), generatedSource } }, dir, true);
14017{ Path.Combine(dir.Path, generator1Prefix, source1Name), source1},
14018{ Path.Combine(dir.Path, generator2Prefix, source2Name), source2},
14033var genPath1 = Path.Combine(dir.Path, "Microsoft.CodeAnalysis.Test.Utilities", "Roslyn.Test.Utilities.TestGenerators.TestSourceGenerator", "hint1.cs");
14034var genPath2 = Path.Combine(dir.Path, "Microsoft.CodeAnalysis.Test.Utilities", "Roslyn.Test.Utilities.TestGenerators.TestSourceGenerator", "hint2.cs");
14053using (Stream peStream = File.OpenRead(Path.Combine(dir.Path, "checksum.exe")), pdbStream = File.OpenRead(Path.Combine(dir.Path, "checksum.pdb")))
14101{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { expectedFileName, generatedSource } } }
14125ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource1 } } } });
14132ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource2 } } } });
14195var generatedPath = Path.Combine(subdir, generatedFileName);
14203{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { generatedFileName, generatedSource } } }
14234var path = Path.Combine(dir.Path, Guid.NewGuid().ToString() + ".dll");
14238options: TestOptions.DebugDll.WithCryptoKeyFile(Path.GetFileName(snk.Path)).WithStrongNameProvider(virtualSnProvider),
14256{ Path.Combine(generatedDir.Path, "generator", "TestGenerator"), new() { { "generatedSource.cs", "//from version 2.0.0.0" } } }
14290var generatedDirPath = Path.Combine(dir.Path, "noexist");
14318ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource } } } });
14329string baseDirectory = Path.Combine(root, "abc", "def");
14345Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14349Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14353Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14357Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14359var absPath = Path.Combine(root, "outdir");
14368absPath = Path.Combine(root, "generated files");
14412string[] writtenText = File.ReadAllLines(Path.Combine(dir.Path, "touched.write"));
15407var generatorPath = Path.Combine(directory.Path, "generator.dll");
15443Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath1)));
15444Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath2)));
15450string path2 = additionalFile2?.Path ?? Path.Combine(srcDirectory.Path, additionalFilePath2);
SarifErrorLoggerTests.cs (10)
43var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
74var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
108var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
140var errorLogFile = Path.Combine(outputDir.Path, "ErrorLog.txt");
141var outputFilePath = Path.Combine(outputDir.Path, "test.dll");
177var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
212var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
247var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
282var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
315var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
TouchedFileLoggingTests.cs (9)
40var touchedBase = Path.Combine(touchedDir.Path, "touched");
49Path.ChangeExtension(hello, "exe"),
68var touchedBase = Path.Combine(touchedDir.Path, "touched");
94Path.ChangeExtension(hello, "exe"),
115var touchedBase = Path.Combine(touchedDir.Path, "touched");
127Path.ChangeExtension(hello, "exe"),
154var touchedBase = Path.Combine(touchedDir.Path, "touched");
169Path.ChangeExtension(sourcePath, "dll"),
191</doc>", Path.GetFileNameWithoutExtension(sourcePath)).Trim(),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (78)
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (42)
38var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
39var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
40var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
50File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
76var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
77var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
78var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
88File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
116path = Path.Combine(path, "packs", "installed", "here");
118var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
119var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
120var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
130File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
173var dllFilePath = Path.Combine(path, "implementation.dll");
174var sourceCodePath = Path.Combine(path, "implementation.cs");
175var pdbFilePath = Path.Combine(path, "implementation.pdb");
181var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
226var dllFilePath = Path.Combine(path, "implementation.dll");
227var sourceCodePath = Path.Combine(path, "implementation.cs");
228var pdbFilePath = Path.Combine(path, "implementation.pdb");
241var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
287var dllFilePath = Path.Combine(path, "implementation.dll");
288var sourceCodePath = Path.Combine(path, "implementation.cs");
289var pdbFilePath = Path.Combine(path, "implementation.pdb");
302var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
342var dllFilePath = Path.Combine(path, "implementation.dll");
343var sourceCodePath = Path.Combine(path, "implementation.cs");
344var pdbFilePath = Path.Combine(path, "implementation.pdb");
357var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
393var dllFilePath = Path.Combine(path, "implementation.dll");
394var sourceCodePath = Path.Combine(path, "implementation.cs");
395var pdbFilePath = Path.Combine(path, "implementation.pdb");
408var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
458var dllFilePath = Path.Combine(path, "implementation.dll");
459var sourceCodePath = Path.Combine(path, "implementation.cs");
460var pdbFilePath = Path.Combine(path, "implementation.pdb");
473var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
516var dllFilePath = Path.Combine(path, "implementation.dll");
517var sourceCodePath = Path.Combine(path, "implementation.cs");
518var pdbFilePath = Path.Combine(path, "implementation.pdb");
531var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
539var realImplementationDllFilePath = Path.Combine(path, "realimplementation.dll");
PdbSourceDocument\PdbSourceDocumentTests.cs (24)
405Directory.CreateDirectory(Path.Combine(path, "ref"));
406Directory.CreateDirectory(Path.Combine(path, "lib"));
410var (project, symbol) = await CompileAndFindSymbolAsync(Path.Combine(path, "ref"), Location.Embedded, Location.OnDisk, sourceText, c => c.GetMember("C.E"), buildReferenceAssembly: true);
413CompileTestSource(Path.Combine(path, "lib"), sourceText, project, Location.Embedded, Location.Embedded, buildReferenceAssembly: false, windowsPdb: false);
434var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
435var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
436var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
446File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
471var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
472var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
473var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
490File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
518var packDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "ref", "net6.0")).FullName;
519var dataDir = Directory.CreateDirectory(Path.Combine(path, "packs", "MyPack.Ref", "1.0", "data")).FullName;
520var sharedDir = Directory.CreateDirectory(Path.Combine(path, "shared", "MyPack", "1.0")).FullName;
534var implementationDllFilePath = Path.Combine(sharedDir, "implementation.dll");
535var sourceCodePath = Path.Combine(sharedDir, "implementation.cs");
536var pdbFilePath = Path.Combine(sharedDir, "implementation.pdb");
542var typeForwardDllFilePath = Path.Combine(sharedDir, "reference.dll");
543sourceCodePath = Path.Combine(sharedDir, "reference.cs");
544pdbFilePath = Path.Combine(sharedDir, "reference.pdb");
552File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
941CompileTestSource(dllFilePath, [Path.Combine(path, "source1.cs"), Path.Combine(path, "source2.cs")], pdbFilePath, "reference", [sourceText1, sourceText2], project, Location.Embedded, Location.Embedded, buildReferenceAssembly: false, windowsPdb: false);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (35)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (5)
45AddDocument("test.cs", SourceText.From(source, Encoding.UTF8), filePath: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
465AddDocument("test.cs", root, filePath: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
666var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
712var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
739var filePath = Path.Combine(TempRoot.Root, "src.cs");
src\Analyzers\CSharp\Tests\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceTests.cs (27)
35=> Path.Combine(Directory, Path.Combine(folders));
39var filePath = Path.Combine(directory ?? Directory, fileName);
421(Path.Combine(folder, "ABClass1.cs"), code1),
422(Path.Combine(folder, "ABClass2.cs"), code2),
435var folder = Path.Combine("B", "C");
577(Path.Combine(folder, "Class1.cs"), code1),
583(Path.Combine(folder, "Class1.cs"), fixed1),
692(Path.Combine(folder, "Class1.cs"), code1),
698(Path.Combine(folder, "Class1.cs"), fixed1),
802(Path.Combine(folder1, "Class1.cs"), code1),
803(Path.Combine(folder2, "Class2.cs"), code2),
804(Path.Combine(folder3, "Class3.cs"), code3),
809(Path.Combine(folder1, "Class1.cs"), fixed1),
810(Path.Combine(folder2, "Class2.cs"), fixed2),
811(Path.Combine(folder3, "Class3.cs"), fixed3),
913var project2folder = Path.Combine(project2Directory, "A", "B", "C");
953(Path.Combine(folder1, "Class1.cs"), code1),
954(Path.Combine(folder2, "Class2.cs"), code2),
955(Path.Combine(folder3, "Class3.cs"), code3),
962Sources = { (Path.Combine(project2folder, "P.cs"), project2Source) },
963AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
971(Path.Combine(folder1, "Class1.cs"), fixed1),
972(Path.Combine(folder2, "Class2.cs"), fixed2),
973(Path.Combine(folder3, "Class3.cs"), fixed3),
980Sources = { (Path.Combine(project2folder, "P.cs"), project2FixedSource) },
981AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
SourceGeneration\GeneratorDriverTests.cs (5)
537Path.Combine(generator.GetType().Assembly.GetName().Name!, generator.GetType().FullName!, "source.cs"),
538Path.Combine(generator2.GetType().Assembly.GetName().Name!, generator2.GetType().FullName!, "source.cs")
3442context.AddSource(Path.GetFileName(text.Path), "");
4298""", Path.Combine(projectDir, "src", "Program.cs"));
4305driverOptions: new GeneratorDriverOptions(baseDirectory: Path.Combine(projectDir, "obj")));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (11)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (5)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (9)
Microsoft.CodeAnalysis.Features (66)
EditAndContinue\TraceLog.cs (6)
44path = Path.Combine(_logDirectory, _traceLog._name + ".log");
56var directory = Path.Combine(_logDirectory, sessionId.Ordinal.ToString(), relativePath);
74var directory = CreateSessionDirectory(updateId.SessionId, Path.Combine(document.Project.Name, relativeDir));
75return Path.Combine(directory, $"{fileName}.{updateId.Ordinal}.{generation?.ToString() ?? "-"}.{suffix}{extension}");
83path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName);
97path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (10)
29private static readonly string PathSeparatorString = Path.DirectorySeparatorChar.ToString();
44var pathParts = referencedDllPath.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
58var basePath = Path.GetDirectoryName(dllPath);
81dllPath = Path.Combine(basePath, $"{assemblyName}.dll");
132var pathToTry = Path.Combine(
156var frameworkXml = Path.Combine(referencedDllPath, "..", "..", "..", "data", "FrameworkList.xml");
180var basePath = Path.GetFullPath(Path.Combine(referencedDllPath, "..", "..", "..", "..", "..", ".."));
181var dllPath = Path.Combine(basePath, "shared", sdkName, packVersion, dllFileName);
Microsoft.CodeAnalysis.Features.Test.Utilities (9)
Microsoft.CodeAnalysis.Features.UnitTests (27)
EditAndContinue\CompileTimeSolutionProviderTests.cs (6)
30var projectFilePath = Path.Combine(TempRoot.Root, "a.csproj");
31var additionalFilePath = Path.Combine(TempRoot.Root, "a", $"X.{kind}");
32var designTimeFilePath = Path.Combine(TempRoot.Root, "a", $"X.{kind}.g.cs");
35var sourceGeneratedPathPrefix = Path.Combine(TempRoot.Root, typeof(TestSourceGenerator).Assembly.GetName().Name!, typeof(TestSourceGenerator).FullName);
44assemblyPath: Path.Combine(TempRoot.Root, "proj"),
114assemblyPath: Path.Combine(TempRoot.Root, "proj"),
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (15)
124AddDocument(CreateDesignTimeOnlyDocument(projectPId, name: "dt1.cs", path: Path.Combine(dir.Path, "dt1.cs"))).
397var designTimeOnlyFilePath = Path.Combine(dir.Path, designTimeOnlyFileName);
1549var pathA = Path.Combine(TempRoot.Root, "A.cs");
1550var pathB = Path.Combine(TempRoot.Root, "B.cs");
1551var pathC = Path.Combine(TempRoot.Root, "C.cs");
1552var pathD = Path.Combine(TempRoot.Root, "D.cs");
1553var pathX = Path.Combine(TempRoot.Root, "X");
1554var pathY = Path.Combine(TempRoot.Root, "Y");
1555var pathCommon = Path.Combine(TempRoot.Root, "Common.cs");
1627var pathX = Path.Combine(TempRoot.Root, "X.cs");
1628var pathA = Path.Combine(TempRoot.Root, "A.cs");
1796var pathA = Path.Combine(TempRoot.Root, "A.txt");
3066var generatedFilePath = Path.Combine(
3432AddDocument("DocB", source1, filePath: Path.Combine(TempRoot.Root, "DocB.cs")).Project;
3923var filePath = withPath ? Path.Combine(TempRoot.Root, "test.cs") : null;
Microsoft.CodeAnalysis.InteractiveHost (23)
Microsoft.CodeAnalysis.LanguageServer (37)
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (12)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (9)
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (3)
Microsoft.CodeAnalysis.Rebuild (2)
Microsoft.CodeAnalysis.Rebuild.UnitTests (15)
RebuildCommandLineTests.cs (15)
26internal static string OutputDirectory { get; } = Path.Combine(TestableCompiler.RootDirectory, "output");
38FilePathToStreamMap.Add(Path.Combine(BuildPaths.WorkingDirectory, filePath), new TestableFile(content));
43FilePathToStreamMap.Add(Path.Combine(BuildPaths.SdkDirectory!, filePath), new TestableFile(imageBytes));
50filePath = Path.Combine(OutputDirectory, filePath);
60PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "dll"),
65PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "netmodule"),
70PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "dll"),
79PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "exe"),
84PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "exe"),
89PeFileName = Path.ChangeExtension(commandInfo.PeFileName, "exe"),
116Path.GetFileName(peFilePath),
199AddSourceFile(Path.Combine("dir1", "lib1.cs"), @"
233Permutate(new CommandInfo($"lib4.cs {Path.Combine("dir1", "lib1.cs")} /target:library", "test.dll", null),
395AddSourceFile(Path.Combine("dir1", "lib1.vb"), @"
429new CommandInfo(@$"lib2.vb {Path.Combine("dir1", "lib1.vb")} /target:library /debug:embedded", "test.dll", null),
Microsoft.CodeAnalysis.Remote.ServiceHub (9)
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (3)
Microsoft.CodeAnalysis.Remote.Workspaces (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (10)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (10)
Microsoft.CodeAnalysis.Scripting (30)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (18)
87_baseDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
385string directory = Path.GetDirectoryName(fullPath);
410string shadowCopyPath = Path.Combine(assemblyCopyDir, Path.GetFileName(originalPath));
467originalDirectory = Path.GetDirectoryName(originalPath);
468shadowCopyDirectory = Path.GetDirectoryName(shadowCopyPath);
472originalPath: Path.Combine(originalDirectory, moduleName),
473shadowCopyPath: Path.Combine(shadowCopyDirectory, moduleName));
512string dir = Path.Combine(basePath, Guid.NewGuid().ToString());
545string assemblyDirectory = Path.GetDirectoryName(originalAssemblyPath);
546string assemblyFileName = Path.GetFileName(originalAssemblyPath);
560Directory.CreateDirectory(Path.Combine(assemblyCopyDirectory, xmlSubdirectory));
568string xmlCopyPath = Path.Combine(assemblyCopyDirectory, xmlSubdirectory, xmlFileName);
569string xmlOriginalPath = Path.Combine(assemblyDirectory, xmlSubdirectory, xmlFileName);
588docFileName = Path.ChangeExtension(assemblyFileName, ".xml");
593if (File.Exists(Path.Combine(assemblyDirectory, docSubdirectory, docFileName)))
603if (File.Exists(Path.Combine(assemblyDirectory, docFileName)))
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (8)
MetadataShadowCopyProviderTests.cs (7)
152AssertEx.SetEqual(new[] { "MultiModule.dll", "mod2.netmodule", "mod3.netmodule" }, scFiles.Select(p => Path.GetFileName(p)));
231Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"a.xml"), sc.DocumentationFile.FullPath);
237Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"el-GR", "a.xml"), sc.DocumentationFile.FullPath);
243Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"a.xml"), sc.DocumentationFile.FullPath);
Microsoft.CodeAnalysis.Scripting.TestUtilities (7)
Microsoft.CodeAnalysis.Test.Utilities (62)
TestableCompiler.cs (8)
51clientDir: Path.Combine(RootDirectory, "compiler"),
52workingDir: Path.Combine(RootDirectory, "source"),
53sdkDir: Path.Combine(RootDirectory, "sdk"),
78filePath = Path.Combine(BuildPaths.WorkingDirectory, filePath);
86filePath = Path.Combine(BuildPaths.SdkDirectory!, filePath);
94filePath = Path.Combine(BuildPaths.WorkingDirectory, filePath);
174args.Add($@"-vbruntime:""{Path.Combine(buildPaths.SdkDirectory, "Microsoft.VisualBasic.dll")}""");
217fileSystem.Map[Path.Combine(sdkPath, referenceInfo.FileName)] = new TestableFile(referenceInfo.ImageBytes);
Microsoft.CodeAnalysis.Threading.Package (1)
Microsoft.CodeAnalysis.UnitTests (34)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (170)
CommandLineTests.vb (154)
39Private Shared ReadOnly s_basicCompilerExecutable As String = Path.Combine(
40Path.GetDirectoryName(GetType(CommandLineTests).Assembly.Location),
41Path.Combine("dependency", "vbc.exe"))
246Dim exePath = Path.Combine(dir.Path, "temp.exe")
265Dim xmlPath = Path.Combine(dir.Path, docName)
651Dim sourceFile = Path.GetTempFileName()
692Dim sourceFile = Path.GetTempFileName()
719Dim assemblyName = System.Reflection.AssemblyName.GetAssemblyName(Path.Combine(tempDir, name))
764Path.Combine(_baseDirectory, "a.vb"),
765Path.Combine(_baseDirectory, "b.vb")
1013Dim baseDir = Path.GetDirectoryName(source)
1014Dim fileName = Path.GetFileName(source)
2882Diagnostic(ERRID.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah"), "File not found."))
2883Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah"), actual:=parsedArgs.RuleSetPath)
2887Diagnostic(ERRID.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah;blah.ruleset"), "File not found."))
2888Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual:=parsedArgs.RuleSetPath)
3151Assert.Equal(Path.Combine(_baseDirectory, "sl.json"), parsedArgs.SourceLink)
3155Assert.Equal(Path.Combine(_baseDirectory, "sl.json"), parsedArgs.SourceLink)
3159Assert.Equal(Path.Combine(_baseDirectory, "s l.json"), parsedArgs.SourceLink)
3196Dim peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe"))
3229Dim pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"))
3248{"a.vb", "b.vb", "c.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3254{"a.vb", "b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3260{"a.vb", "b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3266{"a.vb", "b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3272{"a,b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3278{"a,b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3284{"a.vb", "b.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3290{"a.txt", "a.vb", "b.vb", "c.vb"}.Select(Function(f) Path.Combine(_baseDirectory, f)),
3399Using peReader As New PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe")))
3406MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))))
3430symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")))
3646Dim pdbPath = Path.Combine(dir.Path, "a.pdb")
3656Dim exePath = Path.Combine(dir.Path, "a.exe")
3667Dim pePdbPath = Path.Combine(dir.Path, "a.pdb")
3692Dim pePdbPath = Path.Combine(dir.Path, "a.pdb")
3698Dim pdbPath = Path.Combine(dir.Path, "a.pdb")
3704Dim pdbPath = Path.Combine(dir.Path, "a.pdb")
4141Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")))
4267Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")))
4286Assert.True(File.Exists(Path.Combine(dir.ToString(), "MyXml.xml")))
4305Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")))
4324Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")))
4343Assert.True(File.Exists(Path.Combine(dir.ToString(), "out.xml")))
4362Assert.True(File.Exists(Path.Combine(dir.ToString(), "out.xml")))
4428Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4433Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4444Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4468Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.DocumentationPath)
4524Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4539Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4544Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4549Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath)
4588Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.ErrorLogOptions.Path)
4987AssertReferencePathsEqual(parsedArgs.ReferencePaths, Nothing, "c:\", "d:\x\y\z", Path.Combine(_baseDirectory, "abc"))
4991AssertReferencePathsEqual(parsedArgs.ReferencePaths, Nothing, "c:\Windows", Path.Combine(_baseDirectory, "abc\def"))
5153newVbCore.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "Microsoft.VisualBasic.dll")))
5244sysRuntime.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.Runtime.dll")))
5263msCorLib.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "mscorlib.dll")))
5266output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /nostdlib /sdkpath:" & dir.Path & " /t:library /vbruntime* /r:" & Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.dll") & " " & src.ToString(), startFolder:=dir.Path)
5272output = ProcessUtilities.RunAndGetOutput(s_basicCompilerExecutable, "/nologo /nostdlib /sdkpath:" & dir.Path & " /t:library /vbruntime* /r:" & Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.dll") & " " & src.ToString(), startFolder:=dir.Path)
5299" /t:library /r:" & Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "System.dll") &
5309msCorLib.WriteAllBytes(File.ReadAllBytes(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "mscorlib.dll")))
5377AssertReferencePathsEqual(parsedArgs.ReferencePaths, Nothing, Path.GetDirectoryName(file.ToString()), "c:\lib2")
6838Path.GetFileName(sourceFile.Path)
6846String.Format("/win32manifest:{0}", Path.GetFileName(manifestFile.Path)),
6847Path.GetFileName(sourceFile.Path)
6852Dim library As IntPtr = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 2)
7165Dim corlibDir = Path.GetDirectoryName(corlibLocation)
7166Dim systemLocation = Path.Combine(corlibDir, "System.dll")
7167Dim msvbLocation = Path.Combine(corlibDir, "Microsoft.VisualBasic.dll")
7231Dim corlibDir = Path.GetDirectoryName(corlibLocation)
7232Dim systemLocation = Path.Combine(corlibDir, "System.dll")
7233Dim msvbLocation = Path.Combine(corlibDir, "Microsoft.VisualBasic.dll")
7635" & Path.GetFullPath(Path.Combine(dir.Path, "..\b.vb")) & "(40) : error BC30451: 'Goo' is not declared. It may be inaccessible due to its protection level.
7638" & Path.GetFullPath(Path.Combine(dir.Path, "..\b.vb")) & "(50) : error BC30451: 'Goo' is not declared. It may be inaccessible due to its protection level.
7781Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles.Single().Path)
7786Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path)
7787Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path)
7792Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path)
7793Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(1).Path)
7797Assert.Equal(Path.Combine(_baseDirectory, "..\web.config"), args.AdditionalFiles.Single().Path)
7807Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles(0).Path)
7808Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles(1).Path)
7809Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles(2).Path)
7814Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path)
7815Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path)
7820Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path)
7821Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path)
7826Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path)
7831Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path)
7836Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path)
7837Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path)
7842Assert.Equal(Path.Combine(_baseDirectory, "web.config:app.manifest"), args.AdditionalFiles(0).Path)
7857Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths.Single())
7862Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0))
7863Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1))
7868Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0))
7869Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(1))
7873Assert.Equal(Path.Combine(_baseDirectory, "..\.editorconfig"), args.AnalyzerConfigPaths.Single())
7878Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0))
7879Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1))
7884Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0))
7885Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1))
7890Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig:.editorconfig"), args.AnalyzerConfigPaths(0))
8675Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")))
8695Using reader As New StreamReader(Path.Combine(dir.ToString(), "doc.xml"))
8700output = ProcessUtilities.RunAndGetOutput(Path.Combine(dir.ToString(), "out.exe"), startFolder:=dir.ToString())
9264Assert.Equal(Path.Combine(_baseDirectory, "test.snk"), parsedArgs.CompilationOptions.CryptoKeyFile)
9366Dim exe = Path.Combine(dir.Path, "a.exe")
9375Dim doc = Path.Combine(dir.Path, "doc.xml")
9401Dim refDll = Path.Combine(refDir.Path, "a.dll")
9437Dim vb = Path.Combine(dir.Path, "a.vb")
9439Dim dll = Path.Combine(dir.Path, "a.dll")
9442Dim refDll = Path.Combine(dir.Path, Path.Combine("ref", "a.dll"))
9484Dim refDll = Path.Combine(dir.Path, "a.dll")
9495Dim pdb = Path.Combine(dir.Path, "a.pdb")
9498Dim doc = Path.Combine(dir.Path, "doc.xml")
9572Assert.True(File.Exists(Path.Combine(dir.Path, expectedFile)), "Expected to find: " & expectedFile)
9573Assert.False(File.Exists(Path.Combine(dir.Path, unexpectedFile)), "Didn't expect to find: " & unexpectedFile)
9581Dim exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe")
9600Dim exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe")
9601Dim pdbPath = Path.ChangeExtension(exePath, "pdb")
9620Dim xmlPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.xml")
9641Dim sourceLinkPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.json")
9713Dim exePath = Path.Combine(dir.Path, "a.exe")
10016Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll")
10019Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb")
10022Dim docPath As String = Path.Combine(dir.Path, docName)
10068Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll")
10071Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb")
10074Dim docPath As String = Path.Combine(dir.Path, docName)
10125Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll")
10128Dim pdbPath As String = Path.Combine(dir.Path, "temp.pdb")
10131Dim docPath As String = Path.Combine(dir.Path, docName)
10162Dim binaryPath As String = Path.Combine(dir.Path, "temp.dll")
10589Dim generatedDirPath = Path.Combine(dir.Path, "noexist")
10622{{Path.Combine(generatedDir.Path, generatorPrefix), New Dictionary(Of String, String)() From
10650Dim baseDirectory As String = Path.Combine(root, "abc", "def")
10662Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory)
10666Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory)
10670Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory)
10674Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory)
10676Dim absPath = Path.Combine(root, "outdir")
10685absPath = Path.Combine(root, "generated files")
10923Dim generatorPath = Path.Combine(directory.Path, "generator.dll")
10940Dim name = Path.GetFileName(fileName)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (10)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
MockVisualBasicCompiler.vb (2)
28MyClass.New(responseFile, CreateBuildPaths(baseDirectory, Path.GetTempPath()), args, analyzer)
36MyClass.New(responseFile, CreateBuildPaths(workingDirectory, Path.GetTempPath()), args, analyzers, generators, additionalReferences)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (88)
Microsoft.CodeAnalysis.Workspaces.MSBuild (37)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (26)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (44)
NetCoreTests.cs (9)
42var dotNetExeName = "dotnet" + (Path.DirectorySeparatorChar == '/' ? "" : ".exe");
54var arguments = $@"msbuild ""{solutionOrProjectFileName}"" /t:restore /bl:{Path.Combine(SolutionDirectory.Path, "restore.binlog")}";
60var arguments = $@"msbuild ""{solutionOrProjectFileName}"" /bl:{Path.Combine(SolutionDirectory.Path, "build.binlog")}";
78var projectDir = Path.GetDirectoryName(projectFilePath);
85Assert.Equal(Path.Combine(projectDir, "bin", "Debug", "netcoreapp3.1", "Project.dll"), project.OutputFilePath);
86Assert.Equal(Path.Combine(projectDir, "obj", "Debug", "netcoreapp3.1", "Project.dll"), project.CompilationOutputInfo.AssemblyPath);
109var projectDir = Path.GetDirectoryName(projectFilePath);
117Assert.Equal(Path.Combine(projectDir, "bin", "Debug", "netcoreapp3.1", "Project.dll"), projectFileInfo.OutputFilePath);
553var depsJsonFile = Path.ChangeExtension(BuildHostProcessManager.GetNetCoreBuildHostPath(), "deps.json");
ProjectGuardFiles.cs (10)
19File.WriteAllText(Path.Combine(Path.GetTempPath(), "global.json"),
26File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.props"),
44File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.rsp"),
49File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.targets"),
58File.WriteAllText(Path.Combine(Path.GetTempPath(), "NuGet.Config"),
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Microsoft.CodeAnalysis.Workspaces.UnitTests (56)
SolutionTests\SolutionTests.cs (44)
46private static readonly string s_projectDir = Path.GetDirectoryName(typeof(SolutionTests).Assembly.Location)!;
57.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
58.AddDocument(DocumentId.CreateNewId(projectId), "goo.cs", SourceText.From("public class Goo { }", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "goo.cs"))
60.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId), "editorcfg", SourceText.From(editorConfig ?? "#empty", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))));
1089.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
1090.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, "proj2", "proj2", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj2.dll")))
1091.AddDocument(d1, "d1.cs", SourceText.From("class D1;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d1.cs"))
1092.AddDocument(d2, "d2.cs", SourceText.From("class D2;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d2.cs"))
1095.AddAnalyzerConfigDocument(c1, "c1", SourceText.From("#empty1", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))
1096.AddAnalyzerConfigDocument(c2, "c2", SourceText.From("#empty2", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"));
1106loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1107filePath: Path.Combine(s_projectDir, "newD1.cs"),
1115loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1116filePath: Path.Combine(s_projectDir, "newD3.cs"),
1125loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1126filePath: Path.Combine(s_projectDir, "newA1.txt"),
1134loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1135filePath: Path.Combine(s_projectDir, "newA3.txt"),
1144loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1145filePath: Path.Combine(s_projectDir, "newC1"),
1153loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1154filePath: Path.Combine(s_projectDir, "newC3"),
1161var generatedOutputDir = Path.Combine(TempRoot.Root, "obj");
1162var assemblyPath = Path.Combine(TempRoot.Root, "bin", "assemblyName.dll");
1298.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1333.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1368.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1403.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1481var objDir = Path.Combine(TempRoot.Root, "obj");
1482var binDir = Path.Combine(TempRoot.Root, "bin");
1483var otherDir = Path.Combine(TempRoot.Root, "other");
1492.WithOutputFilePath(Path.Combine(binDir, "output.dll"))
1494assemblyPath: Path.Combine(objDir, "output.dll"),
2309var solution4 = solution3.AddAnalyzerConfigDocument(editorConfigId, ".editorconfig", SourceText.From(editorConfigContent), filePath: Path.Combine(s_projectDir, "subfolder", ".editorconfig"));
2330var sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "x.cs"), CancellationToken.None);
2341sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "subfolder", "x.cs"), CancellationToken.None);
2390var filePath = Path.Combine(TempRoot.Root, "x.cs");
2421var filePath = Path.Combine(TempRoot.Root, "x.cs");
2449var filePath = Path.Combine(TempRoot.Root, "x.cs");
2478var filePath = Path.Combine(TempRoot.Root, "x.cs");
5531projectPath = string.IsNullOrEmpty(projectPath) ? projectPath : Path.Combine(TempRoot.Root, projectPath);
5532configPath = Path.Combine(TempRoot.Root, configPath);
5533sourcePath = string.IsNullOrEmpty(sourcePath) ? sourcePath : Path.Combine(TempRoot.Root, sourcePath);
5765.WithCompilationOutputInfo(new CompilationOutputInfo(assemblyPath: Path.Combine(TempRoot.Root, "assembly.dll"), generatedFilesOutputDirectory: null));
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.Data.Analysis.Tests (7)
Microsoft.DotNet.Arcade.Sdk (15)
Microsoft.DotNet.Arcade.Sdk.Tests (23)
Microsoft.DotNet.ArcadeLogging (1)
Microsoft.DotNet.AsmDiff (8)
Microsoft.DotNet.Build.Manifest.Tests (14)
Microsoft.DotNet.Build.Tasks.Feed (30)
src\PublishArtifactsInManifestBase.cs (17)
450string symbolPackageName = Path.GetFileName(symbolAsset.Id);
451string localSymbolPath = Path.Combine(temporarySymbolsDirectory, symbolPackageName);
510int result = await helper.AddPackagesToRequest(requestName, symbolPackages.Select(x => Path.Combine(BlobAssetsBasePath, x.Id)));
750FileInfo pdbStagingPath = new(Path.Combine(pdbStagePath, subPath));
774string extension = Path.GetExtension(looseFile);
777string relativePath = Path.GetRelativePath(pdbArtifactsBasePath, looseFile);
778FileInfo looseFileStagePath = new(Path.Combine(pdbStagePath, relativePath));
1180Path.Combine(PackageAssetsBasePath, $"{package.Id}.{package.Version}.nupkg");
1223Path.GetFullPath(Path.Combine(ArtifactsBasePath, Guid.NewGuid().ToString()));
1225string localPackagePath = Path.Combine(temporaryPackageDirectory, packageFilename);
1493Path.GetFullPath(Path.Combine(ArtifactsBasePath, Guid.NewGuid().ToString()));
1575var fileName = Path.GetFileName(targetBlobPath);
1576var localBlobPath = Path.Combine(temporaryBlobDirectory, fileName);
1655var fileName = Path.GetFileName(asset.Id);
1656var localBlobPath = Path.Combine(BlobAssetsBasePath, fileName);
Microsoft.DotNet.Build.Tasks.Feed.Tests (16)
Microsoft.DotNet.Build.Tasks.Installers (39)
src\BuildFPMToolPreReqs.cs (9)
67string changelogFile = Path.Combine(InputDir, "templates", "changelog");
95string copyrightFile = Path.Combine(InputDir, "templates", "copyright");
208parameters.Add(string.Concat("--rpm-changelog ", EscapeArg(Path.Combine(InputDir, "templates", "changelog")))); // Changelog File
213parameters.Add(string.Concat("-p ", Path.Combine(OutputDir, configJson.Package_Name + ".rpm")));
215if (configJson.After_Install_Source != null) parameters.Add(string.Concat("--after-install ", Path.Combine(InputDir, EscapeArg(configJson.After_Install_Source))));
216if (configJson.After_Remove_Source != null) parameters.Add(string.Concat("--after-remove ", Path.Combine(InputDir, EscapeArg(configJson.After_Remove_Source))));
223if (configJson.Install_Root != null) parameters.Add(string.Concat(Path.Combine(InputDir, "package_root/="), configJson.Install_Root)); // Package Files
224if (configJson.Install_Man != null) parameters.Add(string.Concat(Path.Combine(InputDir, "docs", "host/="), configJson.Install_Man)); // Man Pages
225if (configJson.Install_Doc != null) parameters.Add(string.Concat(Path.Combine(InputDir, "templates", "copyright="), configJson.Install_Doc)); // CopyRight File
src\CreateWixCommandPackageDropBase.cs (17)
67OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
81string commandFilename = Path.Combine(packageDropOutputFolder, $"create.cmd");
97commandString.Append($" -out %outputfolder%{Path.GetFileName(InstallerFile)}");
106commandString.Append($" -loc {Path.GetFileName(locItem.ItemSpec)}");
120commandString.Append($" {Path.GetFileName(wixSrcFile.ItemSpec)}");
144string newWixSrcFilePath = Path.Combine(packageDropOutputFolder, Path.GetFileName(wixSrcFile.ItemSpec));
147string wixSrcFileExtension = Path.GetExtension(wixSrcFile.ItemSpec);
176var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(locItem.ItemSpec));
283else if (!Path.IsPathRooted(oldPath))
292var possiblePath = Path.Combine(additionalBasePath.ItemSpec, oldPath);
310newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
325string newFolder = Path.Combine(outputPath, id);
331File.Copy(oldPath, Path.Combine(outputPath, newRelativePath), true);
Microsoft.DotNet.Build.Tasks.Packaging (63)
NuGetPack.cs (13)
23@"**\*.pdb".Replace('\\', Path.DirectorySeparatorChar),
24@"src\**\*".Replace('\\', Path.DirectorySeparatorChar)
31@"content\**\*".Replace('\\', Path.DirectorySeparatorChar),
32@"tools\**\*.ps1".Replace('\\', Path.DirectorySeparatorChar)
198string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory;
249return Path.Combine(nupkgOutputDirectory, $"{id}.{version}{nupkgExtension}");
254bool creatingSymbolsPackage = packSymbols && (Path.GetExtension(nupkgPath) == _symbolsPackageExtension);
259string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory;
296var directory = Path.GetDirectoryName(nupkgPath);
353if(Path.GetFileName(fileName) == "runtime.json" && file.Target == "")
355string packedPackageSourcePath = Path.Combine(Path.GetDirectoryName(fileName), string.Join(".", _packageNamePrefix, Path.GetFileName(fileName)));
Microsoft.DotNet.Build.Tasks.Packaging.Tests (5)
Microsoft.DotNet.Build.Tasks.TargetFramework (5)
Microsoft.DotNet.Build.Tasks.Templating (2)
Microsoft.DotNet.Build.Tasks.Templating.Tests (11)
Microsoft.DotNet.Build.Tasks.VisualStudio (11)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (34)
OptProf\GenerateTrainingInputFilesTests.cs (24)
136var temp = Path.GetTempPath();
137var dir = Path.Combine(temp, Guid.NewGuid().ToString());
140var configPath = Path.Combine(dir, "OptProf.json");
143var insertionDir = Path.Combine(dir, "Insertion");
145CreateVsix(Path.Combine(insertionDir, "Setup.vsix"), manifestContent: s_manifestJson);
147var outputDir = Path.Combine(dir, "Output");
161Path.Combine(outputDir, @"DDRIT.RPS.CSharp"),
162Path.Combine(outputDir, @"TeamEng"),
163Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations"),
164Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging"),
165Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner"),
166Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.0.IBC.json"),
167Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.1.IBC.json"),
168Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\xyzMicrosoft.CodeAnalysis.0.IBC.json"),
169Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"),
170Path.Combine(outputDir, @"TeamEng\Configurations"),
171Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble"),
172Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.0.IBC.json"),
173Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"),
174Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.VisualBasic.0.IBC.json")
178var json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.0.IBC.json"));
189json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.1.IBC.json"));
200json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"));
210json = File.ReadAllText(Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.VisualBasic.0.IBC.json"));
Microsoft.DotNet.Build.Tasks.Workloads (60)
Msi\MsiBase.wix.cs (4)
129CompilerOutputPath = Utils.EnsureTrailingSlash(Path.Combine(baseIntermediateOutputPath, "wixobj", metadata.Id, $"{metadata.PackageVersion}", platform));
130WixSourceDirectory = Path.Combine(baseIntermediateOutputPath, "src", "wix", metadata.Id, $"{metadata.PackageVersion}", platform);
155string eulaRtf = Path.Combine(WixSourceDirectory, "eula.rtf");
247NuGetPackageFiles[Path.GetFullPath(msiJsonPath)] = "\\data\\msi.json";
Microsoft.DotNet.Build.Tasks.Workloads.Tests (83)
CreateVisualStudioWorkloadTests.cs (17)
26string baseIntermediateOutputPath = Path.Combine(Path.GetTempPath(), "WL");
35new TaskItem(Path.Combine(TestBase.TestAssetsPath, "microsoft.net.workload.emscripten.manifest-6.0.200.6.0.4.nupkg"))
95Path.Combine(Path.GetDirectoryName(
100Path.Combine(Path.GetDirectoryName(
128string manifestMsiSwr = File.ReadAllText(Path.Combine(baseIntermediateOutputPath, "src", "swix", "6.0.200", "Emscripten.Manifest-6.0.200", "x64", "msi.swr"));
137string swixRootDirectory = Path.Combine(baseIntermediateOutputPath, "src", "swix", "6.0.200");
144string packMsiSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(pythonPackSwixItem.ItemSpec), "msi.swr"));
162string baseIntermediateOutputPath = Path.Combine(Path.GetTempPath(), "WLa64");
171new TaskItem(Path.Combine(TestBase.TestAssetsPath, "microsoft.net.workload.emscripten.manifest-6.0.200.6.0.4.nupkg"))
230Path.Combine(Path.GetDirectoryName(
250string manifestMsiSwr = File.ReadAllText(Path.Combine(baseIntermediateOutputPath, "src", "swix", "6.0.200", "Emscripten.Manifest-6.0.200", "arm64", "msi.swr"));
MsiTests.cs (9)
34ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"),
35msiOutputPath: Path.Combine(MsiOutputPath, "mrec"));
46string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
49ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
53ITaskItem msi604 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.4.nupkg"));
83string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
84TaskItem packageItem = new(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
113string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
114string packagePath = Path.Combine(TestAssetsPath, "microsoft.ios.templates.15.2.302-preview.14.122.nupkg");
SwixComponentTests.cs (27)
19public string RandomPath => Path.Combine(AppContext.BaseDirectory, "obj", Path.GetFileNameWithoutExtension(Path.GetTempFileName()));
31string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
35string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
60string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
65string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
89string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
94string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
115string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
129string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
158string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
174string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
189string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
198return WorkloadManifestReader.ReadWorkloadManifest(Path.GetFileNameWithoutExtension(filename),
199File.OpenRead(Path.Combine(TestAssetsPath, filename)), filename);
Microsoft.DotNet.CodeAnalysis (2)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.GenFacades (11)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.JobSender.Tests (1)
Microsoft.DotNet.Helix.Sdk (15)
Microsoft.DotNet.Helix.Sdk.Tests (4)
Microsoft.DotNet.Internal.SymbolHelper (21)
Microsoft.DotNet.MacOsPkg.Core (16)
Microsoft.DotNet.MacOsPkg.Tests (26)
UnpackPackTests.cs (26)
23private static readonly string pkgToolPath = Path.Combine(
24Path.GetDirectoryName(typeof(UnpackPackTests).Assembly.Location)!,
44(Path.Combine("Payload", "Sample.txt"), nonExecutableFileMode),
51(Path.Combine("Payload", "test.app"), nonExecutableFileMode),
56(Path.Combine("Contents", "Info.plist"), nonExecutableFileMode),
57(Path.Combine("Contents", "MacOS", "main"), executableFileMode),
58(Path.Combine("Contents", "Resources", "libexample.dylib"), executableFileMode)
78string unpackPath = Path.GetTempFileName();
91string unpackPath = Path.GetTempFileName();
104string unpackPkgPath = Path.GetTempFileName();
105string unpackAppPath = Path.GetTempFileName();
111Unpack(Path.Combine(unpackPkgPath, "Payload", "test.app"), unpackAppPath, appFiles);
119string unpackPath = Path.GetTempFileName();
132string unpackInstallerPath = Path.GetTempFileName();
133string unpackComponentPath = Path.GetTempFileName();
136string componentPkgPath = Path.Combine(unpackInstallerPath, "Simple.pkg");
150string unpackInstallerPath = Path.GetTempFileName();
151string unpackComponentPath = Path.GetTempFileName();
152string unpackAppPath = Path.GetTempFileName();
155string componentPkgPath = Path.Combine(unpackInstallerPath, "WithApp.pkg");
156string appPath = Path.Combine(unpackComponentPath, "Payload", "test.app");
207string unpackPath = Path.GetTempFileName();
235return Path.Combine(
236Path.GetDirectoryName(typeof(UnpackPackTests).Assembly.Location)!,
241private static string GetTempPkgPath() => $"{Path.GetTempFileName()}.pkg";
243private static string GetTempAppPath() => $"{Path.GetTempFileName()}.app";
Microsoft.DotNet.NuGetRepack.Tasks (8)
Microsoft.DotNet.NuGetRepack.Tests (41)
VersionUpdaterTests.cs (37)
59var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
63File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
64File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
65File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
66File.WriteAllBytes(d_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameD), TestResources.DailyBuildPackages.TestPackageD);
67File.WriteAllBytes(g_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameG), TestResources.DailyBuildPackages.TestPackageG);
69var a_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameA);
70var b_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameB);
71var c_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameC);
72var d_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameD);
73var g_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameG);
75var a_rel = Path.Combine(dir, TestResources.ReleasePackages.NameA);
76var b_rel = Path.Combine(dir, TestResources.ReleasePackages.NameB);
77var c_rel = Path.Combine(dir, TestResources.ReleasePackages.NameC);
78var d_rel = Path.Combine(dir, TestResources.ReleasePackages.NameD);
79var g_rel = Path.Combine(dir, TestResources.ReleasePackages.NameG);
102var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
106File.WriteAllBytes(e_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameE), TestResources.DailyBuildPackages.TestPackageE);
107File.WriteAllBytes(f_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameF), TestResources.DailyBuildPackages.TestPackageF);
109var e_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameE);
110var f_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameF);
112var e_rel = Path.Combine(dir, TestResources.ReleasePackages.NameE);
113var f_rel = Path.Combine(dir, TestResources.ReleasePackages.NameF);
130var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
134File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
135File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
136File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
169var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
170var outputDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
174File.WriteAllBytes(dotnet_tool = Path.Combine(dir, TestResources.MiscPackages.NameDotnetTool), TestResources.MiscPackages.DotnetTool);
176File.WriteAllBytes(normal_package_b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
181Assert.Single(Directory.EnumerateFiles(outputDir), fullPath => Path.GetFileNameWithoutExtension(fullPath) == "TestPackageB.1.0.0");
Microsoft.DotNet.Open.Api.Tools.Tests (40)
Microsoft.DotNet.PackageTesting (5)
Microsoft.DotNet.RemoteExecutor (16)
Microsoft.DotNet.SharedFramework.Sdk (17)
Microsoft.DotNet.SignCheckLibrary (52)
Microsoft.DotNet.SignCheckTask (15)
Microsoft.DotNet.SignTool (97)
Microsoft.DotNet.SignTool.Tests (148)
Microsoft.DotNet.SourceBuild.Tasks (9)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.VersionTools.Cli (1)
Microsoft.DotNet.XliffTasks (48)
Tasks\TransformTemplates.cs (14)
63string templateName = Path.GetFileNameWithoutExtension(template.ItemSpec);
65string templateDirectory = Path.GetDirectoryName(templatePath);
70? Path.Combine(TranslatedOutputDirectory, $"{templateName}.default.1033")
71: Path.Combine(TranslatedOutputDirectory, $"{templateName}.{language}");
73string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec));
79string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value);
80File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
86string templateItemFullPath = Path.Combine(templateDirectory, templateItem.Value);
87string templateItemDestinationPath = Path.Combine(localizedTemplateDirectory, templateItem.Value);
104Path.GetFileNameWithoutExtension(unstructuredResource.ItemSpec),
107Path.GetExtension(unstructuredResource.ItemSpec));
108File.Copy(Path.Combine(TranslatedOutputDirectory, localizedFileName), templateItemDestinationPath, overwrite: true);
Microsoft.DotNet.XliffTasks.Tests (7)
Microsoft.DotNet.XUnitAssert.Tests (3)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (3)
Microsoft.Extensions.AI.Evaluation.Reporting (19)
Storage\DiskBasedResultStore.cs (11)
48storageRootPath = Path.GetFullPath(storageRootPath);
49_resultsRootPath = Path.Combine(storageRootPath, "results");
93new DirectoryInfo(Path.Combine(_resultsRootPath, result.ExecutionName, result.ScenarioName));
97var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json"));
123var executionDir = new DirectoryInfo(Path.Combine(_resultsRootPath, executionName));
133new DirectoryInfo(Path.Combine(_resultsRootPath, executionName, scenarioName));
143new FileInfo(Path.Combine(_resultsRootPath, executionName, scenarioName, $"{iterationName}.json"));
241yield return Path.GetFileNameWithoutExtension(resultFile.Name);
269var executionDir = new DirectoryInfo(Path.Combine(_resultsRootPath, executionName));
302var scenarioDir = new DirectoryInfo(Path.Combine(executionDir.FullName, scenarioName));
338var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json"));
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (21)
Microsoft.Extensions.AI.Templates.Tests (20)
Infrastructure\WellKnownPaths.cs (9)
30TemplateFeedLocation = Path.Combine(RepoRoot, "src", "ProjectTemplates");
31TemplateSandboxRoot = Path.Combine(ThisProjectRoot, "TemplateSandbox");
32TemplateSandboxOutputRoot = Path.Combine(TemplateSandboxRoot, "output");
33TemplateInstallNuGetConfigPath = Path.Combine(TemplateSandboxRoot, "nuget.template_install.config");
34TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxRoot, "nuget.template_test.config");
42LocalShippingPackagesPath = Path.Combine(RepoRoot, "artifacts", "packages", BuildConfigurationFolder, "Shipping");
43NuGetPackagesPath = Path.Combine(TemplateSandboxOutputRoot, "packages");
52var gitPath = Path.Combine(directory, ".git");
72var dotNetExePath = Path.Combine(RepoRoot, ".dotnet", dotNetExeName);
Microsoft.Extensions.ApiDescription.Client (3)
Microsoft.Extensions.ApiDescription.Client.Tests (80)
GetOpenApiReferenceMetadataTest.cs (22)
18var identity = Path.Combine("TestProjects", "files", "NSwag.json");
20var outputPath = Path.Combine("obj", "NSwagClient.cs");
70var identity = Path.Combine("TestProjects", "files", "NSwag.json");
73var outputPath = Path.Combine("obj", $"NSwagClient.cs");
129var identity = Path.Combine("TestProjects", "files", "NSwag.json");
131var outputPath = Path.Combine("obj", "NSwagClient.cs");
186var identity = Path.Combine("TestProjects", "files", "NSwag.json");
189var outputPath = Path.Combine(Path.GetTempPath(), $"{className}.cs");
244var identity1 = Path.Combine("TestProjects", "files", "NSwag.json");
245var identity2 = Path.Combine("TestProjects", "files", "swashbuckle.json");
290var identity = Path.Combine("TestProjects", "files", "NSwag.json");
292var error = Resources.FormatDuplicateFileOutputPaths(Path.Combine("obj", "NSwagClient.cs"));
335var identity = Path.Combine("TestProjects", "files", "NSwag.json");
339var expectedOutputPath = Path.Combine("bin", outputPath);
400var identity = Path.Combine("TestProjects", "files", "NSwag.json");
402var expectedOutputPath = Path.Combine("bin", outputPath);
457var identity12 = Path.Combine("TestProjects", "files", "NSwag.json");
458var identity3 = Path.Combine("TestProjects", "files", "swashbuckle.json");
467var outputPath1 = Path.Combine("obj", $"{className12}.cs");
468var outputPath2 = Path.Combine("obj", $"{className12}.ts");
469var outputPath3 = Path.Combine("obj", $"{className3}.cs");
TargetTest.cs (48)
19private static string _assemblyLocation = Path.GetDirectoryName(_assembly.Location);
38var directory = new DirectoryInfo(Path.Combine(_assemblyLocation, "build"));
41file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
43directory = new DirectoryInfo(Path.Combine(_assemblyLocation, "TestProjects", "build"));
46file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
50directory = new DirectoryInfo(Path.Combine(_assemblyLocation, "TestProjects", "files"));
53file.CopyTo(Path.Combine(files.Root, file.Name), overwrite: true);
60file.CopyTo(Path.Combine(tasks.Root, file.Name), overwrite: true);
80Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "azureMonitorClient.cs")}", process.Output);
81Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
103Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
104Assert.Contains($"TypeScriptCompile: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
123Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "azureMonitorClient.cs")}", process.Output);
124Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "NSwagClient.cs")}", process.Output);
125Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "swashbuckleClient.cs")}", process.Output);
126Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
127Assert.Contains($"FileWrites: {Path.Combine("obj", "NSwagClient.cs")}", process.Output);
128Assert.Contains($"FileWrites: {Path.Combine("obj", "swashbuckleClient.cs")}", process.Output);
149Assert.Contains($"Compile: {Path.Combine("obj", "azureMonitorClient.cs", "Generated1.cs")}", process.Output);
150Assert.Contains($"Compile: {Path.Combine("obj", "azureMonitorClient.cs", "Generated2.cs")}", process.Output);
152$"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs", "Generated1.cs")}",
155$"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs", "Generated2.cs")}",
178$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
180$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
203$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
205$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
228$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
230$"Options: '' OutputPath: '{Path.Combine("generated", "azureMonitorClient.cs")}'",
255$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
257$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
280$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
282$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
305$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
307$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
330$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
332$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
357$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
359$"Options: '' OutputPath: '{Path.Combine("obj", "Custom.cs")}'",
381$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
383$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
387$"{Path.Combine(_temporaryDirectory.Root, "files", "NSwag.json")} " +
389$"Options: '' OutputPath: '{Path.Combine("obj", "NSwagClient.cs")}'",
393$"{Path.Combine(_temporaryDirectory.Root, "files", "swashbuckle.json")} " +
395$"Options: '' OutputPath: '{Path.Combine("obj", "swashbuckleClient.cs")}'",
422$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
424$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
428$"{Path.Combine(_temporaryDirectory.Root, "files", "azureMonitor.json")} " +
430$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
Microsoft.Extensions.ApiDescription.Tool.Tests (59)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
Microsoft.Extensions.Configuration.FileExtensions (7)
Microsoft.Extensions.Configuration.UserSecrets (4)
Microsoft.Extensions.DependencyModel (21)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.FileProviders.Embedded (9)
Microsoft.Extensions.FileProviders.Embedded.Tests (6)
Microsoft.Extensions.FileProviders.Physical (22)
Microsoft.Extensions.FileSystemGlobbing (27)
InMemoryDirectoryInfo.cs (22)
18private static readonly char[] DirectorySeparators = new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
40Name = Path.GetFileName(rootDir);
49string normalizedRoot = Path.GetFullPath(rootDir.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
54string fileWithNormalSeparators = file.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
55if (Path.IsPathRooted(file))
57fileList.Add(Path.GetFullPath(fileWithNormalSeparators));
61fileList.Add(Path.GetFullPath(Path.Combine(normalizedRoot, fileWithNormalSeparators)));
79new InMemoryDirectoryInfo(Path.GetDirectoryName(FullName)!, _files, true);
125(rootDir[rootDirLength - 1] == Path.DirectorySeparatorChar ||
126filePath.IndexOf(Path.DirectorySeparatorChar, rootDirLength) == rootDirLength);
134return new InMemoryDirectoryInfo(Path.Combine(FullName, path), _files, true);
138string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
150string normPath = Path.GetFullPath(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
Microsoft.Extensions.Hosting (3)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Localization (4)
Microsoft.Extensions.Localization.Tests (5)
Microsoft.Extensions.Logging.AzureAppServices (4)
Microsoft.Extensions.ML (2)
Microsoft.Extensions.ML.Tests (2)
Microsoft.Extensions.SecretManager.Tools.Tests (34)
Microsoft.Extensions.ServiceDiscovery.Dns (8)
DnsSrvServiceEndpointProviderFactory.cs (8)
17private static readonly string s_serviceAccountPath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount");
18private static readonly string s_serviceAccountNamespacePath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount", "namespace");
19private static readonly string s_resolveConfPath = Path.Combine($"{Path.DirectorySeparatorChar}etc", "resolv.conf");
124var tokenPath = Path.Combine(s_serviceAccountPath, "token");
130var certPath = Path.Combine(s_serviceAccountPath, "ca.crt");
Microsoft.Gen.ComplianceReports (5)
Microsoft.Gen.ComplianceReports.Unit.Tests (8)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging (2)
Microsoft.Gen.Logging.Unit.Tests (8)
Microsoft.Gen.MetadataExtractor (7)
Microsoft.Gen.MetadataExtractor.Unit.Tests (13)
Microsoft.Gen.Metrics (2)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (3)
Microsoft.Gen.MetricsReports.Unit.Tests (13)
Microsoft.Maui (1)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Controls.Build.Tasks (6)
Microsoft.Maui.Controls.SourceGen (10)
Microsoft.Maui.Essentials (6)
Microsoft.Maui.Resizetizer (56)
Microsoft.ML.AutoML (5)
Microsoft.ML.AutoML.Samples (5)
Microsoft.ML.AutoML.Tests (24)
ColumnInferenceTests.cs (8)
81var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithEmptyColumn.txt"), DefaultColumnNames.Label, groupColumns: false);
89var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "BinaryDatasetWithBoolColumn.txt"), DefaultColumnNames.Label);
108var filePath = Path.Combine("TestData", "DatasetWithoutHeader.txt");
136var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "NameColumnIsOnlyFeatureDataset.txt"), DefaultColumnNames.Label);
153.InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
173var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
204var dataset = Path.Combine("TestData", "DatasetWithNewlineBetweenQuotes.txt");
245var wiki = Path.Combine("TestData", "wiki-column-inference.json");
DatasetUtil.cs (14)
27public static string TrivialMulticlassDatasetPath = Path.Combine("TestData", "TrivialMulticlassDataset.txt");
49return Path.Combine(TestCommon.GetRepoRoot(), "test", "data", fileName);
132string imagesDownloadFolderPath = Path.Combine(assetsPath, "inputs",
139string fullImagesetFolderPath = Path.Combine(
166var extension = Path.GetExtension(file).ToLower();
174var label = Path.GetFileName(file);
191UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
193return Path.GetFileNameWithoutExtension(fileName);
199destFileName = Path.GetFileName(new Uri(url).AbsolutePath); ;
203string relativeFilePath = Path.Combine(destDir, destFileName);
223var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
228if (File.Exists(Path.Combine(destFolder, flag)))
232File.Create(Path.Combine(destFolder, flag));
236Path.Combine(new FileInfo(typeof(
Microsoft.ML.CodeAnalyzer.Tests (1)
Microsoft.ML.CodeGenerator (12)
Microsoft.ML.Core (45)
Microsoft.ML.Core.Tests (19)
UnitTests\TestEntryPoints.cs (5)
237var entryPointsSubDir = Path.Combine("..", "Common", "EntryPoints");
265var entryPointsSubDir = Path.Combine("..", "Common", "EntryPoints");
4560TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS1.csv")), "sep=, col=Features:R4:1 header=+",
4589TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "real_1.csv")), "sep=, col=Features:R4:1 header=+",
4613TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS2.csv")), "sep=, col=Features:R4:1 header=+",
Microsoft.ML.CpuMath.UnitTests (1)
Microsoft.ML.Data (16)
Microsoft.ML.DnnImageFeaturizer.AlexNet (3)
AlexNetExtension.cs (3)
28return AlexNet(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Dropout234_Output_0" }, new[] { "Input140" }, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet101 (3)
ResNet101Extension.cs (3)
28return ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling2286_Output_0" }, new[] { "Input1600" }, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet18 (3)
ResNet18Extension.cs (3)
28return ResNet18(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling395_Output_0" }, new[] { "Input247" }, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet50 (3)
ResNet50Extension.cs (3)
28return ResNet50(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling1096_Output_0" }, new[] { "Input750" }, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"));
Microsoft.ML.Ensemble (2)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.LLaMA (3)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Mistral (3)
Microsoft.ML.GenAI.Phi (5)
Microsoft.ML.GenAI.Phi.Tests (3)
Microsoft.ML.GenAI.Samples (11)
Microsoft.ML.ImageAnalytics (4)
Microsoft.ML.IntegrationTests (5)
Microsoft.ML.Maml (4)
Microsoft.ML.OneDal (1)
Microsoft.ML.OnnxConverter (1)
Microsoft.ML.OnnxTransformer (4)
Microsoft.ML.OnnxTransformerTest (21)
Microsoft.ML.Parquet (6)
Microsoft.ML.PerformanceTests (35)
Microsoft.ML.Predictor.Tests (14)
CompareBaselines.cs (14)
58log.WriteLine("Comparison of baselines {0} to {1}", Path.GetFileName(root1), Path.GetFileName(root2));
66string dir1 = Path.Combine(root1, rel);
67string dir2 = Path.Combine(root2, rel);
70.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false);
73string name = Path.GetFileName(path1);
74string relCur = Path.Combine(rel, name);
89log.WriteLine("*** Missing left file: '{0}'", Path.Combine(rel, kvp.Key));
93.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false);
96string name = Path.GetFileName(path1);
97string relCur = Path.Combine(rel, name);
112log.WriteLine("*** Missing left directory: '{0}'", Path.Combine(rel, kvp.Key));
167using (var rdr1 = OpenReader(Path.Combine(root1, rel)))
168using (var rdr2 = OpenReader(Path.Combine(root2, rel)))
Microsoft.ML.ResultProcessor (1)
Microsoft.ML.Samples (71)
Microsoft.ML.Samples.GPU (62)
Microsoft.ML.SamplesUtils (11)
SamplesDatasetUtils.cs (11)
27while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
36return Path.Combine(directory, "test", "data", fileName);
179string varPath = Path.Combine(path, "variables");
183Download(Path.Combine(remotePath, "saved_model.pb"), Path.Combine(path, "saved_model.pb")).Wait();
184Download(Path.Combine(remotePath, "imdb_word_index.csv"), Path.Combine(path, "imdb_word_index.csv")).Wait();
185Download(Path.Combine(remotePath, "variables", "variables.data-00000-of-00001"), Path.Combine(varPath, "variables.data-00000-of-00001")).Wait();
186Download(Path.Combine(remotePath, "variables", "variables.index"), Path.Combine(varPath, "variables.index")).Wait();
Microsoft.ML.SearchSpace.Tests (2)
Microsoft.ML.Sweeper (5)
Microsoft.ML.TensorFlow (11)
Microsoft.ML.TensorFlow.Tests (53)
TensorflowTests.cs (50)
35tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
36assetsPath = Path.Combine(tempFolder, "assets");
37parentWorkspacePath = Path.Combine(assetsPath, "cached");
68string imagesDownloadFolderPath = Path.Combine(TensorFlowScenariosTestsFixture.assetsPath, "inputs",
75_fullImagesetFolderPath = Path.Combine(
137var imageFolder = Path.GetDirectoryName(dataFile);
504var imageFolder = Path.GetDirectoryName(dataFile);
540var imageFolder = Path.GetDirectoryName(dataFile);
765var varDir = Path.Combine(modelLocation, "variables");
1010var imageFolder = Path.GetDirectoryName(dataFile);
1069var imageFolder = Path.GetDirectoryName(dataFile);
1112var imageFolder = Path.GetDirectoryName(dataFile);
1147var imageFolder = Path.GetDirectoryName(dataFile);
1184var mlModelLocation = DeleteOutputPath(Path.ChangeExtension(modelLocation, ".zip"));
1222var imageFolder = Path.GetDirectoryName(dataFile);
1446if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName))
1447&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName)))
1462string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch);
1562ImagePath = Path.Combine(_fullImagesetFolderPath, "daisy", "5794835_d15905c7c8_n.jpg")
1568ImagePath = Path.Combine(_fullImagesetFolderPath, "roses", "12240303_80d87f77a3_n.jpg")
1721ImagePath = Path.Combine(_fullImagesetFolderPath, "daisy", "5794835_d15905c7c8_n.jpg")
1727ImagePath = Path.Combine(_fullImagesetFolderPath, "roses", "12240303_80d87f77a3_n.jpg")
1747Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName)));
1748Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName)));
1749Assert.True(File.Exists(Path.Combine(Path.GetTempPath(), "MLNET", ImageClassificationTrainer.ModelFileName[options.Arch])));
1841string imagesDownloadFolderPath = Path.Combine(TensorFlowScenariosTestsFixture.assetsPath, "inputs",
1847string fullImagesetFolderPath = Path.Combine(
1921if (Path.GetExtension(file) != ".jpg")
1924var label = Path.GetFileName(file);
1955UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1957if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
1958Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT"));
1968UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1970return Path.GetFileNameWithoutExtension(fileName);
1976destFileName = url.Split(Path.DirectorySeparatorChar).Last();
1980string relativeFilePath = Path.Combine(destDir, destFileName);
1993var directory = Path.GetDirectoryName(errorResult.FileName);
1994var name = Path.GetFileName(errorResult.FileName);
2004var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
2009if (File.Exists(Path.Combine(destFolder, flag)))
2013File.Create(Path.Combine(destFolder, flag));
2036string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
2051string imageFolder = Path.GetDirectoryName(dataFile);
Microsoft.ML.TestFramework (23)
BaseTestBaseline.cs (12)
37private readonly string _logRootRelPath = Path.Combine("Logs", BuildString); // Relative to OutDir.
94string baselineRootDir = Path.Combine(RootDir, TestDir, "BaselineOutput");
97_baselineCommonDir = Path.Combine(baselineRootDir, "Common");
100string logDir = Path.Combine(OutDir, _logRootRelPath);
103string logPath = Path.Combine(logDir, FullTestName + LogSuffix);
288baselinePath = Path.GetFullPath(Path.Combine(_baselineCommonDir, subDir, baselineConfigDir, name));
297return Path.GetFullPath(Path.Combine(_baselineCommonDir, subDir, name));
411Contracts.Assert(!Path.IsPathRooted(name), "file name should not be a full path");
412Contracts.Assert(!Path.IsPathRooted(nameBase), "file nameBase should not be a full path");
414string relPath = Path.Combine(dir, name);
Microsoft.ML.TestFrameworkCommon (18)
Microsoft.ML.Tests (49)
OnnxConversionTest.cs (14)
87var subDir = Path.Combine("Onnx", "Regression", "Adult");
165var subDir = Path.Combine("Onnx", "Cluster", "BreastCancer");
207var subDir = Path.Combine("Onnx", "Regression", "Adult");
442var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
584var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
610var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
635var subDir = Path.Combine("Onnx", "MultiClassClassification", "BreastCancer");
647string modelPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.bin";
648string onnxPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.onnx";
649string onnxJsonPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.onnx.json";
817var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
856var subDir = Path.Combine("Onnx", "Transforms", "Sentiment");
1172var subDir = Path.Combine("Onnx", "Transforms");
1901var subDir = Path.Combine("Onnx", "Transforms");
Microsoft.ML.TimeSeries.Tests (4)
Microsoft.ML.Tokenizers.Data.Tests (3)
Microsoft.ML.Tokenizers.Tests (26)
Microsoft.ML.TorchSharp (12)
Microsoft.ML.TorchSharp.Tests (1)
Microsoft.ML.Transforms (5)
Microsoft.ML.Vision (25)
DnnRetrainTransform.cs (16)
119var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
131string fullFilePath = Path.Combine(tempDirPath, relativeFile);
132string fullFileDir = Path.GetDirectoryName(fullFilePath);
410var path = Path.Combine(modelDir, DefaultModelFileNames.TmpMlnetModel);
417var variablesPath = Path.Combine(modelDir, DefaultModelFileNames.VariablesFolder);
418var archivePath = Path.Combine(variablesPath + "-" + Guid.NewGuid().ToString());
421File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
440var destination = Path.Combine(variablesPath, DefaultModelFileNames.Data);
447var destination = Path.Combine(variablesPath, DefaultModelFileNames.Index);
534_modelLocation = Path.IsPathRooted(modelLocation) ? modelLocation : Path.Combine(Directory.GetCurrentDirectory(), modelLocation);
706Path.Combine(_modelLocation, DefaultModelFileNames.Graph),
707Path.Combine(_modelLocation, DefaultModelFileNames.VariablesFolder, DefaultModelFileNames.Data),
708Path.Combine(_modelLocation, DefaultModelFileNames.VariablesFolder, DefaultModelFileNames.Index),
ImageClassificationTrainer.cs (9)
537_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET");
570_checkpointPath = Path.Combine(_options.WorkspacePath, _options.FinalModelPrefix +
572_sizeFile = Path.Combine(_options.WorkspacePath, "TrainingSetSize.txt");
668string trainSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
671string validationSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
872Path.Combine(_options.WorkspacePath, _options.ValidationSetBottleneckCachedValuesFileName),
970trainWriter = tf.summary.FileWriter(Path.Combine(_options.WorkspacePath, "train"),
1165var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch]));
1329var modelFilePath = Path.Combine(_resourcePath, modelFileName);
Microsoft.VisualBasic.Core (78)
Microsoft\VisualBasic\FileIO\FileSystem.vb (60)
71baseDirectory = IO.Path.GetFullPath(baseDirectory) ' Throw exceptions if BaseDirectoryPath is invalid.
73Return NormalizePath(IO.Path.Combine(baseDirectory, relativePath))
92(file.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) Or
93file.EndsWith(IO.Path.AltDirectorySeparatorChar, StringComparison.OrdinalIgnoreCase)) Then
223Return IO.Path.GetFileName(path)
234''' <exception cref="IO.Path.GetFullPath">See IO.Path.GetFullPath: If path is an invalid path.</exception>
241IO.Path.GetFullPath(path)
246Return IO.Path.GetDirectoryName(path.TrimEnd(
247IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar))
476directory = IO.Path.GetFullPath(directory)
545''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath() exceptions: if FilePath is invalid.</exception>
656''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If directory is invalid.</exception>
663directory = IO.Path.GetFullPath(directory)
699''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If file is invalid.</exception>
837''' <exception cref="IO.Path.GetFullPath">See IO.Path.GetFullPath for possible exceptions.</exception>
840Return GetLongPath(RemoveEndingSeparator(IO.Path.GetFullPath(Path)))
852If path.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.Ordinal) Or
853path.EndsWith(IO.Path.AltDirectorySeparatorChar, StringComparison.Ordinal) Then
883''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If SourceDirectoryPath or TargetDirectoryPath is invalid.
938If TargetDirectoryFullPath.Chars(SourceDirectoryFullPath.Length) = IO.Path.DirectorySeparatorChar Then
965Debug.Assert(sourceDirectoryPath <> "" And IO.Path.IsPathRooted(sourceDirectoryPath), "Invalid Source")
966Debug.Assert(targetDirectoryPath <> "" And IO.Path.IsPathRooted(targetDirectoryPath), "Invalid Target")
1041CopyOrMoveFile(Operation, SubFilePath, IO.Path.Combine(SourceDirectoryNode.TargetPath, IO.Path.GetFileName(SubFilePath)),
1083''' <exception cref="IO.Path.GetFullPath">
1186Dim directoryFullPath As String = IO.Path.GetFullPath(directory)
1267Debug.Assert(FilePath <> "" AndAlso IO.Path.IsPathRooted(FilePath), FilePath)
1449Debug.Assert(Path <> "" AndAlso IO.Path.IsPathRooted(Path), Path)
1450Debug.Assert(Path.Equals(IO.Path.GetFullPath(Path)), Path)
1464Dim FullPath As String = RemoveEndingSeparator(IO.Path.GetFullPath(IO.Path.Combine(Path, NewName)))
1485Debug.Assert(Not FullPath = "" AndAlso IO.Path.IsPathRooted(FullPath), "Must be full path")
1497Debug.Assert(DInfo.GetFiles(IO.Path.GetFileName(FullPath)).Length = 1, "Must found exactly 1")
1498Return DInfo.GetFiles(IO.Path.GetFileName(FullPath))(0).FullName
1500Debug.Assert(DInfo.GetDirectories(IO.Path.GetFileName(FullPath)).Length = 1,
1502Return DInfo.GetDirectories(IO.Path.GetFileName(FullPath))(0).FullName
1538Path1 = Path1.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1539Path2 = Path2.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1540Return String.Equals(IO.Path.GetPathRoot(Path1), IO.Path.GetPathRoot(Path2), StringComparison.OrdinalIgnoreCase)
1556If Not IO.Path.IsPathRooted(Path) Then
1560Path = Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1561Return String.Equals(Path, IO.Path.GetPathRoot(Path), StringComparison.OrdinalIgnoreCase)
1571If IO.Path.IsPathRooted(Path) Then
1576If Path.Equals(IO.Path.GetPathRoot(Path), StringComparison.OrdinalIgnoreCase) Then
1582Return Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1602Debug.Assert(FullSourcePath <> "" And IO.Path.IsPathRooted(FullSourcePath), "Invalid FullSourcePath")
1603Debug.Assert(FullTargetPath <> "" And IO.Path.IsPathRooted(FullTargetPath), "Invalid FullTargetPath")
1667Debug.Assert(FullPath <> "" And IO.Path.IsPathRooted(FullPath), "FullPath must be a full path")
2056IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar, IO.Path.VolumeSeparatorChar}
2097Debug.Assert(TargetDirectoryPath <> "" And IO.Path.IsPathRooted(TargetDirectoryPath), "Invalid TargetPath")
2103Dim SubTargetDirPath As String = IO.Path.Combine(m_TargetPath, IO.Path.GetFileName(SubDirPath))
Microsoft.VisualBasic.Forms (16)
Microsoft.VisualBasic.Forms.Tests (20)
Microsoft.VisualBasic.IntegrationTests (2)
Microsoft.VisualBasic.Tests (51)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (48)
40Assert.Equal(_fileSystem.CombinePath(Root, "Test2"), Path.Join(Root, "Test2"));
48Assert.Equal(_fileSystem.CombinePath(TestDirectory, "Test"), Path.Join(TestDirectory, "Test"));
54string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
61string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
79string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
80string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
109string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
110string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
182string FullPathToNewDirectory = Path.Join(TestDirectory, "NewDirectory");
208string FullPathToNewDirectory = Path.Join(TestDirectory, "NewDirectory");
220string FullPathToNewDirectory = Path.Join(TestDirectory, "NewDirectory");
245Assert.False(_fileSystem.DirectoryExists(Path.Join(TestDirectory, "NewDirectory")));
272Directory.CreateDirectory(Path.Join(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"));
279Assert.Contains(Path.Join(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"), DirectoryList);
282Directory.CreateDirectory(Path.Join(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory0", $"NewSubSubDirectory"));
294Directory.CreateDirectory(Path.Join(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"));
301Assert.Contains(Path.Join(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"), DirectoryList);
304Directory.CreateDirectory(Path.Join(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory0", $"NewSubSubDirectory"));
319CreatedDirectories.Add(Directory.CreateDirectory(Path.Join(TestDirectory, $"NewSubDirectory00{i}")).Name);
326string DirectoryName = Path.Join(TestDirectory, $"NewSubDirectory00{i}");
330Directory.CreateDirectory(Path.Join(TestDirectory, $"NewSubDirectory000", $"NewSubSubDirectory000"));
342Directory.CreateDirectory(Path.Join(TestDirectory, $"NewSubDirectory{i}"));
345Directory.CreateDirectory(Path.Join(TestDirectory, $"NewSubDirectory0", $"NewSubSubDirectory"));
403Assert.Contains(Path.Join(TestDirectory, $"NewFile{i}"), FileList);
406Directory.CreateDirectory(Path.Join(TestDirectory, "GetFiles_DirectoryNewSubDirectory"));
415string NewSubDirectoryPath = Path.Join(TestDirectory, "GetFiles_Directory_SearchOptionNewSubDirectory");
430Assert.Contains(Path.Join(TestDirectory, $"NewFile{i}"), FileList);
459string NewSubDirectoryPath = Path.Join(TestDirectory, "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory");
470Assert.Equal(_fileSystem.GetName(TestDirectory), Path.GetFileName(TestDirectory));
476Assert.Equal(_fileSystem.GetParentPath(TestDirectory), Path.GetDirectoryName(TestDirectory));
491string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
492string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
517string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
518string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
555string FullPathToSourceDirectory = Path.Join(TestDirectory, "SourceDirectory");
556string FullPathToTargetDirectory = Path.Join(TestDirectory, "TargetDirectory");
578string DestinationFileNameWithPath = Path.Join(TestDirectory, "NewName");
596string DestinationFileNameWithPath = Path.Join(TestDirectory, "NewName");
613string DestinationFileNameWithPath = Path.Join(TestDirectory, "NewName");
641Assert.Throws<DirectoryNotFoundException>(() => _fileSystem.RenameDirectory(Path.Join(TestDirectory, "DoesNotExistDirectory"), "NewDirectory"));
642string OrigDirectoryWithPath = Path.Join(TestDirectory, "OriginalDirectory");
646string DirectoryNameWithPath = Path.Join(TestDirectory, "DoesNotExist");
650string NewFDirectoryPath = Path.Join(TestDirectory, "NewFDirectory");
665Assert.Throws<FileNotFoundException>(() => _fileSystem.RenameFile(Path.Join(TestDirectory, "DoesNotExistFile"), "NewFile"));
673string NewFileWithPath = Path.Join(TestDirectory, "NewFile");
678Directory.CreateDirectory(Path.Join(TestDirectory, "NewFDirectory"));
701TempFileNameWithPath = Path.Join(TempFileNameWithPath, PathFromBase);
704TempFileNameWithPath = Path.Join(TempFileNameWithPath, TestFileName);
Microsoft.VisualStudio.LanguageServices (57)
Microsoft.VisualStudio.LanguageServices.CSharp (5)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (26)
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (7)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (9)
Microsoft.VisualStudio.LanguageServices.UnitTests (82)
Diagnostics\VisualStudioDiagnosticAnalyzerProviderTests.vb (8)
25Path.Combine(TempRoot.Root, "ResolvedRootFolder\test\test.dll"),
26Path.Combine(TempRoot.Root, "ResolvedShellFolder\test\test.dll"),
27Path.Combine(TempRoot.Root, "InstallPath\test\test.dll")
42Path.Combine(TempRoot.Root, "InstallPath\installPath1"),
43Path.Combine(TempRoot.Root, "InstallPath\installPath2"),
44Path.Combine(TempRoot.Root, "InstallPath\installPath3")
74Path.Combine(TempRoot.Root, "InstallPath\razorPath1"),
75Path.Combine(TempRoot.Root, "InstallPath\razorPath2")
ProjectSystemShim\VisualStudioProjectTests\AnalyzerReferenceTests.vb (57)
109Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
110Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
111Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll")
115Path.Combine(TempRoot.Root, "File.dll")
124project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
129project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
134project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
135project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
136project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
137project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
141Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
142Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
143Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll"),
144Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
145Path.Combine(TempRoot.Root, "Dir", "File.dll")
151Sub() project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll")))
155Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
156Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency1.dll"),
157Path.Combine(TempRoot.Root, "RazorVsix", "VsixDependency2.dll"),
158Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"),
159Path.Combine(TempRoot.Root, "Dir", "File.dll")
163project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll"))
164project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
165project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Some other directory", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"))
169Path.Combine(TempRoot.Root, "Dir", "File.dll")
175Sub() project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll")))
179Path.Combine(TempRoot.Root, "Dir", "File.dll")
192Path.Combine(TempRoot.Root, "File.dll")
201Dim path1 = Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "Microsoft.NET.Sdk.Razor.SourceGenerators.dll")
202Dim path2 = Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk.Razor", "source-generators", "SdkDependency1.dll")
220project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.dll"))
221project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
222project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"))
223project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll"))
232project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
237Path.Combine(TempRoot.Root, "Dir", "File.dll")
241project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.dll"))
242project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
243project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"))
244project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "cs", "Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.dll"))
261project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.dll"))
262project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
263project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll"))
264project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll"))
273project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
278Path.Combine(TempRoot.Root, "Dir", "File.dll")
281project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.dll"))
282project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.CodeStyle.Fixes.dll"))
283project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.dll"))
284project.RemoveAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "codestyle", "vb", "Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes.dll"))
298project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "analyzers", "Microsoft.CodeAnalysis.NetAnalyzers.dll"))
299project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "analyzers", "Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll"))
300project.AddAnalyzerReference(Path.Combine(TempRoot.Root, "Dir", "File.dll"))
305Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "analyzers", "Microsoft.CodeAnalysis.NetAnalyzers.redirected.dll"),
306Path.Combine(TempRoot.Root, "Sdks", "Microsoft.NET.Sdk", "analyzers", "Microsoft.CodeAnalysis.CSharp.NetAnalyzers.redirected.dll"),
307Path.Combine(TempRoot.Root, "Dir", "File.dll")
322Return Path.ChangeExtension(fullPath, ".redirected.dll")
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
Microsoft.Web.Xdt.Extensions.Tests (4)
MSBuild (109)
FileUtilities.cs (36)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
275string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar)));
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
498return NormalizePath(Path.Combine(paths));
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
XMake.cs (17)
159s_exePath = Path.GetDirectoryName(FileUtilities.ExecutingAssemblyPath);
2234responseFile = Path.GetFullPath(responseFile);
2251var responseFileDirectory = FileUtilities.EnsureTrailingSlash(Path.GetDirectoryName(responseFile));
2451string autoResponseFile = Path.Combine(path, autoResponseFileName);
2800Console.WriteLine($"{Path.Combine(s_exePath, s_exeName)} {equivalentCommandLine} {projectFile}");
3060projectDirectory = Path.GetDirectoryName(Path.GetFullPath(projectFile));
3567if (!extensionsToIgnore.Contains(Path.GetExtension(s)) && !s.EndsWith("~", StringComparison.CurrentCultureIgnoreCase))
3582if (!extensionsToIgnore.Contains(Path.GetExtension(s)))
3600string solutionName = Path.GetFileNameWithoutExtension(actualSolutionFiles[0]);
3601string projectName = Path.GetFileNameWithoutExtension(actualProjectFiles[0]);
3620string firstPotentialProjectExtension = Path.GetExtension(actualProjectFiles[0]);
3621string secondPotentialProjectExtension = Path.GetExtension(actualProjectFiles[1]);
3676InitializationException.VerifyThrow(string.Equals(extension, Path.GetExtension(extension), StringComparison.OrdinalIgnoreCase), "InvalidExtensionToIgnore", extension, null, false);
4132if (!string.IsNullOrEmpty(logFileName) && !Path.IsPathRooted(logFileName))
4135$"logFile={Path.Combine(Directory.GetCurrentDirectory(), logFileName)}");
4152fileParameters += $"logFile={Path.Combine(Directory.GetCurrentDirectory(), msbuildLogFileName)}";
MSBuildTaskHost (67)
FileUtilities.cs (37)
52internal static string TempFileDirectory => Path.GetTempPath();
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
131internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
237fileSpec += Path.DirectorySeparatorChar;
277path.Substring(start) + Path.DirectorySeparatorChar);
370return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
400while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
492return NormalizePath(Path.Combine(directory, file));
517Path.HasExtension(uncheckedFullPath);
521return IsUNCPath(uncheckedFullPath) ? Path.GetFullPath(uncheckedFullPath) : uncheckedFullPath;
524return Path.GetFullPath(path);
566return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); // .Replace("//", "/");
716string directory = Path.GetDirectoryName(FixFilePath(fileSpec));
728directory += Path.DirectorySeparatorChar;
746if (Path.HasExtension(fileName))
768internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
783string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
797fullPath += Path.DirectorySeparatorChar;
861var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1171string fullBase = Path.GetFullPath(basePath);
1172string fullPath = Path.GetFullPath(path);
1181while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1212sb.Append("..").Append(Path.DirectorySeparatorChar);
1216sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1219if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1263return Path.IsPathRooted(FixFilePath(path));
1309return paths.Aggregate(root, Path.Combine);
1337var separator = Path.DirectorySeparatorChar;
1481string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1495lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1515if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
mscorlib (1)
Mvc.Analyzers.Test (1)
Mvc.Api.Analyzers.Test (3)
netstandard (1)
NonDISample (1)
PrepareTests (40)
MinimizeUtil.cs (27)
22var duplicateDirectory = Path.Combine(destinationDirectory, duplicateDirectoryName);
33var outputPath = Path.Combine(destinationDirectory, individualFile);
34var outputDirectory = Path.GetDirectoryName(outputPath)!;
35CreateHardLink(outputPath, Path.Combine(sourceDirectory, individualFile));
48var artifactsDir = Path.Combine(sourceDirectory, "artifacts/bin");
51Path.Combine(sourceDirectory, "eng"),
52Path.Combine(sourceDirectory, "artifacts", "VSSetup"),
75var currentDirName = Path.GetDirectoryName(sourceFilePath)!;
76var currentRelativeDirectory = Path.GetRelativePath(sourceDirectory, currentDirName);
77var currentOutputDirectory = Path.Combine(destinationDirectory, currentRelativeDirectory);
83var fileName = Path.GetFileName(sourceFilePath);
90RelativePath: Path.Combine(currentRelativeDirectory, fileName),
96var destFilePath = Path.Combine(currentOutputDirectory, fileName);
114var destFilePath = Path.Combine(destinationDirectory, item.RelativePath);
122string getPeFilePath(Guid mvid) => Path.Combine(duplicateDirectory, getPeFileName(mvid));
153rehydrateAllBuilder.AppendLine(@"bash """ + Path.Combine("$scriptroot", group.Key, "rehydrate.sh") + @"""");
158rehydrateAllBuilder.AppendLine("call " + Path.Combine("%~dp0", group.Key, "rehydrate.cmd"));
161File.WriteAllText(Path.Combine(destinationDirectory, group.Key, fileName), builder.ToString());
173var file = Path.Combine(destinationDirectory, noDuplicate.Key, fileName);
180File.WriteAllText(Path.Combine(destinationDirectory, rehydrateAllFilename), rehydrateAllBuilder.ToString());
189var destFileName = Path.GetRelativePath(group.Key, tuple.FilePath.RelativePath);
190if (Path.GetDirectoryName(destFileName) is { Length: not 0 } directory)
235var destFilePath = Path.GetRelativePath(group.Key, tuple.FilePath.RelativePath);
236if (Path.GetDirectoryName(destFilePath) is { Length: not 0 } directory)
261while (Path.GetFileName(Path.GetDirectoryName(groupDirectory)) is not (null or "Debug" or "Release"))
262groupDirectory = Path.GetDirectoryName(groupDirectory);
TestDiscovery.cs (13)
22var binDirectory = Path.Combine(repoRootDirectory, "artifacts", "bin");
24var testDiscoveryWorkerFolder = Path.Combine(binDirectory, "TestDiscoveryWorker");
61var dir = Path.GetDirectoryName(typeof(TestDiscovery).Assembly.Location);
62var tfm = Path.GetFileName(dir)!;
63var configuration = Path.GetFileName(Path.GetDirectoryName(dir))!;
70var testDiscoveryWorkerFolder = Path.Combine(binDirectory, "TestDiscoveryWorker");
71return (Path.Combine(testDiscoveryWorkerFolder, configuration, tfm, "TestDiscoveryWorker.dll"),
72Path.Combine(testDiscoveryWorkerFolder, configuration, "net472", "TestDiscoveryWorker.exe"));
89var pathToOutput = Path.Combine(Path.GetDirectoryName(pathToAssembly)!, "testlist.json");
119return Path.GetFileName(Path.GetDirectoryName(path)) != "net472";
PresentationBuildTasks (71)
PresentationCore (21)
PresentationCore.Tests (2)
PresentationFramework (20)
PresentationUI (11)
ReachFramework (4)
Replay (24)
ResultsOfTGenerator (2)
Roslyn.Compilers.Extension (4)
Roslyn.Diagnostics.Analyzers (7)
Roslyn.Test.Performance.Utilities (36)
Roslyn.VisualStudio.Next.UnitTests (24)
Remote\SnapshotSerializationTests.cs (7)
59.AddAnalyzerReference(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path1"), new TestAnalyzerAssemblyLoader()))
63.WithAnalyzerReferences([new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path2"), new TestAnalyzerAssemblyLoader())])
392var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
406var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
504var analyzer = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
538var analyzer = serializer.CreateChecksum(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing"), new MissingAnalyzerLoader()), CancellationToken.None);
567var tempCorlibXml = tempDir.CreateFile(Path.ChangeExtension(tempCorlib.Path, "xml"));
RulesetToEditorconfigConverter (4)
RulesetToEditorconfigConverter.UnitTests (6)
RunTests (49)
HelixTestRunner.cs (23)
70var payloadsDir = Path.Combine(options.ArtifactsDirectory, "payloads");
71var logsDir = Path.Combine(options.ArtifactsDirectory, "log", options.Configuration);
85var helixFilePath = Path.Combine(options.ArtifactsDirectory, "helix.proj");
88var arguments = $"build -bl:{Path.Combine(logsDir, "helix.binlog")} {helixFilePath}";
103File.Copy(helixFilePath, Path.Combine(logsDir, "helix.proj"));
155var duplicateDir = Path.Combine(Path.GetDirectoryName(artifactsDir)!, ".duplicate");
201var workItemPayloadDir = Path.Combine(payloadsDir, helixWorkItem.DisplayName);
204var binDir = Path.Combine(artifactsDir, "bin");
206.Select(x => Path.GetRelativePath(binDir, x))
211var name = Path.GetDirectoryName(assemblyRelativePath)!;
212var targetDir = Path.Combine(workItemPayloadDir, name);
213var sourceDir = Path.Combine(binDir, name);
214_ = Directory.CreateDirectory(Path.GetDirectoryName(targetDir)!);
220Path.Combine(workItemPayloadDir, rspFileName),
224File.WriteAllText(Path.Combine(workItemPayloadDir, commandFileName), commandContent);
227File.WriteAllText(Path.Combine(workItemPayloadDir, postCommandFileName), postCommandContent);
293var directoryName = Path.GetDirectoryName(assemblyRelativeFilePath);
395var globalJsonPath = Path.Join(path, "global.json");
400path = Path.GetDirectoryName(path);
477var relativePath = Path.GetRelativePath(payloadsDir, filePath);
478var destinationPath = Path.Combine(logsDir, relativePath);
479_ = Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)!);
SemanticSearch.BuildTask (5)
ServerComparison.FunctionalTests (4)
SignalR.Client.FunctionalTestApp (4)
Sockets.BindTests (3)
Sockets.FunctionalTests (5)
StaticFilesAuth (8)
Stress.ApiService (2)
Swaggatherer (3)
System.CodeDom (5)
System.ComponentModel.Annotations (1)
System.ComponentModel.Composition (3)
System.ComponentModel.TypeConverter (3)
System.Configuration.ConfigurationManager (41)
System.Console (4)
System.Data.Common (3)
System.Data.Odbc (1)
System.Diagnostics.FileVersionInfo (2)
System.Diagnostics.Process (12)
System.Diagnostics.TextWriterTraceListener (4)
System.Drawing.Common.Tests (19)
System.Formats.Tar (47)
System.IO.Compression (2)
System.IO.Compression.ZipFile (12)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (10)
System.IO.IsolatedStorage (18)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (6)
System.IO.Pipes (8)
System.IO.Ports (2)
System.Net.Mail (5)
System.Net.NetworkInformation (3)
System.Net.Ping (2)
System.Net.Quic (2)
System.Net.Sockets (2)
System.Net.WebClient (4)
System.Private.CoreLib (149)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (25)
56FileSystem.CopyFile(Path.GetFullPath(sourceFileName), Path.GetFullPath(destFileName), overwrite);
85FileSystem.DeleteFile(Path.GetFullPath(path));
101path = Path.GetFullPath(path);
171return SafeFileHandle.Open(Path.GetFullPath(path), mode, access, share, options, preallocationSize);
185=> FileSystem.SetCreationTime(Path.GetFullPath(path), creationTime, asDirectory: false);
216=> FileSystem.SetCreationTime(Path.GetFullPath(path), GetUtcDateTimeOffset(creationTimeUtc), asDirectory: false);
248=> FileSystem.GetCreationTime(Path.GetFullPath(path)).LocalDateTime;
273=> FileSystem.GetCreationTime(Path.GetFullPath(path)).UtcDateTime;
298=> FileSystem.SetLastAccessTime(Path.GetFullPath(path), lastAccessTime, false);
329=> FileSystem.SetLastAccessTime(Path.GetFullPath(path), GetUtcDateTimeOffset(lastAccessTimeUtc), false);
360=> FileSystem.GetLastAccessTime(Path.GetFullPath(path)).LocalDateTime;
385=> FileSystem.GetLastAccessTime(Path.GetFullPath(path)).UtcDateTime;
410=> FileSystem.SetLastWriteTime(Path.GetFullPath(path), lastWriteTime, false);
441=> FileSystem.SetLastWriteTime(Path.GetFullPath(path), GetUtcDateTimeOffset(lastWriteTimeUtc), false);
472=> FileSystem.GetLastWriteTime(Path.GetFullPath(path)).LocalDateTime;
497=> FileSystem.GetLastWriteTime(Path.GetFullPath(path)).UtcDateTime;
522=> FileSystem.GetAttributes(Path.GetFullPath(path));
546=> FileSystem.SetAttributes(Path.GetFullPath(path), fileAttributes);
1030Path.GetFullPath(sourceFileName),
1031Path.GetFullPath(destinationFileName),
1032destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null,
1052string fullSourceFileName = Path.GetFullPath(sourceFileName);
1053string fullDestFileName = Path.GetFullPath(destFileName);
1427string fullPath = Path.GetFullPath(path);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (11)
80if (Path.IsPathRooted(id) || IdContainsAnyDisallowedChars(id))
88string timeZoneFilePath = Path.Combine(timeZoneDirectory, id);
162var fileName = Path.Combine(GetTimeZoneDirectory(), TimeZoneFileName);
251symlinkPath = Path.GetFullPath(symlinkPath, Path.GetDirectoryName(tzFilePath)!);
271return Path.Join(currentPath.AsSpan(), direntName);
421string localtimeFilePath = Path.Combine(timeZoneDirectory, "localtime");
422string posixrulesFilePath = Path.Combine(timeZoneDirectory, "posixrules");
543TryLoadTzFile(Path.Combine(GetTimeZoneDirectory(), "localtime"), ref rawData, ref id);
560tzFilePath = Path.Combine(GetTimeZoneDirectory(), tzVariable);
620else if (!tzDirectory.EndsWith(Path.DirectorySeparatorChar))
System.Private.Windows.Core.TestUtilities (6)
System.Private.Xml (7)
System.Reflection.Metadata (3)
System.Reflection.MetadataLoadContext (4)
System.Runtime (1)
System.Runtime.Caching (2)
System.Runtime.Extensions (1)
System.Runtime.InteropServices (3)
System.Runtime.Serialization.Schema (1)
System.Security.Cryptography (11)
System.Text.RegularExpressions (1)
System.Windows.Forms (24)
System.Windows.Forms.Analyzers.Tests (27)
System.Windows.Forms.Design (3)
System.Windows.Forms.Design.Tests (4)
System.Windows.Forms.IntegrationTests.Common (6)
System.Windows.Forms.Primitives (6)
System.Windows.Forms.Primitives.Tests (1)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Primitives.TestUtilities.Tests (1)
System.Windows.Forms.Tests (60)
System.Windows.Forms.UI.IntegrationTests (20)
System.Xaml (1)
TaskUsageLogger (2)
Templates.Blazor.Tests (49)
BlazorWasmTemplateTest.cs (9)
29var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
30Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
105var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
109Assert.False(File.Exists(Path.Combine(publishDir, "service-worker.published.js")), "service-worker.published.js should not be published");
110Assert.True(File.Exists(Path.Combine(publishDir, "service-worker.js")), "service-worker.js should be published");
111Assert.True(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "service-worker-assets.js should be published");
127var fullPath = Path.Combine(basePath, path);
131return File.ReadAllText(Path.Combine(basePath, path));
166var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
src\ProjectTemplates\Shared\Project.cs (9)
56public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework, RuntimeIdentifier);
57public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, RuntimeIdentifier, "publish");
208var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll");
223var projectDll = Path.Combine(TemplatePublishDir, $"{ProjectName}.dll");
270var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");
299var fullPath = Path.Combine(TemplateOutputDir, path);
411return File.ReadAllText(Path.Combine(TemplateOutputDir, path));
533var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog");
535var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog");
Templates.Blazor.WebAssembly.Auth.Tests (45)
src\ProjectTemplates\Shared\Project.cs (9)
56public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework, RuntimeIdentifier);
57public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, RuntimeIdentifier, "publish");
208var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll");
223var projectDll = Path.Combine(TemplatePublishDir, $"{ProjectName}.dll");
270var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");
299var fullPath = Path.Combine(TemplateOutputDir, path);
411return File.ReadAllText(Path.Combine(TemplateOutputDir, path));
533var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog");
535var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog");
Templates.Blazor.WebAssembly.Tests (53)
BlazorWasmTemplateTest.cs (8)
35var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
36Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
45var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
46Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
55var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
56Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
65var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
66Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
src\ProjectTemplates\Shared\Project.cs (9)
56public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework, RuntimeIdentifier);
57public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, RuntimeIdentifier, "publish");
208var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll");
223var projectDll = Path.Combine(TemplatePublishDir, $"{ProjectName}.dll");
270var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");
299var fullPath = Path.Combine(TemplateOutputDir, path);
411return File.ReadAllText(Path.Combine(TemplateOutputDir, path));
533var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog");
535var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog");
Templates.Mvc.Tests (51)
src\ProjectTemplates\Shared\Project.cs (9)
56public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework, RuntimeIdentifier);
57public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, RuntimeIdentifier, "publish");
208var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll");
223var projectDll = Path.Combine(TemplatePublishDir, $"{ProjectName}.dll");
270var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");
299var fullPath = Path.Combine(TemplateOutputDir, path);
411return File.ReadAllText(Path.Combine(TemplateOutputDir, path));
533var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog");
535var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog");
Templates.Tests (53)
src\ProjectTemplates\Shared\Project.cs (9)
56public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework, RuntimeIdentifier);
57public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, RuntimeIdentifier, "publish");
208var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll");
223var projectDll = Path.Combine(TemplatePublishDir, $"{ProjectName}.dll");
270var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");
299var fullPath = Path.Combine(TemplateOutputDir, path);
411return File.ReadAllText(Path.Combine(TemplateOutputDir, path));
533var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog");
535var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog");
Test.Utilities (7)
TestDiscoveryWorker (3)
TestPassApp (2)
TestProject.AppHost (1)
TestTasks (3)
Text.Analyzers (7)
UIAutomationClient (1)
vbc (13)
VBCSCompiler (17)
VBCSCompiler.UnitTests (41)
CompilerServerTests.cs (21)
101var filePath = Path.Combine(currentDirectory.Path, "netstandard.dll");
200clientDir: Path.GetDirectoryName(typeof(CommonCompiler).Assembly.Location),
203tempDir: Path.GetTempPath());
257return new DisposableFile(Path.Combine(directory.Path, resultFileName));
264var result = ProcessUtilities.Run(file.Path, "", Path.GetDirectoryName(file.Path));
450var basePath = Path.GetDirectoryName(typeof(CompilerServerUnitTests).Assembly.Location);
451var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
559Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
589Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
606Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
624Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
649Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
667Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
696Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hellovb.exe")));
725Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
1063$"src1.cs /shared:{serverData.PipeName} /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1114$"src1.vb /shared:{serverData.PipeName} /vbruntime* /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1397var tmp = Path.Combine(_tempDirectory.Path, "Temp");
1431var tmp = Path.Combine(_tempDirectory.Path, "Temp");
1460var basePath = Path.GetDirectoryName(typeof(CompilerServerUnitTests).Assembly.Location);
1461var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
TouchedFileLoggingTests.cs (6)
60var touchedBase = Path.Combine(touchedDir.Path, "touched");
69new BuildPaths(clientDirectory, _baseDirectory, RuntimeEnvironment.GetRuntimeDirectory(), Path.GetTempPath()),
77Path.ChangeExtension(source1, "exe"),
111var touchedBase = Path.Combine(touchedDir.Path, "touched");
120new BuildPaths(clientDirectory, _baseDirectory, RuntimeEnvironment.GetRuntimeDirectory(), Path.GetTempPath()),
128Path.ChangeExtension(source1, "exe"),
vbi (3)
VisualBasicSyntaxGenerator (6)
Wasm.Performance.ConsoleHost (3)
WindowsBase.Tests (2)
WinFormsControlsTest (11)
xunit.console (39)