Skip to content

Commit 50992cc

Browse files
committed
Fix copying interop .dll to output folders
1 parent 183ca65 commit 50992cc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ Copyright (c) .NET Foundation. All rights reserved.
306306
<Private>true</Private>
307307
<MSBuildSourceTargetName>_RunCsWinRTGenerator</MSBuildSourceTargetName>
308308
<Platforms>AnyCPU</Platforms>
309-
<CopyLocal>true</CopyLocal>
310309
</CsWinRTGeneratorInteropAssemblyPath>
311310
</ItemGroup>
312311

@@ -316,17 +315,15 @@ Copyright (c) .NET Foundation. All rights reserved.
316315
<!-- 'ReferencePath' handles adding the interop .dll to '.deps.json', which is needed for '[UnsafeAccessor]' to work -->
317316
<ReferencePath Include="@(CsWinRTGeneratorInteropAssemblyPath)" />
318317

319-
<!-- 'AllItemsFullPathWithTargetPath' handles copying the interop .dll to the build output folder -->
320-
<AllItemsFullPathWithTargetPath
318+
<!-- '_SourceItemsToCopyToOutputDirectory' handles copying the interop .dll to the build output folder -->
319+
<_SourceItemsToCopyToOutputDirectory
321320
Include="@(CsWinRTGeneratorInteropAssemblyPath)"
322-
TargetPath="$(_CsWinRTGeneratorInteropAssemblyFileName)"
323-
CopyToOutputDirectory="PreserveNewest" />
324-
325-
<!-- 'AllPublishItemsFullPathWithTargetPath' handles copying the interop .dll to the publish output folder -->
326-
<AllPublishItemsFullPathWithTargetPath
321+
TargetPath="$(_CsWinRTGeneratorInteropAssemblyFileName)" />
322+
323+
<!-- '_SourceItemsToCopyToPublishDirectory' handles copying the interop .dll to the publish output folder -->
324+
<_SourceItemsToCopyToPublishDirectory
327325
Include="@(CsWinRTGeneratorInteropAssemblyPath)"
328-
TargetPath="$(_CsWinRTGeneratorInteropAssemblyFileName)"
329-
CopyToOutputDirectory="PreserveNewest" />
326+
TargetPath="$(_CsWinRTGeneratorInteropAssemblyFileName)" />
330327
</ItemGroup>
331328

332329
<!-- Append to 'FileWrites' so the interop .dll will be removed on clean -->

0 commit comments

Comments
 (0)