woggles
woggles

Reputation: 7444

Tracing where a dll in the bin folder comes from

I noticed today that whenever I build a word add in project of mine, Microsoft.Sharepoint.dll is being copied into the bin folder and is subsequently included when publishing.

Is there an easy way to see why this (annoyingly large) dll is being included when publishing?

It isn't referenced directly. There are 3 dependencies in the project page and I've checked all these projects and none of them reference it directly either. Do I need to continue following the dependencies of those projects too?

Is there not some kind of log file for a build that could give me a hint?

EDIT:

The problem was that my project referenced a project that referenced a project that had a reference to Microsoft.SharePoint.dll with copy local set to true. I had to delete the dlls from all projects and rebuild with copy local set to false. I didnt realise that the 3rd party dll would be copied into my project.

Upvotes: 2

Views: 627

Answers (2)

Rizwan Patel
Rizwan Patel

Reputation: 538

You could have a a look at reflection mechanism of asp.net or if not you could run trace using firebug for cross reference on browser ,

Upvotes: 0

Justin Pihony
Justin Pihony

Reputation: 67065

If this is being pulled in due to a dependency from another DLL, then try looking at all of your DLLs in Dependency Walker. It finds all of the dependecies that a dll has. This is usually only when they are actually being used/bound, but you can also use the Fusion Log Viewer to see where all DLL binds are being bound from.

Upvotes: 2

Related Questions