DefaultAssemblyResolver.AddSearchDirectory(string) should allow you to do this?

something like the following.

var assemblyResolver =new DefaultAssemblyResolver();
assemblyResolver.AddSearchDirectory(pathYouWantToAdd)
var readerParameters = new ReaderParameters
{
        AssemblyResolver = assemblyResolver,
        ReadSymbols = true,
        SymbolReaderProvider = new PdbReaderProvider()
};
Module = ModuleDefinition.ReadModule(pathToAssembly, readerParameters);

On Tue, Dec 7, 2010 at 1:23 AM, Timwi <[email protected]> wrote:
> Currently Mono.Cecil searches for dependencies (during .Resolve()) in
> the current directory, which is sub-optimal because that directory is
> usually random and unconnected to the input assembly.
>
> It would probably be more useful if Mono.Cecil searched in the same
> directory that the input assembly was in. Do you think this would be
> doable?
>
> Of course, it would also be nice to have a way to specify explicit
> search paths, but that’s just an idea for a new feature :)
>
> --
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to