Remove file-dedup workaround (#2233)
authorJuan Hoyos <juan.hoyos@microsoft.com>
Fri, 30 Apr 2021 19:35:38 +0000 (12:35 -0700)
committerGitHub <noreply@github.com>
Fri, 30 Apr 2021 19:35:38 +0000 (12:35 -0700)
src/Directory.Build.targets
src/Tools/Directory.Build.targets

index d7264ef7579117ce0297c2e0b2c1ccd070f0f7d4..9759f0bb728023e8f9edc0c9bf8259fe88391628 100644 (file)
     <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
   </ItemGroup>
 
-  <!-- This is an ugly workaround needed to be able to do r2r/single file on packages that reference TraceEvent as the package's props inject a double
-  write to the same relative path. This is related to https://github.com/microsoft/perfview/issues/1002 -->
-  <Target Name="RemoveDupeAssemblies"
-          Condition="'$(PublishSingleFile)' == 'true'"
-          AfterTargets="ComputeResolvedFilesToPublishList"
-          BeforeTargets="CopyFilesToPublishDirectory">
-      
-    <PropertyGroup>
-      <ExcludedTraceEventPath>$([MSBuild]::NormalizeDirectory($(PkgMicrosoft_Diagnostics_Tracing_TraceEvent), 'lib/netstandard1.6'))</ExcludedTraceEventPath>
-    </PropertyGroup>
-    <ItemGroup>
-      <ResolvedFileToPublish Condition="$([MSBuild]::NormalizePath(%(ResolvedFileToPublish.Identity)).StartsWith($(ExcludedTraceEventPath)))"
-                             ExcludeFromSingleFile="true"/>
-    </ItemGroup>
-  </Target>
-
   <!-- We need this for the binplacing for testing assets.
   This should be removed at some point as it's brittle (harcodes versions and creates native-managed coupling). -->
   <Target Name="_PublishPackageReferences"
index ddd6364b6148bd9a734f1aa53799326a2ff0a4e3..8a7fdb7f15f26a8004b32e7153e15a606ebab0c3 100644 (file)
     </ItemGroup>
     <Message Importance="Low" Text="@(FilesInBundleToSign)"/>
   </Target>
-
-  <Target Name="PrepareForBundling"
-          BeforeTargets="GenerateSingleFileBundle"
-          AfterTargets="_ComputeFilesToBundle"
-          DependsOnTargets="RemoveDupeAssemblies" />
-
-  <!-- Workaround for https://github.com/microsoft/perfview/issues/1002 -->
-  <Target Name="RemoveDupeAssemblies">
-    <ItemGroup>
-      <_FilesToBundle Remove="$(PkgMicrosoft_Diagnostics_Tracing_TraceEvent)\lib\netstandard1.6\Dia2Lib.dll" />
-      <_FilesToBundle Remove="$(PkgMicrosoft_Diagnostics_Tracing_TraceEvent)\lib\netstandard1.6\OSExtensions.dll" />
-      <_FilesToBundle Remove="$(PkgMicrosoft_Diagnostics_Tracing_TraceEvent)\lib\netstandard1.6\TraceReloggerLib.dll" />
-    </ItemGroup>
-  </Target>
 </Project>
\ No newline at end of file