3 writes to RelativePath
Microsoft.Build (3)
Construction\Solution\SolutionFile.cs (3)
387RelativePath = projectModel.FilePath, 1198RelativePath = Path.Combine(etpProjectRelativeDir, fileElementValue) 1509proj.RelativePath = match.Groups["RELATIVEPATH"].Value.Trim();
66 references to RelativePath
Microsoft.Build (23)
Construction\Solution\SolutionFile.cs (18)
415if (IsEtpProjectFile(proj.RelativePath)) 839if (Uri.TryCreate(proj.RelativePath, UriKind.Absolute, out Uri uri)) 911projectPaths.Add(FileUtilities.FixFilePath(project.RelativePath)); 1129if (IsEtpProjectFile(proj.RelativePath)) 1144string fullPathToEtpProj = Path.Combine(SolutionFileDirectory, etpProj.RelativePath); 1145string etpProjectRelativeDir = Path.GetDirectoryName(etpProj.RelativePath); 1204proj.ProjectName = proj.RelativePath; 1232etpProj.RelativePath, e.Message); 1241etpProj.RelativePath, e.Message); 1250etpProj.RelativePath, e.Message); 1259etpProj.RelativePath, e.Message); 1268etpProj.RelativePath, e.Message); 1303ErrorUtilities.VerifyThrow(proj.RelativePath != null, "Project relative path cannot be null."); 1306ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.RelativePath.AsSpan().IndexOfAny(MSBuildConstants.InvalidPathChars) < 0, 1310proj.ProjectName, proj.RelativePath); 1313ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.RelativePath.Length > 0, 1557ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(FullPath), "ProjectUpgradeNeededToVcxProj", proj.RelativePath); 1889return proj.RelativePath;
Construction\Solution\SolutionProjectGenerator.cs (5)
654if (!solutionFile.ProjectShouldBuild(project.RelativePath)) 1891project.RelativePath); 1902project.RelativePath, 2197new BuildEventFileInfo(project.RelativePath), 2199project.RelativePath,
Microsoft.Build.Engine.OM.UnitTests (11)
Construction\SolutionFile_Tests.cs (11)
100Assert.Equal(ConvertToUnixPathIfNeeded("Relative path\\to\\Project name.myvctype", convertToSlnx || isOptInSlnParsingWithNewParser), solution.ProjectsInOrder[0].RelativePath); 152Assert.Equal("src\\.proj", solution.ProjectsInOrder[0].RelativePath); 208Assert.Equal(ConvertToUnixPathIfNeeded("ConsoleApplication1\\ConsoleApplication1.vbproj", usesNewParser), consoleApplication1.RelativePath); 213Assert.Equal(ConvertToUnixPathIfNeeded("vbClassLibrary\\vbClassLibrary.vbproj", usesNewParser), vbClassLibrary.RelativePath); 218Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser), classLibrary1.RelativePath); 292.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser)); 298.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("MyPhysicalFolder\\ClassLibrary1\\ClassLibrary1.csproj", usesNewParser)); 303.FirstOrDefault(p => p.RelativePath == ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj", usesNewParser)); 382Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser), classLibrary1.RelativePath); 387Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj", usesNewParser), classLibrary2.RelativePath); 394Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary3\\ClassLibrary3.csproj", usesNewParser), solution.ProjectsInOrder[2].RelativePath);
Microsoft.Build.Engine.UnitTests (31)
Construction\SolutionFile_NewParser_Tests.cs (1)
86solution.ProjectsInOrder[0].RelativePath.ShouldBe(ConvertToUnixPathIfNeeded(@"C:\WebSites\WebApplication3\"));
Construction\SolutionFile_OldParser_Tests.cs (29)
44proj.RelativePath.ShouldBe("Relative path to project file"); 85proj.RelativePath.ShouldBe("Relative path\\to\\Project name.myvctype"); 104proj.RelativePath.ShouldBe("Relative path to project file"); 140Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 160proj.RelativePath.ShouldBe("src\\.proj"); 205solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 206solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2.csproj"); 395solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 396solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 397solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1.csproj"); 610solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"someproj.etp"); 611solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"someproj2.etp"); 612solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ETPProjUpgradeTest\someproj3.etp"); 613solution.ProjectsInOrder[3].RelativePath.ShouldBe(Path.Combine("ETPProjUpgradeTest", "..", "SomeFolder", "ClassLibrary1.csproj")); 723proj.RelativePath.ShouldBe("Relative path to project file"); 760Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 786proj.RelativePath.ShouldBe(Path.Combine("RelativePath", "project file")); 985solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ConsoleApplication1\ConsoleApplication1.vbproj"); 993solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"vbClassLibrary\vbClassLibrary.vbproj"); 1001solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1009solution.ProjectsInOrder[3].RelativePath.ShouldBe(@"cpsFsProject\ProjectFileName.fsproj"); 1071solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1083solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"MyPhysicalFolder\ClassLibrary1\ClassLibrary1.csproj"); 1095solution.ProjectsInOrder[4].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1468solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj"); 1475solution.ProjectsInOrder[1].RelativePath.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj"); 1483solution.ProjectsInOrder[2].RelativePath.ShouldBe(@"ClassLibrary3\ClassLibrary3.csproj"); 1545solution.ProjectsInOrder[0].RelativePath.ShouldBe(@"C:\WebSites\WebApplication3\"); 2428solution.ProjectsInOrder[0].RelativePath.ShouldBe(expectedRelativePath);
Construction\SolutionProjectGenerator_Tests.cs (1)
2847projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.RelativePath));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
211projectPaths.Add(project.RelativePath);