How to save DLLs in a different folder when compiling in Visual Studio?

There are 2 parts of your question: How to configure solutions to build assemblies/EXE into folders of your choice – this is configured through properties of the project in VS (project properties -> build -> output path). Also value of check “copy local” property on each reference. How to load assemblies files from non-default locations … Read more

What is a mixed mode assembly?

http://msdn.microsoft.com/en-us/library/x0w2664k.aspx 1) Allways check msdn first. Mixed mode means that the assembly can run managed and unmanaged code. 2) Setups for 32-bit Windows (.NET Framework 4.0) http://system.data.sqlite.org/sqlite-netFx40-setup-bundle-x86-2010-1.0.74.0.exe You kinda answered that question yourself “My project that is going to use this library is all .NET 4 which will be compiled to x86.”

Error reading assemblies: No assembly descriptors found

I have been using version 2.3 of maven-assembly-plugin, but I believe the problem is the same: if the assembly configuration is declared inside an execution, it works from mvn package, but does not work from mvn assembly:assembly. The solution I have found is to declare the configuration in the top-level configuration of the plugin, and … Read more

How to load a .NET assembly for reflection operations and subsequently unload it?

From the MSDN documentation of System.Reflection.Assembly.ReflectionOnlyLoad (String) : The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. So, I am afraid the only way to unload an assembly is unloading the application domain. To create a new AppDomain and … Read more

How to get Namespace of an Assembly?

Use Assembly.GetTypes(); This will get you a collection of all types and then you can get the Namespace property for each of them. Then I guess you can simply check that all the types have same Namespace value and use this value. Otherwise add some other logic to detect what namespace to consider primary.

Embedding assemblies inside another assembly

ILMerge does merge assemblies, which is nice, but sometimes not quite what you want. For example, when the assembly in question is a strongly-named assembly, and you don’t have the key for it, then you cannot do ILMerge without breaking that signature. Which means you have to deploy multiple assemblies. As an alternative to ilmerge, … Read more

How to prevent a .NET application from loading/referencing an assembly from the GAC?

If both assemblies are strong-named (signed), the CLR will always load from the GAC. Here are the steps the runtime uses to resolve assembly references (from How the Runtime Locates Assemblies): Determines the correct assembly version by examining applicable configuration files, including the application configuration file, publisher policy file, and machine configuration file. If the … Read more