1

I have a C# project with a bunch of dependencies, but I want to store them in another folder from where the executable is.

For example

WTEngine/
/bin
--Dependencies go here
/otherfolder
WTEngine.exe

How do I do that? I move them and the executable can't find them anymore

RoyAwesome
  • 183
  • 1
  • 2
  • 5

2 Answers2

0

This answer for ASP.NET addresses the same issue, and most of the answers can be effectively ported to a desktop executable: How do I reference assemblies outside the bin folder in an ASP.net application?

Also see How do I change the lookup path for .NET libraries referenced via #using in Managed C++?

Community
  • 1
  • 1
Chris Shain
  • 50,833
  • 6
  • 93
  • 125
0

The .NET dependencies are loaded automatically from two places:

You cannot move the dependencies in another folder and have them loaded automatically.

If you decide to load the assemblies manually, check out this question:

How to Load an Assembly to AppDomain with all references recursively?

Community
  • 1
  • 1
Stelian Matei
  • 11,553
  • 2
  • 25
  • 29