I'm trying to load an assembly without locking the file. These assemblies could be third party assemblies so we don't necessarily have access to the code and one or two of them make use of Assembly.Location to read files from their directory, files they might depend on.
I'm aware you can do this via Shadow Copying but it's a real pain getting it to work properly and several users on certain forums have recommended loading the assembly into a byte array and using the Assembly.Load(Byte[]) overload. This works great until one of those assemblies tries to access a file in its parent directory because Assembly.Location returns an empty string and Assembly.Codebase returns the location of the application loading the assembly.
Is there anything I can do to somehow set the Codebase or Location properties of the assembly I'm loading? In the MSDN documentation for Codebase and Location they're defined as overridable properties - does that mean I can override them from the hosting application?