Skip to content
New issue

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

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

Already on GitHub? # to your account

deps.json for ProjectReferences is not emitted correctly #3254

Open
vatsan-madhavan opened this issue May 22, 2019 · 5 comments
Open

deps.json for ProjectReferences is not emitted correctly #3254

vatsan-madhavan opened this issue May 22, 2019 · 5 comments

Comments

@vatsan-madhavan
Copy link
Member

When I create a project with a project reference like this...

<ProjectReference Include="..\WindowsBase.csproj" />

... the deps.json file that's generated has an entry like this:

      "WindowsBase/1.0.0": {
        "runtime": {
          "WindowsBase.dll": {}
        }
      }

The application loads WindowsBase from Microsoft.NetCore.App instead of loading the one supplied by the referenced project.

Repro: XUnitTestProject1.zip

/cc @ericstj

@vatsan-madhavan
Copy link
Member Author

Also related: #2674

@ericstj
Copy link
Member

ericstj commented May 22, 2019

You can contrast this to a raw file reference which includes fileversion / assemblyversion. For some reason fileversion and assemblyversion are missing from projectreferences. This breaks the scenario where folks submodule a library to replace it (or in this case WPF just tries to test their own libs which in the case of WindowsBase overlap libs in the base shared framework). /cc @dsplaisted

@weltkante
Copy link

Also happening in WinForms, deps files contain no version for facades referenced by test projects via ProjectReference and for System.Drawing that means it'll take the one supplied by Microsoft.NetCore.App instead of the one built in the WinForms repo. (Other facades for the various *.Design assemblies don't have a counterpart in Microsoft.NetCore.App as far as I can see.)

@ericstj
Copy link
Member

ericstj commented Apr 20, 2020

I bet you can workaround by using both a project reference and a raw file reference.

@weltkante
Copy link

yeah having both kinds of references seems to be a useable workaround, loads the right System.Drawing now

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

No branches or pull requests

3 participants