2

Running one application I receive such error:

C:\Program Files\P2CGate\sdk\samples\net\basic>nsend.exe

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'cgate_net, Version=0.9.10.31381, Culture=neutral, PublicKeyToken=null' or
 one of its dependencies. Не удается найти указанный файл.
   at send.Send.Main(String[] args)

The message is too generic, because I don't know exactly what can not be loaded. It seems cgate_net is loaded because I do see some details Version=0.9.10.31381.

So I guess some of dependencies can not be loaded, but which one exactly?

Without knowing what can not be loaded I do not know how can I fix this problem. Why C# doesn't print what exactly can not be loaded and how to obtain this information?

Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
  • 2
    ... *or* one of it's dependencies. – Eric J. Jul 20 '12 at 15:40
  • These problems happens since windows 3.1 in C: don't know how the system couldn't say which dll it is looking for. – Felice Pollano Jul 20 '12 at 15:43
  • 1
    @FelicePollano: Fortunately the *system* can say that. I agree it would be handy if the *Exception* would share that information so we don't have to fire up Fusion Log Viewer. – Eric J. Jul 20 '12 at 16:15

2 Answers2

4

The Fusion Log Viewer is your friend here.

The fusion log viewer monitors attempts to resolve .NET assemblies and displays the attempts visually. It will tell you which assembly could not be resolved and how it tried to resolve it.

Be sure and run as Administrator or it will silently just do nothing.

Eric J.
  • 147,927
  • 63
  • 340
  • 553
4

If an assembly or one of its dependencies fails to load, you can see more details by looking at the Fusion logs:

See also this related question:

Community
  • 1
  • 1
Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452