2

Project has a reference to lib. If this lib lays near the executable, all works fine. But I need to put this lib to System32 folder. But in this case project fails, raising filenotfoundexception.

I thought that I can feel myself free to put my libs to system32 folder without any harm for my app.

What's wrong with all this?

animuson
  • 53,861
  • 28
  • 137
  • 147
yurart
  • 593
  • 1
  • 6
  • 23

2 Answers2

4

The .NET runtime doesn't probe for custom DLLs in system32. This article explains how assembly loading and probing works:

http://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.90).aspx

TarkaDaal
  • 18,798
  • 7
  • 34
  • 51
2

If it's a managed assembly, you need to put it into GAC instead (and that requires strong name).

wRAR
  • 25,009
  • 4
  • 84
  • 97