Adding the reference to a project assembly two times in csproj file crashes docfx #1414

Closed
xenux opened this Issue Mar 13, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@xenux

xenux commented Mar 13, 2017

Title

Adding the reference to a project assembly two times in csproj file crashes docfx during metadata extraction.

Functional impact

when editing csproj by hand (or with git automatic merge from two branches) it happens that the reference to the same assembly is added two times. when it happens docfx crash during metadata extraction.

Minimal repro steps

  • Create project A.
  • Create project B.
  • Add reference to project A from project B.
  • Save.
  • Open B.csproj
  • Duplicate following lines:
<ItemGroup>
   <ProjectReference Include="..\A\A.csproj">
     <Project>{046f7d79-105a-4cb1-aa39-5545f82b4b1a}</Project>
     <Name>A</Name>
   </ProjectReference>
 </ItemGroup>
  • Use one class of A inside B to be sure nothing is optimized out.
  • Build metadata on B.
    -> crash
    stacktrace.txt

Expected result

Second reference should be ignored

Actual result

Argument Exception the same assembly is added two times in a dictionary collection crashing the build
A task was

@vicancy vicancy added the bug label Mar 15, 2017

@vicancy

This comment has been minimized.

Show comment
Hide comment
@vicancy

vicancy Mar 15, 2017

Collaborator

Thanks for reporting the issue. We will take a look.

Collaborator

vicancy commented Mar 15, 2017

Thanks for reporting the issue. We will take a look.

@superyyrrzz

This comment has been minimized.

Show comment
Hide comment
@superyyrrzz

superyyrrzz Mar 22, 2017

Collaborator

It's fixed since v2.14

Collaborator

superyyrrzz commented Mar 22, 2017

It's fixed since v2.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment