Dependency conflict when project.json references csproj
See original GitHub issueMoved 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:
- Created 7 years ago
- Reactions:9
- Comments:47 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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 usingmsbuild
anddnu
, 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
nuget
andmsbuild
is fine.