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