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

*.deps.json missing some project dependencies #14946

Closed
jeffason opened this issue Dec 11, 2020 · 16 comments
Closed

*.deps.json missing some project dependencies #14946

jeffason opened this issue Dec 11, 2020 · 16 comments
Assignees
Milestone

Comments

@jeffason
Copy link

Hello. I am working on a .NET5 library that has many dependencies on other .NET5 projects. I am seeing an issue where the project's .deps.json file doesn't contain all of the project dependencies that exist in the .csproj. I am using dotnet-sdk-5.0.100 on Windows 10 and this build environment:

image

@marcpopMSFT marcpopMSFT added the untriaged Request triage from a team member label Dec 11, 2020
@dsplaisted
Copy link
Member

Hi @jeffason,

Is it possible for you to share a binlog of your project's build, as well as the deps.json it's generating?

What problem is the fact that all the dependencies aren't listed causing? Does the app fail to run correctly, or are you trying to inspect the deps file yourself to find its dependencies, or what?

Thanks!

@dsplaisted dsplaisted removed the untriaged Request triage from a team member label Dec 14, 2020
@dsplaisted dsplaisted added this to the Discussion milestone Dec 14, 2020
@jeffason
Copy link
Author

Attached the .binlog and .deps.json - deps.json.issue.zip

The .deps.json is used by https://github.com/AaronRobinsonMSFT/DNNE and I'm running into an error where my dependencies are failing to load. I reviewed the contents of .deps.json myself and noticed some dependencies not listed (BFDeferredSim for example)

@jeffason
Copy link
Author

Cross-linking issue I opened in the other repo - AaronRobinsonMSFT/DNNE#56

@AaronRobinsonMSFT
Copy link
Member

@dsplaisted Please let me know if this is something that DNNE is causing to happen. I wouldn't think it is doing anything during the .deps.json generation phase of the build but could be mistaken.

@dsplaisted
Copy link
Member

@jeffason Can you generate a binlog from the command line and share it? The one you shared doesn't include the project file contents or any MSBuild items (probably because it was collected from within VS, and that extension has limitations), so it's not very helpful.

@jeffason
Copy link
Author

jeffason commented Dec 17, 2020

@dsplaisted yessir. see attached. weird that building from commandline yielded different results and less entries in the .deps.json
GameSimDepsandBinlog.zip

@dsplaisted
Copy link
Member

@jeffason How are SimulationExports.dll and SimulationCore.dll copied to the output folder? I don't see any reference to them at all in the GameSim binlog. That explains why they aren't in the deps file- they aren't referenced at all.

@jeffason
Copy link
Author

@dsplaisted sorry for the confusion, I didn't have the exact assembly names correct in my original post. The example assembly names in the OP should have been GameSim.dll and BFCore.dll. Here's a screenshot showing GameSim's project dependencies which I would expect to be reflected in the .deps.json

@dsplaisted
Copy link
Member

@jeffason Can you also attach the NuGet assets file (in obj\project.assets.json) for the GameSim project?

@jeffason
Copy link
Author

@dsplaisted yessir -
project.assets.json.zip

@dsplaisted
Copy link
Member

@jeffason That looks like the project.assets.json from the BFCore project. I'm looking for the GameSim one.

@jeffason
Copy link
Author

@dsplaisted - hmm... grabbed that one form the GameSim/obj dir but I found this other file - let me know if it contains the info you are looking for -
GameSim.csproj.nuget.dgspec.json.zip

@dsplaisted
Copy link
Member

I see. The problem is that you have multiple project files in the same directory. That is not currently supported. The assets files collide with each other.

@nkolev92 @zkat Is this documented anywhere, or is there an issue tracking fixing it (I remember discussions about having the assets file include the project name).

@nkolev92
Copy link
Contributor

Yep, NuGet/Home#4463.

I think it's technically possible right now, there's just some potential gotchas that need analyzed.

@jeffason
Copy link
Author

@dsplaisted @nkolev92 thanks for the link. The workaround mentioned in NuGet/Home#4463 of supplying the Directory.Build.Props seems to have resolved the missing dependencies in my GameSim.deps.json file so I believe this issue can be closed

@dsplaisted
Copy link
Member

I'm glad we were able to figure this out.

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

5 participants