3 writes to RelativePath
Microsoft.Build (3)
Construction\Solution\SolutionFile.cs (3)
371
RelativePath
= projectModel.FilePath,
1176
RelativePath
= Path.Combine(etpProjectRelativeDir, fileElementValue)
1511
proj.
RelativePath
= match.Groups["RELATIVEPATH"].Value.Trim();
67 references to RelativePath
Microsoft.Build (25)
Construction\Solution\SolutionFile.cs (18)
399
if (IsEtpProjectFile(proj.
RelativePath
))
817
if (Uri.TryCreate(proj.
RelativePath
, UriKind.Absolute, out Uri uri))
889
projectPaths.Add(FileUtilities.FixFilePath(project.
RelativePath
));
1107
if (IsEtpProjectFile(proj.
RelativePath
))
1122
string fullPathToEtpProj = Path.Combine(SolutionFileDirectory, etpProj.
RelativePath
);
1123
string etpProjectRelativeDir = Path.GetDirectoryName(etpProj.
RelativePath
);
1182
proj.ProjectName = proj.
RelativePath
;
1210
etpProj.
RelativePath
, e.Message);
1219
etpProj.
RelativePath
, e.Message);
1228
etpProj.
RelativePath
, e.Message);
1237
etpProj.
RelativePath
, e.Message);
1246
etpProj.
RelativePath
, e.Message);
1281
ErrorUtilities.VerifyThrow(proj.
RelativePath
!= null, "Project relative path cannot be null.");
1284
ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.
RelativePath
.IndexOfAny(Path.GetInvalidPathChars()) == -1,
1288
proj.ProjectName, proj.
RelativePath
);
1291
ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.
RelativePath
.Length > 0,
1559
ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(FullPath), "ProjectUpgradeNeededToVcxProj", proj.
RelativePath
);
1893
return proj.
RelativePath
;
Construction\Solution\SolutionProjectGenerator.cs (7)
654
if (!solutionFile.ProjectShouldBuild(project.
RelativePath
))
1636
referencedProject.
RelativePath
,
1723
project.
RelativePath
,
1878
project.
RelativePath
);
1889
project.
RelativePath
,
2184
new BuildEventFileInfo(project.
RelativePath
),
2186
project.
RelativePath
,
Microsoft.Build.Engine.OM.UnitTests (10)
Construction\SolutionFile_Tests.cs (10)
100
Assert.Equal(ConvertToUnixPathIfNeeded("Relative path\\to\\Project name.myvctype"), solution.ProjectsInOrder[0].
RelativePath
);
193
Assert.Equal(ConvertToUnixPathIfNeeded("ConsoleApplication1\\ConsoleApplication1.vbproj"), consoleApplication1.
RelativePath
);
198
Assert.Equal(ConvertToUnixPathIfNeeded("vbClassLibrary\\vbClassLibrary.vbproj"), vbClassLibrary.
RelativePath
);
203
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj"), classLibrary1.
RelativePath
);
274
.FirstOrDefault(p => p.
RelativePath
== ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj"));
280
.FirstOrDefault(p => p.
RelativePath
== ConvertToUnixPathIfNeeded("MyPhysicalFolder\\ClassLibrary1\\ClassLibrary1.csproj"));
285
.FirstOrDefault(p => p.
RelativePath
== ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj"));
362
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj"), classLibrary1.
RelativePath
);
367
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj"), classLibrary2.
RelativePath
);
374
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary3\\ClassLibrary3.csproj"), solution.ProjectsInOrder[2].
RelativePath
);
Microsoft.Build.Engine.UnitTests (31)
Construction\SolutionFile_NewParser_Tests.cs (1)
89
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(ConvertToUnixPathIfNeeded(@"C:\WebSites\WebApplication3\"));
Construction\SolutionFile_OldParser_Tests.cs (29)
44
proj.
RelativePath
.ShouldBe("Relative path to project file");
85
proj.
RelativePath
.ShouldBe("Relative path\\to\\Project name.myvctype");
104
proj.
RelativePath
.ShouldBe("Relative path to project file");
140
Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].
RelativePath
);
160
proj.
RelativePath
.ShouldBe("src\\.proj");
205
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
206
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"ClassLibrary2.csproj");
395
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
396
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"someproj2.etp");
397
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"ClassLibrary1.csproj");
610
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
611
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"someproj2.etp");
612
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"ETPProjUpgradeTest\someproj3.etp");
613
solution.ProjectsInOrder[3].
RelativePath
.ShouldBe(Path.Combine("ETPProjUpgradeTest", "..", "SomeFolder", "ClassLibrary1.csproj"));
723
proj.
RelativePath
.ShouldBe("Relative path to project file");
760
Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].
RelativePath
);
786
proj.
RelativePath
.ShouldBe(Path.Combine("RelativePath", "project file"));
985
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"ConsoleApplication1\ConsoleApplication1.vbproj");
993
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"vbClassLibrary\vbClassLibrary.vbproj");
1001
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj");
1009
solution.ProjectsInOrder[3].
RelativePath
.ShouldBe(@"cpsFsProject\ProjectFileName.fsproj");
1071
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj");
1083
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"MyPhysicalFolder\ClassLibrary1\ClassLibrary1.csproj");
1095
solution.ProjectsInOrder[4].
RelativePath
.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj");
1468
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"ClassLibrary1\ClassLibrary1.csproj");
1475
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"ClassLibrary2\ClassLibrary2.csproj");
1483
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"ClassLibrary3\ClassLibrary3.csproj");
1545
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"C:\WebSites\WebApplication3\");
2428
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(expectedRelativePath);
Construction\SolutionProjectGenerator_Tests.cs (1)
2757
projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.
RelativePath
));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
211
projectPaths.Add(project.
RelativePath
);