Developing .Net Applications on a Network Share

If you keep all of your development projects on a network share like I do then you have probably had to deal with certain challenges regarding permissions along the way.  In the Win32 world this isn’t usually too bad, but in the .Net world it can become a major pain in the butt.

When you keep your project on a network share, all of the assemblies that your project references and all other assemblies required by your project a typically kept in the project’s bin directory.  Everything will seem to be just fine until you try to execute your application.  At this point you will start getting all kinds of strange errors when your applications tries to load dependent assemblies from the network share.  It turns out that .Net 4.0, by default, doesn’t allow assemblies to be loaded from a share.

Once you know the secret, fixing this is actually not that difficult.  You have to add a line to the app.config file for your project.   In the <runtime> section of the configuration file you need to add:<loadFromRemoteSources enabled=”true” />

That’s all there is to it.

Leave a Reply