I am making an application which is almost done but there is one thing that is bugging me. There are about 12-13 files that must be in the directory of the folder (some .dlls, some .xml files etc.) for the application to run, and I want to make my application as compact as possible, meaning I want as fewer files to go with the application. So my question is, how can I do this? Can all the files be included in the application itself? Is it necessary for the .dlls to be in the application folder or can I reference them from somewhere else? I was thinking to make a folder for all those files but I don’t think my application will run if a .dll file isn’t placed in the same directory as the application.
Share
How to embed and access resources by using Visual C# looks like just what you need.
[edit]
If you want to load DLLs, you can combine the above with the
AppDomain.AssemblyResolveevent SLaks mentions like this:where
Class1is a class library containing just:and the DLL is added as an Embedded Resource to the file: