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

ConflictResolution doesn't consider project references #2674

Open
ericstj opened this issue Nov 16, 2018 · 2 comments
Open

ConflictResolution doesn't consider project references #2674

ericstj opened this issue Nov 16, 2018 · 2 comments
Milestone

Comments

@ericstj
Copy link
Member

ericstj commented Nov 16, 2018

I was trying to reference a project that built a newer version of a dll than one from the shared framework.

I expected conflict resolution to remove the one from the shared framework, but the project reference was never passed to ConflictResolution. As a result both flow through and RAR ignores the project reference. The two files got passed to RAR, shared framework file as a Assemblies parameter and project reference as AssemblyFiles parameter and RAR ignores the latter (not necessarily a bug since we'd be in trouble if it let it through as we wouldn't have removed the runtime item). The app then fails to produce the assets file with NETSDK1007: Cannot file project info for 'path to project reference'. THis can indicate a missing project reference. Indeed it's missing because RAR dropped it.

We should make sure that ConflictResolution sees ProjectReferences and then can handle a conflict where either the project reference or the package reference wins (making the appropriate trims to the assets file to avoid above error).

@livarcocc livarcocc modified the milestones: 2.3.0, 3.0.1xx Nov 16, 2018
@vatsan-madhavan
Copy link
Member

Just hit this in the wpf repo today. I started building tests by project-referencing WindowsBase.csproj against them, and got into this. I'm working around this by doing something like this, which isn't great.

Would be great if this can be fixed.

  <Target Name="RemoveWindowsBaseFrameworkReference"
          AfterTargets="ResolveTargetingPacks">
    <ItemGroup>
      <Reference Remove="@(Reference)" Condition="'%(FileName)'=='WindowsBase' and '%(Reference.ResolvedFrom)'=='TargetingPack'" />
    </ItemGroup>
  </Target>

@vatsan-madhavan
Copy link
Member

Related #3254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants