Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency check

Are there any way to check if all dependencies required by a .Net assembly is fulfilled? It's on a production server and Visual Studio is not installed on it.

It's a .Net assembly which requires some GAC:ed components which are not included in the installation package.

like image 201
jgauffin Avatar asked Jan 14 '11 08:01

jgauffin


3 Answers

Here are a simple tool:

enter image description here

http://www.amberfish.net/

Though it doesn't fully support x64. I'll accept any answer that has a similar tool but also supports x64.

like image 131
jgauffin Avatar answered Sep 27 '22 17:09

jgauffin


For the NDepend code base, we have no specific dependency in the GAC. However NDepend do check that all assemblies are well-deployed in the installation, at each NDepend execution. This way, if the user tweaked the installation (which DO happen, we notice) he gets a smart MessageBox explaining exactly what happen and why he should re-deploy NDepend. A lot of support has been saved thanks to that trick.

Our implementation is simply based on Mono.Cecil that does check that all assemblies are present in the the location it should, with the right assembly version. Doing shallow read on assembly is so fast with Mono.Cecil that doing so doesn't slow down the startup time.

like image 24
Patrick from NDepend team Avatar answered Sep 27 '22 19:09

Patrick from NDepend team


Fusion log is one way, http://www.hanselman.com/blog/DetailingFailedAssemblyLoadsWithTheAssemblyBindingLogViewerTheFusionLogger.aspx

Another way is to install Debugging Tools for Windows on another machine with the same CPU bitness, and then copy the installation folder to this server. Then you can use WinDbg in it to easily troubleshoot such problems. Of course, this is not easy for beginners.

like image 26
Lex Li Avatar answered Sep 27 '22 18:09

Lex Li