Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated dependency via project reference and nuget leads to GenerateDepsFile crash #364

Closed
nguerrera opened this issue Nov 8, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@nguerrera
Copy link
Contributor

Repro steps

  • Have a PackageReference to Foo.nupkg
  • Also have a ProjectReference to Foo.csproj producing the same dll as nupkg

Expected behavior

  • Project reference wins and build succeeds

Actual behavior

  • Package reference wins for compilation input, GenerateDepsFile throws and aborts build.
@nguerrera
Copy link
Contributor Author

Workaround:

  <Target Name="WorkAroundPackageAndProjectReferenceConflict" 
                BeforeTargets="ResolveLockFileReferences">
    <ItemGroup>
       <ResolvedCompileFileDefinitions 
           Remove="@(ResolvedCompileFileDefinitions)" 
           Condition="'%(ResolvedCompileFileDefinitions.Filename)' == 'Foo'" />
    </ItemGroup>
  </Target>

@mattwar
Copy link

mattwar commented Feb 1, 2017

I'm not able to repro this crash in the current VS build d15rel 26129.0. It is actually working as expected. No exception, no crash.

@srivatsn srivatsn closed this as completed Feb 9, 2017
sbomer pushed a commit to sbomer/sdk that referenced this issue Sep 19, 2017
mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
Make the generated run.cmd file handle additional args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants