Skip to content

Commit bd9a008

Browse files
authored
Include more DLLs in redist fast path target (#52551)
1 parent 679f4d5 commit bd9a008

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/Cli/dotnet/dotnet.csproj

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,23 @@
9999
</ItemGroup>
100100

101101
<!-- NOTE: only works for fast-path code changes -->
102-
<Target Name="CopyToRedistFastPath" AfterTargets="AfterBuild">
102+
<PropertyGroup>
103+
<CollectUpToDateCheckBuiltDesignTimeDependsOn>$(CollectUpToDateCheckBuiltDesignTimeDependsOn);PrepareCopyToRedistFastPath</CollectUpToDateCheckBuiltDesignTimeDependsOn>
104+
</PropertyGroup>
105+
<ItemGroup>
106+
<_CopyToRedistFastPathFile Include="$(TargetPath)" />
107+
<_CopyToRedistFastPathFile Include="$(ArtifactsBinDir)Microsoft.DotNet.ProjectTools\$(Configuration)\$(SdkTargetFramework)\Microsoft.DotNet.ProjectTools.dll" />
108+
<_CopyToRedistFastPathFile Include="$(ArtifactsBinDir)Tests\Microsoft.DotNet.Cli.Utils\$(Configuration)\$(SdkTargetFramework)\Microsoft.DotNet.Cli.Utils.dll" />
109+
</ItemGroup>
110+
<Target Name="PrepareCopyToRedistFastPath">
103111
<PropertyGroup>
104-
<DestinationPath>$([System.IO.Path]::Combine($(TestHostDotNetRoot), "sdk", $(Version)))</DestinationPath>
112+
<_RedistDestinationFolder>$([System.IO.Path]::Combine($(TestHostDotNetRoot), "sdk", $(Version)))</_RedistDestinationFolder>
105113
</PropertyGroup>
106-
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(DestinationPath)" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" />
114+
<ItemGroup>
115+
<UpToDateCheckBuilt Include="@(_CopyToRedistFastPathFile->'$(_RedistDestinationFolder)\%(FileName)%(Extension)')" Original="%(Identity)" />
116+
</ItemGroup>
117+
</Target>
118+
<Target Name="CopyToRedistFastPath" DependsOnTargets="PrepareCopyToRedistFastPath" AfterTargets="AfterBuild">
119+
<Copy SourceFiles="@(_CopyToRedistFastPathFile)" DestinationFolder="$(_RedistDestinationFolder)" SkipUnchangedFiles="true" OverwriteReadOnlyFiles="true" />
107120
</Target>
108121
</Project>

0 commit comments

Comments
 (0)