3 writes to RelativePath
Microsoft.Build (3)
Construction\Solution\SolutionFile.cs (3)
387
RelativePath
= projectModel.FilePath,
1198
RelativePath
= Path.Combine(etpProjectRelativeDir, fileElementValue)
1509
proj.
RelativePath
= match.Groups["RELATIVEPATH"].Value.Trim();
66 references to RelativePath
Microsoft.Build (23)
Construction\Solution\SolutionFile.cs (18)
415
if (IsEtpProjectFile(proj.
RelativePath
))
839
if (Uri.TryCreate(proj.
RelativePath
, UriKind.Absolute, out Uri uri))
911
projectPaths.Add(FileUtilities.FixFilePath(project.
RelativePath
));
1129
if (IsEtpProjectFile(proj.
RelativePath
))
1144
string fullPathToEtpProj = Path.Combine(SolutionFileDirectory, etpProj.
RelativePath
);
1145
string etpProjectRelativeDir = Path.GetDirectoryName(etpProj.
RelativePath
);
1204
proj.ProjectName = proj.
RelativePath
;
1232
etpProj.
RelativePath
, e.Message);
1241
etpProj.
RelativePath
, e.Message);
1250
etpProj.
RelativePath
, e.Message);
1259
etpProj.
RelativePath
, e.Message);
1268
etpProj.
RelativePath
, e.Message);
1303
ErrorUtilities.VerifyThrow(proj.
RelativePath
!= null, "Project relative path cannot be null.");
1306
ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.
RelativePath
.AsSpan().IndexOfAny(MSBuildConstants.InvalidPathChars) < 0,
1310
proj.ProjectName, proj.
RelativePath
);
1313
ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(proj.
RelativePath
.Length > 0,
1557
ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(FullPath), "ProjectUpgradeNeededToVcxProj", proj.
RelativePath
);
1889
return proj.
RelativePath
;
Construction\Solution\SolutionProjectGenerator.cs (5)
654
if (!solutionFile.ProjectShouldBuild(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)
100
Assert.Equal(ConvertToUnixPathIfNeeded("Relative path\\to\\Project name.myvctype", convertToSlnx || isOptInSlnParsingWithNewParser), solution.ProjectsInOrder[0].
RelativePath
);
152
Assert.Equal("src\\.proj", solution.ProjectsInOrder[0].
RelativePath
);
208
Assert.Equal(ConvertToUnixPathIfNeeded("ConsoleApplication1\\ConsoleApplication1.vbproj", usesNewParser), consoleApplication1.
RelativePath
);
213
Assert.Equal(ConvertToUnixPathIfNeeded("vbClassLibrary\\vbClassLibrary.vbproj", usesNewParser), vbClassLibrary.
RelativePath
);
218
Assert.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));
382
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary1\\ClassLibrary1.csproj", usesNewParser), classLibrary1.
RelativePath
);
387
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary2\\ClassLibrary2.csproj", usesNewParser), classLibrary2.
RelativePath
);
394
Assert.Equal(ConvertToUnixPathIfNeeded("ClassLibrary3\\ClassLibrary3.csproj", usesNewParser), solution.ProjectsInOrder[2].
RelativePath
);
Microsoft.Build.Engine.UnitTests (31)
Construction\SolutionFile_NewParser_Tests.cs (1)
86
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)
2847
projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.
RelativePath
));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
211
projectPaths.Add(project.
RelativePath
);