question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency conflict when project.json references csproj

See original GitHub issue

Moved from https://github.com/aspnet/Mvc/issues/4680 By @pantonis


Steps to reproduce

Use the app from https://github.com/pantonis/AspNetRC2EFCore

It is a simple web app (project.json) that references a class library (csproj + packages.config) using this syntax:

  "frameworks": {
    "net46": {
      "dependencies": {
        "ClassLibrary1": {
          "target": "project"
        }
      }
    }
  },

Expected behavior

Everything should compile and run.

Actual behavior

An exception of type 'System.IO.FileLoadException' occurred in Microsoft.Extensions.Configuration.FileExtensions.dll but was not handled in user code

Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Environment data

dotnet --info output:

N/A

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:47 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
pantoniscommented, May 24, 2016

Please fix this asap. I think it is a very important bug and the workaround as described by @Eilon in https://github.com/aspnet/Mvc/issues/4680#issuecomment-221171047 is a little bit messy especially when it involves large projects.

I think 99% of the existing projects out there use .csproj class libraries. So there should be a way of smooth transition to asp.net core. I already saw a lot of people complaining about incompatibilities between .csproj and .xproj.

Thanks.

2reactions
tomtencommented, Jul 6, 2016

Are there any non-project.json workarounds for this?

We have a simple ASP.NET Core RC1 web application (with csproj dependencies) that builds and publishes fine using msbuildand dnu, but that we cannot upgrade to ASP.NET Core RTM if there is no way to do command-line builds.

I’m on Windows, so any workaround requiring nugetand msbuildis fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency conflict when project.json references csproj
New application xproj wants to consume three csproj-based libraries which are not maintained by us as they live in our code-base as git ......
Read more >
Found conflicts between different versions of the same ...
My solution there was to open the project (.csproj) file and remove those references. For example, System.IO, System.Threading and such, tend to ...
Read more >
MSB3277: Found conflicts between different versions of ' ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >
[Resolved] NPM error - Fix the upstream dependency conflict
Introduction. I was working on a recent React app and when I ran the command: npm install I am getting the following error...
Read more >
R.I.P project.json - Out with the new, in with the old
Once nice advantage of the csproj file over the project.json is that we can now include references to full (non-core) .NET projects as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found