I have a solution with multiple projects that all output dlls (except for the main application of course). Copy local is set to true for all of the references and everything is fine and dandy with dlls in the same directory as the exe.
My problem is that this is ugly. I'd like to put all the dll's in a subfolder (actually two subfolders down to be precise). How can I do this in Visual Studio 2008?
I've found a few questions that seem similar but I couldn't find the simple answer that I know has to exist.
EDIT: To be clearer, I want to know how to make the assembly loader look for references somewhere besides the operating directory. Users will be interacting with some of the other files in the directory, and the less clutter there is for them the better.
EDIT 2: I also want to avoid using the GAC. The application needs to be self contained.
The __attribute__ directive is used to decorate a code declaration in C, C++ and Objective-C programming languages. This gives the declared code additional attributes that would help the compiler incorporate optimizations or elicit useful warnings to the consumer of that code.
You are looking at an example of C code obfuscation. The programmer uses a single underscore _ as the name for the second argument to the main function. He uses an old style declaration for main() somewhat equivalent to modern int main(int t, int _, char *a) .
To write the source code of your first C program you need to open the Notepad++ text editor. The quickest way to do that in Windows 10 is to hit your Win key, type Notepad++ in the search window, and hit Enter. and paste it into the editor. Yes, this is your first C program!
Have you tried the AppDomain namespace?
AppDomain.CurrentDomain.AppendPrivatePath
http://www.vcskicks.com/csharp_assembly.php
Or AssemblyResolve
public static class AssemblyResolver {
static AssemblyResolver() {
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(delegate(object sender, ResolveEventArgs args) {
return Assembly.LoadFrom(...);
});
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With