Skip to content

Commit

Permalink
Avoid specifying ReferenceAssembly in definition
Browse files Browse the repository at this point in the history
Fixes #2165 by never putting a reference to metadata in the ReferenceAssembly field in the first place, so it's never there to get emplaced in a new item escaped and mangle things downstream.
  • Loading branch information
rainersigwald committed Jun 5, 2017
1 parent e92c537 commit 36fd82e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2049,6 +2049,13 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<Target Name="FindReferenceAssembliesForReferences"
DependsOnTargets="ResolveReferences">
<ItemGroup>
<!-- Reference assemblies are not produced in all cases, but it's easier to consume them
if this metadatum is always populated. Ensure that it points to the implementation
assembly unless already specified. -->
<ReferencePath Condition="'%(ReferencePath.ReferenceAssembly)' == ''">
<ReferenceAssembly>%(FullPath)</ReferenceAssembly>
</ReferencePath>

<ReferencePathWithRefAssemblies Include="@(ReferencePath->'%(ReferenceAssembly)')"
Condition="'$(CompileUsingReferenceAssemblies)' != 'false'">
<OriginalPath Condition="'%(ReferencePath.Identity)' != '@(ReferencePath->'%(ReferenceAssembly)')'">%(ReferencePath.Identity)</OriginalPath>
Expand All @@ -2058,15 +2065,6 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</ItemGroup>
</Target>

<ItemDefinitionGroup>
<!-- Reference assemblies are not produced in all cases, but it's easier to consume them
if this metadatum is always populated. This item definition ensures that it points
to the implementation assembly unless specified. -->
<ReferencePath>
<ReferenceAssembly>%(FullPath)</ReferenceAssembly>
</ReferencePath>
</ItemDefinitionGroup>

<!--
====================================================================================================
Expand Down

0 comments on commit 36fd82e

Please sign in to comment.