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();
65 references to RelativePath
Microsoft.Build (23)
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 (5)
701
if (!solutionFile.ProjectShouldBuild(project.
RelativePath
))
1948
project.
RelativePath
);
1959
project.
RelativePath
,
2254
new BuildEventFileInfo(project.
RelativePath
),
2256
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)
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");
83
proj.
RelativePath
.ShouldBe("Relative path\\to\\Project name.myvctype");
102
proj.
RelativePath
.ShouldBe("Relative path to project file");
138
Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].
RelativePath
);
158
proj.
RelativePath
.ShouldBe("src\\.proj");
203
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
204
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"ClassLibrary2.csproj");
393
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
394
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"someproj2.etp");
395
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(@"ClassLibrary1.csproj");
608
solution.ProjectsInOrder[0].
RelativePath
.ShouldBe(@"someproj.etp");
609
solution.ProjectsInOrder[1].
RelativePath
.ShouldBe(@"someproj2.etp");
612
solution.ProjectsInOrder[2].
RelativePath
.ShouldBe(expectedPath3);
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)
2846
projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.
RelativePath
));