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
On Nov 29, 4:35 am, Tolis <[email protected]> wrote:
> Hi
>
> I have used the approach from 
> githubhttps://github.com/jbevain/cecil/wiki/Debug-symbols.
> The pdb was created and I have checked its validity 
> usinghttp://www.debuginfo.com/tools/chkmatch.html. I run the executable and
> attach to its proccess using VS2010. In the modules list I see that
> symbols are loaded however my breakpoints are disabled

-- 
--
mono-cecil

Reply via email to