Skip to content

Commit 62f6ab5

Browse files
committed
Add all necessary runtimes for template tests.
1 parent 0a0e0c4 commit 62f6ab5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/Shared/Aspire.Templates.Testing.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@
7171
</ItemGroup>
7272
<Copy SourceFiles="@(_SdkCurrentFile)" DestinationFolder="$(SdkDirForCurrentAndPreviousTFM)\%(RecursiveDir)" SkipUnchangedFiles="true" />
7373

74-
<!-- 3. Install previous runtimes -->
74+
<!-- 3. Install both current runtimes (.NET 9) and previous runtimes (.NET 8) -->
75+
<Exec Condition="'%(CurrentRuntimeToInstallArguments.Identity)' != '' and !$([MSBuild]::IsOSPlatform('windows'))"
76+
IgnoreStandardErrorWarningFormat="true"
77+
Command="$(_DotNetInstallScriptPath) -InstallDir $(SdkDirForCurrentAndPreviousTFM) -SkipNonVersionedFiles %(CurrentRuntimeToInstallArguments.Identity)" />
78+
79+
<Exec Condition="'%(CurrentRuntimeToInstallArguments.Identity)' != '' and $([MSBuild]::IsOSPlatform('windows'))"
80+
IgnoreStandardErrorWarningFormat="true"
81+
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "&amp; $(_DotNetInstallScriptPath) -InstallDir $(SdkDirForCurrentAndPreviousTFM) -SkipNonVersionedFiles %(CurrentRuntimeToInstallArguments.Identity)"' />
82+
7583
<Exec Condition="'%(PreviousRuntimeToInstallArguments.Identity)' != '' and !$([MSBuild]::IsOSPlatform('windows'))"
7684
IgnoreStandardErrorWarningFormat="true"
7785
Command="$(_DotNetInstallScriptPath) -InstallDir $(SdkDirForCurrentAndPreviousTFM) -SkipNonVersionedFiles %(PreviousRuntimeToInstallArguments.Identity)" />

0 commit comments

Comments
 (0)