Hi

I have a symbol file generated for an assembly. I want to use the same
symbol file for another assembly that differs only by its strong key. I do
not want to tamper the second assembly I just want to be able to debug it. 
I have tried a code similar to 


            foreach (var file in GetFiles(path)) {
                try {
                    fileName = Path.GetFileName(file);
                    Console.WriteLine("Creating symbols for " + fileName);
                    var publish = new
System.EnterpriseServices.Internal.Publish();
                    publish.GacRemove(file);
                    var assemblyDefinition =
AssemblyDefinition.ReadAssembly(file, new ReaderParameters());
                    var writerParameters = new WriterParameters {
WriteSymbols = true };
                    assemblyDefinition.Write(file, writerParameters);
                    publish.GacInstall(file);
                    Console.WriteLine("Symbols created for " + fileName);
                } catch (BadImageFormatException) {
                } catch (Exception e) {
                    Console.WriteLine("Error with " + fileName + e.Message);
                }
            }

The pdb file is generated and VS module list says that symbols are loaded
ok. However debugging is not possible

--
View this message in context: 
http://mono.1490590.n4.nabble.com/match-symbols-with-a-binary-tp4117929p4117929.html
Sent from the Mono - Cecil mailing list archive at Nabble.com.

-- 
--
mono-cecil

Reply via email to