File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change 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 " $(ArtifactsDirRelative)/ $(MSBuildProjectName).sln" add " %(BuildProjectWithRel.RelPath )" " WorkingDirectory = " $(DriveRootPath) " />
57+ <Exec Command =" dotnet sln " $(ArtifactsDir) $(MSBuildProjectName).sln" add " %(BuildProject.FullPath )" " />
7458
7559 <!-- Build the solution. -->
7660 <MSBuild Projects =" $(ArtifactsDir)$(MSBuildProjectName).sln" Targets =" @(BuildTarget)" BuildInParallel =" true" Condition =" '@(BuildTarget)' != ''" />
You can’t perform that action at this time.
0 commit comments