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

We need to write transitive reference assemblies to the deps.json file. #1609

Closed
moh-hassan opened this issue Sep 26, 2017 · 1 comment
Closed
Milestone

Comments

@moh-hassan
Copy link

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:

System.IO.FileNotFoundException occurred
HResult=0x80070002
Message=Could not load file or assembly 'mylib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.

I inspected the generated dependency of ConsoleAppCore2.deps.json file and find **no entry for dependency at all ** to mylib.dll, below is part of deps.json :

		  {
		  "runtimeTarget": {
			"name": ".NETCoreApp,Version=v2.0",
			"signature": "78d5ac0bccb1c0063faa39eccad7f2c5c81c635a"
		  },
		  "compilationOptions": {},
		  "targets": {
			".NETCoreApp,Version=v2.0": {
			  "ConsoleAppCore2/1.0.0": {
				"dependencies": {
				  "NetStand2Lib": "1.0.0"
				},
				"runtime": {
				  "ConsoleAppCore2.dll": {}
				}
			  },
                               ..........

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 #5954 , #120, but they can't help.

What i missed to avoid my workaround solution and avoid the reference twice to mylib.dll
Or is this a waiting support feature?

@moh-hassan moh-hassan changed the title In VS2017.3, .Net Core console application with transitive dependency of net45 library have no entry in xxx.deps.json and raise an exception 'System.IO.FileNotFoundException occurred' In VS2017.3, .Net Core console application with dependency of net45 library have no entry in deps.json and raise an exception 'System.IO.FileNotFoundException occurred' Sep 26, 2017
@moh-hassan moh-hassan changed the title In VS2017.3, .Net Core console application with dependency of net45 library have no entry in deps.json and raise an exception 'System.IO.FileNotFoundException occurred' 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' Sep 26, 2017
@livarcocc livarcocc changed the title 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' We need to write transitive reference assemblies to the deps.json file. Mar 6, 2018
@livarcocc livarcocc added this to the 2.3.0 milestone Mar 6, 2018
@tannergooding tannergooding self-assigned this Mar 27, 2018
@tannergooding
Copy link
Member

Should be fixed with #2090

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

3 participants