How to get binding informations for a .Net assembly
I have a dll in the bin folder of my project and I am not able to understand why it is there.
It looks like it is not required by the project, indeed if I remove it the application runs fine. Actually, when it is开发者_运维百科 there it crash! :D
Every time I build with Visual Studio 2010 the dll is copied again.
The question is: is there a way/tool that can help me to understand who requires this dll in my app? My application is an ASP.NET MVC 2 project.
Thanks
First step is to enable the diagnostic log for the build in Visual Studio:
Tools > Options > Projects and Solutions > Build and Run
then select
MSBUild project build output verbosity : Diagnostic
This will provide a full log into your output folder. So i could get this information:
C:\MyApplication\bin\Microsoft.VisualStudio.Settings.dll
C:\MyApplication\bin\Microsoft.VisualStudio.Settings.dll
ResolvedFrom = C:\Program Files (x86)\Microsoft Visual Studio 2010 SDK\VisualStudioIntegration\Common\Assemblies\v4.0
CopyLocal = true
FusionName = Microsoft.VisualStudio.Settings, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
HintPath = \\Microsoft\WF4\Microsoft.VisualStudio.ActivityPack.Data.dll
OriginalItemSpec = Microsoft.VisualStudio.ActivityPack.Data
Version = 10.0.0.0
This tells me that the Microsoft.VisualStudio.Settings.dll is required by Microsoft.VisualStudio.ActivityPack.Data.dll
Another helpful tool is fuslogvw.exe (included in VS). It gives you full informations about an assembly origins. More informations about this tool here.
精彩评论