Frage

After rewriting a VB.NET assembly with Mono.Cecil the 'Call Stack' debugging window in Visual Studio 2010 shows the language as C# and not VB.NET. Is it possible configure Mono.Cecil to rewrite an assembly so the debugger recognises the rewritten assembly as VB.NET?

The following Mono.Cecil simply reads and saves an assembly without modification. However, the debugger reads the new assembly as C# instead of VB.NET.

Dim readerParameters = New ReaderParameters() With {.ReadSymbols = True}
Dim writerParameters = New WriterParameters() With {.WriteSymbols = True}

Dim appToRewrite = AssemblyDefinition.ReadAssembly(
    appToRewriteExe, 
    readerParameters
)

appToRewrite.Write(appToRewriteExe, writerParameters)

It is desirable for the rewritten assembly to be VB.NET so the debugging windows 'Local' and 'Immediate Window' are the VB.NET versions rather than the C# versions.

War es hilfreich?

Lösung

Thank you for filing this bug! Oh wait, this is SO.

Anyway, that definitely looks like a bug.

I've filed it as https://github.com/jbevain/cecil/issues/81, StackOverflow being a not so great bug tracker.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top