3 writes to RelativePath
Microsoft.Build (3)
Construction\Solution\SolutionFile.cs (3)
386RelativePath = projectModel.FilePath, 1197RelativePath = Path.Combine(etpProjectRelativeDir, fileElementValue) 1508proj.RelativePath = match.Groups["RELATIVEPATH"].Value.Trim();
67 references to RelativePath
Microsoft.Build (25)
Construction\Solution\SolutionFile.cs (18)
414if (IsEtpProjectFile(proj.RelativePath)) 838if (Uri.TryCreate(proj.RelativePath, UriKind.Absolute, out Uri uri)) 910projectPaths.Add(FileUtilities.NormalizePathSeparatorsToForwardSlash(project.RelativePath)); 1128if (IsEtpProjectFile(proj.RelativePath)) 1143string fullPathToEtpProj = Path.Combine(SolutionFileDirectory, etpProj.RelativePath); 1144string etpProjectRelativeDir = Path.GetDirectoryName(etpProj.RelativePath); 1203proj.ProjectName = proj.RelativePath; 1231etpProj.RelativePath, e.Message); 1240etpProj.RelativePath, e.Message); 1249etpProj.RelativePath, e.Message); 1258etpProj.RelativePath, e.Message); 1267etpProj.RelativePath, e.Message); 1302ErrorUtilities.VerifyThrow(proj.RelativePath != null, "Project relative path cannot be null."); 1305ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.RelativePath.AsSpan().IndexOfAny(MSBuildConstants.InvalidPathChars) < 0, 1309proj.ProjectName, proj.RelativePath); 1312ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.RelativePath.Length > 0, 1556ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(FullPath), "ProjectUpgradeNeededToVcxProj", proj.RelativePath); 1888return proj.RelativePath;
Construction\Solution\SolutionProjectGenerator.cs (7)
654if (!solutionFile.ProjectShouldBuild(project.RelativePath)) 1649referencedProject.RelativePath, 1736project.RelativePath, 1891project.RelativePath); 1902project.RelativePath, 2197new BuildEventFileInfo(project.RelativePath), 2199project.RelativePath,
Microsoft.Build.Engine.OM.UnitTests (11)
Construction\SolutionFile_Tests.cs (11)
101Assert.Equal(ConvertToUnixPathIfNeeded("Relative path\\to\\Project name.myvctype", convertToSlnx || isOptInSlnParsingWithNewParser), solution.ProjectsInOrder[0].RelativePath); 153Assert.Equal("src\\.proj", solution.ProjectsInOrder[0].RelativePath); 209Assert.Equal(ConvertToUnixPathIfNeeded("ConsoleApplication1\\ConsoleApplication1.vbproj", usesNewParser), consoleApplication1.RelativePath); 214Assert.Equal(ConvertToUnixPathIfNeeded("vbClassLibrary\\vbClassLibrary.vbproj", usesNewParser), vbClassLibrary.RelativePath); 219Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser), classLibrary1.RelativePath); 293.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser)); 299.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("MyPhysicalFolder\\ClassLibrary1\\ClassLibrary1.csproj", usesNewParser)); 304.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj", usesNewParser)); 383Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser), classLibrary1.RelativePath); 388Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj", usesNewParser), classLibrary2.RelativePath); 395Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary3\\ClassLibrary3.csproj", usesNewParser), solution.ProjectsInOrder[2].RelativePath);
Microsoft.Build.Engine.UnitTests (31)
Construction\SolutionFile_NewParser_Tests.cs (1)
87solution.ProjectsInOrder[0].RelativePath.ShouldBe(ConvertToUnixPathIfNeeded(@"C:\WebSites\WebApplication3\"));
Construction\SolutionFile_OldParser_Tests.cs (29)
45proj.RelativePath.ShouldBe("Relative path to project file"); 84proj.RelativePath.ShouldBe("Relative path\\to\\Project name.myvctype"); 103proj.RelativePath.ShouldBe("Relative path to project file"); 139Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 159proj.RelativePath.ShouldBe("src\\.proj"); 204solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 205solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2.csproj"); 394solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 395solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 396solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1.csproj"); 609solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 610solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 613solution.ProjectsInOrder[2].RelativePath.ShouldBe(expectedPath3); 614solution.ProjectsInOrder[3].RelativePath.ShouldBe(Path.Combine("ETPProjUpgradeTest", "..", "SomeFolder", "ClassLibrary1.csproj")); 724proj.RelativePath.ShouldBe("Relative path to project file"); 761Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 787proj.RelativePath.ShouldBe(Path.Combine("RelativePath", "project file")); 986solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ConsoleApplication1\ConsoleApplication1.vbproj"); 994solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"vbClassLibrary\vbClassLibrary.vbproj"); 1002solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1010solution.ProjectsInOrder[3].RelativePath.ShouldBe(@"cpsFsProject\ProjectFileName.fsproj"); 1072solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1084solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"MyPhysicalFolder\ClassLibrary1\ClassLibrary1.csproj"); 1096solution.ProjectsInOrder[4].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1469solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1476solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1484solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary3\ClassLibrary3.csproj"); 1546solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"C:\WebSites\WebApplication3\"); 2429solution.ProjectsInOrder[0].RelativePath.ShouldBe(expectedRelativePath);
Construction\SolutionProjectGenerator_Tests.cs (1)
2847projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.RelativePath));