Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Lib/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project>
<!-- .Net Framework projects which reference netstandard2.0 end up copying a bad version of System.ValueTuple -->
<!-- .Net Framework projects which reference netstandard2.0 end up copying a bad version of some System libraries -->
<!-- Rather than try to fix it here and there we'll just go nuclear and copy the right one in after every project -->
<Target Name="CopyCorrectSystemValueTuple" AfterTargets="Build">
<Target Name="CopyCorrectSystemAssemblies" AfterTargets="Build">
<ItemGroup>
<TupleAssembly Include="$(MSBuildThisFileDirectory)/../packages/System.ValueTuple.4.5.0/lib/net461/System.ValueTuple.dll" />
<SystemAssembly Include="$(MSBuildThisFileDirectory)/../packages/System.ValueTuple.4.5.0/lib/net461/System.ValueTuple.dll" />
<SystemAssembly Include="$(MSBuildThisFileDirectory)/../Downloads/System.Buffers.dll" />
</ItemGroup>
<Message Text="Copying @(TupleAssembly) to $(OutDir)" />
<Message Text="Copying @(SystemAssembly) to $(OutDir)" />
<Error
Text="System.ValueTuple not found in the packages folder."
Condition="!Exists('$(MSBuildThisFileDirectory)/../packages/System.ValueTuple.4.5.0/lib/net461/System.ValueTuple.dll')" />
<Copy SourceFiles="@(TupleAssembly)" DestinationFolder="$(OutDir)" />
<Error
Text="System.Buffers not found in the downloads folder."
Condition="!Exists('$(MSBuildThisFileDirectory)/../Downloads/System.Buffers.dll')" />
<Copy SourceFiles="@(SystemAssembly)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
</Target>
</Project>
Loading