Skip to content

Commit dee1bc5

Browse files
committed
Fix Build.proj
1 parent a597c71 commit dee1bc5

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

eng/Build.proj

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,11 @@
5050

5151
<Exec Command="dotnet --info" WorkingDirectory="$(ArtifactsDir)" />
5252

53-
<!-- Due to bug https://github.com/dotnet/sdk/issues/47008 we cannot pass paths that contain drive letters to "dotnet sln add".
54-
We do some contortion here to make the paths relative, and run them from the root directory. This code is a big ugly because
55-
there's no Path.GetRelativePath on .NET Framework. -->
56-
<PropertyGroup>
57-
<DriveRootPath>$([System.IO.Path]::GetPathRoot('$(ArtifactsDir)'))</DriveRootPath>
58-
<ArtifactsDirRelative>$([System.String]::Copy('$(ArtifactsDir)').Substring(3))</ArtifactsDirRelative>
59-
</PropertyGroup>
60-
6153
<!-- Create the solution. Use 'force' to override existing. -->
6254
<Exec Command="dotnet new sln -n $(MSBuildProjectName) -o $(ArtifactsDir) --force" WorkingDirectory="$(DriveRootPath)" />
6355

64-
<!-- Strip the drive letter and backslash, e.g. D:\ => -->
65-
<ItemGroup>
66-
<BuildProjectWithRel Include="@(BuildProject)">
67-
<!-- Trim the first three characters: D:\ -->
68-
<RelPath>$([System.String]::Copy('%(BuildProject.FullPath)').Substring(3))</RelPath>
69-
</BuildProjectWithRel>
70-
</ItemGroup>
71-
7256
<!-- Add each BuildProject to the solution. -->
73-
<Exec Command="dotnet sln &quot;$(ArtifactsDirRelative)/$(MSBuildProjectName).sln&quot; add &quot;%(BuildProjectWithRel.RelPath)&quot;" WorkingDirectory="$(DriveRootPath)" />
57+
<Exec Command="dotnet sln &quot;$(ArtifactsDir)$(MSBuildProjectName).sln&quot; add &quot;%(BuildProject.FullPath)&quot;" />
7458

7559
<!-- Build the solution. -->
7660
<MSBuild Projects="$(ArtifactsDir)$(MSBuildProjectName).sln" Targets="@(BuildTarget)" BuildInParallel="true" Condition="'@(BuildTarget)' != ''" />

0 commit comments

Comments
 (0)