Skip to content

Commit b4ba231

Browse files
committed
Made both sln creation parts use relative paths instead of full paths.
1 parent d6a6e8e commit b4ba231

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

build.proj

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@
221221
<ItemGroup>
222222
<ModuleCsprojFiles Include="$(LibraryRoot)src/ResourceManager/**/*.csproj" Exclude="$(LibraryRoot)src/ResourceManager/**/*.Test.Netcore.csproj" />
223223
</ItemGroup>
224-
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFiles->'%(FullPath)', ' ')" />
224+
<!-- https://stackoverflow.com/a/35477012/294804 -->
225+
<ItemGroup>
226+
<ModuleCsprojFilesRelative Include="@(ModuleCsprojFiles)">
227+
<RelativePath>$([MSBuild]::MakeRelative($(LibraryRoot), %(ModuleCsprojFiles.FullPath)))</RelativePath>
228+
</ModuleCsprojFilesRelative>
229+
</ItemGroup>
230+
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFilesRelative->'%(RelativePath)', ' ')" />
225231
<Exec Command="dotnet sln Azure.PowerShell.sln add $(LibraryRoot)tools/Tools.Common/Tools.Common.Netcore.csproj $(LibraryRoot)tools/StaticAnalysis/StaticAnalysis.Netcore.csproj" />
226232
<Exec Command="dotnet publish Azure.PowerShell.sln -c $(Configuration)" />
227233

@@ -375,7 +381,13 @@
375381
<ItemGroup>
376382
<ModuleCsprojFiles Include="$(LibraryRoot)src/ResourceManager/**/*.csproj" />
377383
</ItemGroup>
378-
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFiles->'%(FullPath)', ' ')" />
384+
<!-- https://stackoverflow.com/a/35477012/294804 -->
385+
<ItemGroup>
386+
<ModuleCsprojFilesRelative Include="@(ModuleCsprojFiles)">
387+
<RelativePath>$([MSBuild]::MakeRelative($(LibraryRoot), %(ModuleCsprojFiles.FullPath)))</RelativePath>
388+
</ModuleCsprojFilesRelative>
389+
</ItemGroup>
390+
<Exec Command="dotnet sln Azure.PowerShell.sln add @(ModuleCsprojFilesRelative->'%(RelativePath)', ' ')" />
379391
<!-- https://github.com/Microsoft/msbuild/issues/3157#issuecomment-378002971 -->
380392
<!-- https://github.com/xunit/xunit/issues/1154#issuecomment-405366373 -->
381393
<Exec Command="dotnet test Azure.PowerShell.sln --filter &quot;AcceptanceType=CheckIn%26RunType!=DesktopOnly&quot; --configuration $(Configuration) --framework netcoreapp2.0 --logger trx" />

0 commit comments

Comments
 (0)