Hey, On Mon, May 3, 2010 at 7:12 PM, Jan <[email protected]> wrote: > var parameters = new ReaderParameters > { > SymbolReaderProvider = new PdbReaderProvider(), > ReadingMode = ReadingMode.Immediate, > AssemblyResolver = resolver, > }; > > ModuleDefinition = > ModuleDefinition.ReadModule(SourceAssemblyFileName, parameters); > > Which leads to an exception if the pdb file is not found. But I need a > logic where I can ask the assembly if there is a pdb referenced and if > it is available to load it.
There's no builtin, you'll have to test whether the pdb file exists or not, and then, call ModuleDefinition.LoadSymbols with a ISymbolReader provided by a PdbSymbolReaderProvider. -- Jb Evain <[email protected]> -- -- mono-cecil
