-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
In VS2017.3, .Net Core2 console application with dependency of net45 library have no entry in deps.json and raise an exception 'System.IO.FileNotFoundException occurred' #1621
Comments
From @emgarten on September 29, 2017 3:28 Closing in favor of the SDK issue since it looks like this a project issue, not a package issue. @moh-hassan when copying the same issue between multiple repos be sure to use the full URL of the issues. The referenced NuGet issues here have nothing to do with this problem, but I see that in the SDK issue they do match up with similar SDK issues. |
From @moh-hassan on September 29, 2017 22:33 @emgarten, thanks for hint, I modified the issue url. |
It looks like the issue here is a P2P reference to a project that has a direct DLL reference. IE project A has a P2P reference to project B, and project B has a DLL reference to C.dll. The reference to C.dll isn't flowing through to project A, leading to a runtime failure. |
I am having exactly the same issue with .NET Standard 2.0 library referenced in .NET Framework 4.7.1 application. Is there any temporary fix for this besides manually copying all dependencies to main output folder? |
Is this transitive Reference assemblies? If that's the case, I don't believe we support that. |
@livarcocc can you explain what does it mean "I don't believe we support that."?! Any suggestion to get rid of the situation? |
We don't support transitive reference assemblies. For example: A depends on B as a Project Reference. A can't see C, because the reference assemblies are not carried transitively. Now, we currently have a bug where Reference assemblies are being bin placed but they are not being written to the deps.json file, which prevents us from loading them. @tannergooding is looking into this bug and should have a PR out for it soon targeting release 2.1.300 of the .NET Core SDK. |
Yes, that's my problem (last paragraph)! Thank you for clarification! I'm looking forward to version 2.1.300! |
And me, looking forward to version 2.1.300 of the .NET Core SDK :) |
This should be resolved as of #2090 |
[main] Update dependencies from dotnet/arcade
From @moh-hassan on September 29, 2017 1:23
I have a solution in vs2017.3 RTM with two projects ConsoleAppCore2 and NetStand2Lib.
.Netcore2 console application ('ConsoleAppCore2') reference NetStand2Lib project (NetStand2Lib)
The NetStand2Lib project reference mylib.dll which is .Net Framework 45 (net45).
The compilation is successful and mylib.dll is copied to the bin folder.
When I try to run the application, I get run-time exception error:
I inspected the generated dependency file 'ConsoleAppCore2.deps.json' file and find no entry for dependency at all to mylib.dll. Below is part of deps.json :
My workaround solution:
I explicitly added mylib.dll as a reference in ConsoleAppCore2 project. , I find an entry in the file ConsoleAppCore2.deps.json to mylib.dll and it's working fine.
i reached these issues dotnet/cli/issues/595 , dotnet/sdk/issues/120 but they can't help.
I posted this issue in dotnet/sdk
What i missed to avoid my workaround solution and avoid the reference twice to mylib.dll
Or is this a waiting support feature?
Copied from original issue: NuGet/Home#5955
The text was updated successfully, but these errors were encountered: