Inline functions error in v.2.5.19
See original GitHub issueHi and a Happy New Year!
What is a year without new challenges??? So…
Before was installed v.2.5.16 and following block of code was working:
public void TEST()
{
...
// inline function
IEnumerable<string> PrepareListItem()
{
for (int xi = 0; xi < 5; xi++)
{
if (xi == 2)
continue;
listItemTmpl.Object = new { lIndex = xi, name = "kooo" };
yield return listItemTmpl.Render();
}
}
//inline function call
tmpl.SetBlockText("list", PrepareListItem());
...
}
after upgrade there is an error:
Severity Code Description Project File Line Suppression State
Error Unhandled exception: dnlib.DotNet.Writer.ModuleWriterException: Instruction is missing in body but it’s still being referenced by PDB data. Method System.Boolean GM_PersonalDevice._EntryPoint/<>c__DisplayClass13_0/<<TEST>g__PrepareListItem|0>d::MoveNext() (0x06000B1B), instruction: IL_0020: ldarg.0
at dnlib.DotNet.DummyLogger.Log(Object sender, LoggerEvent loggerEvent, String format, Object[] args)
at dnlib.DotNet.Pdb.WindowsPdb.PdbCustomDebugInfoWriter.Error(String message, Object[] args)
at dnlib.DotNet.Pdb.WindowsPdb.PdbCustomDebugInfoWriter.GetInstructionOffset(Instruction instr, Boolean nullIsEndOfMethod)
at dnlib.DotNet.Pdb.WindowsPdb.PdbCustomDebugInfoWriter.Write(IList1 customDebugInfos) at dnlib.DotNet.Pdb.WindowsPdb.WindowsPdbWriter.Write(MethodDef method, List
1 cdiBuilder)
at dnlib.DotNet.Pdb.WindowsPdb.WindowsPdbWriter.Write()
at dnlib.DotNet.Writer.ModuleWriterBase.WriteWindowsPdb(PdbState pdbState)
at dnlib.DotNet.Writer.ModuleWriterBase.WritePdbFile()
at dnlib.DotNet.Writer.ModuleWriter.WriteFile()
at dnlib.DotNet.Writer.ModuleWriter.WriteImpl()
at dnlib.DotNet.Writer.ModuleWriterBase.Write(Stream dest)
at dnlib.DotNet.Writer.ModuleWriterBase.Write(String fileName)
at dnlib.DotNet.ModuleDef.Write(String filename, ModuleWriterOptions options)
at StitcherBoy.Reflection.ModuleManager.Write(String assemblyOriginatorKeyFile)
at StitcherBoy.Weaving.Build.AssemblyStitcher.Process(StringDictionary parameters, Guid buildID, DateTime buildTime, String entryAssemblyPath)
at StitcherBoy.Weaving.StitcherProcessor.Process(StringDictionary parameters, Guid buildID, DateTime buildTime, String entryAsemblyPath)
at StitcherBoy.Weaving.StitcherProcessor.Process(StringDictionary parameters, Guid buildID, DateTime buildTime, String entryAsemblyPath)
at StitcherTask`1.Run(Boolean fromExe) GM_PersonalDevice
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
It works in the latest version!
Can someone provide me a clean sample with such an error? I can’t reproduce it.