Start exe even with missing dependency dlls?

Posted by k3b on Stack Overflow See other posts from Stack Overflow or by k3b
Published on 2010-12-18T08:56:25Z Indexed on 2010/12/25 16:54 UTC
Read the original article Hit count: 349

In Dotnet2.0 and later a program refuses to start if one of its dependent (static referenced) dlls are missing.

With Dotnet1.1 and 1.0 the program started but crashed later when trying to use functionality of the missing assembly.

I wonder if there is something like a

  • compiler switch ,
  • configuration option or
  • a dotnet [attribute]

to allow me to start the app when certain dlls are missing.

Is it possible without moidfying the sourcecode (execpt by applying some Attriutes)?

I don't want to manualy load assemblies by programcode or use IOC-Framworks.

Update: With "static referenced dlls" i mean the opposite of dynamicly loading a dll in my own programcode using reflection and Assembly.Loadxxxx().

Update 2010-12-25: This scenario happens for example if you want to use Log4net with Dotnet4 clientprofile together with a WinForms-Aplication: Log4net requires System.Web.dll that is not in Dotnet4-Clientprofile. You must install dotnet4-web-support to use the winforms-aplication that is compiled against log4net unless there is some magic Compiler-switch/Attribute/Configuration that i am still looking for.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about configuration