Skip to content

Commit

Permalink
Add comments explaining .NET Standard facade injection
Browse files Browse the repository at this point in the history
  • Loading branch information
dsplaisted committed Sep 27, 2017
1 parent d065d44 commit 7b1e5d8
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,25 @@ Copyright (c) .NET Foundation. All rights reserved.
targets. -->
<Reference Remove="%(_NETStandardLibraryNETFrameworkLib.FileName)" />

<!-- Put each facade assembly in two separate items: Reference with Private set to false, which means it won't be
copied locally, and ReferenceCopyLocalPaths, which will be copied locally. The reason for this split is to
workaround https://github.com/dotnet/core-setup/issues/2981 by ensuring that the facades are written
to the deps.json with a type of "referenceassembly" instead of "reference".
The exception is netfx.force.conflicts.dll, which shouldn't be copied local. So it isn't included in
ReferenceCopyLocalPaths.
When we add the Reference items, we use the simple name as the ItemSpec, and refer to the full path
to the DLL via the HintPath metadata. This is so that if we're replacing a simple Reference,
the OriginalItemSpec of the resolved reference will match to the Reference that was replaced,
and VS won't show a warning icon on the reference. See https://github.com/dotnet/sdk/issues/1499
-->

<Reference Include="@(_NETStandardLibraryNETFrameworkLib.FileName)">
<HintPath>%(_NETStandardLibraryNETFrameworkLib.Identity)</HintPath>
<Private>false</Private>
</Reference>
<!-- netfx.force.conflicts is only needed at compile time. -->

<ReferenceCopyLocalPaths Include="@(_NETStandardLibraryNETFrameworkLib)" Condition="'%(FileName)' != 'netfx.force.conflicts'">
<Private>false</Private>
</ReferenceCopyLocalPaths>
Expand Down

0 comments on commit 7b1e5d8

Please sign in to comment.