1

I try using Costura.Fody to embed DLL files into exe file. First I install Costura.Fody by run this command in package manager console : install-package Costura.Fody, Then Build the project. But building project was unsuccessful and this is the error of building project:

Severity    Code    Description Project File    Line
Error       Fody: An unhandled exception occurred:
Exception:
Unknown custom metadata item kind: 6
StackTrace:
   at Microsoft.Cci.Pdb.PdbFunction.ReadCustomMetadata(BitAccess bits)
   at Microsoft.Cci.Pdb.PdbFunction..ctor(ManProcSym proc, BitAccess bits)
   at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions(BitAccess bits, UInt32 limit, Boolean readStrings)
   at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule(BitAccess bits, DbiModuleInfo info, IntHashTable names, ArrayList funcList, Boolean readStrings, MsfDirectory dir, Dictionary`2 nameIndex, PdbReader reader)
   at Microsoft.Cci.Pdb.PdbFile.LoadFunctions(Stream read, Dictionary`2& tokenToSourceMapping, String& sourceServerData, Int32& age, Guid& guid)
   at Mono.Cecil.Pdb.PdbReader.PopulateFunctions()
   at Mono.Cecil.Pdb.PdbReader.ProcessDebugHeader(ImageDebugDirectory directory, Byte[] header)
   at Mono.Cecil.ModuleDefinition.ProcessDebugHeader()
   at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader)
   at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
   at Mono.Cecil.ModuleReader.CreateModuleFrom(Image image, ReaderParameters parameters)
   at Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters)
   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   at InnerWeaver.ReadModule() in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\ModuleReader.cs:line 14
   at InnerWeaver.Execute() in c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\InnerWeaver.cs:line 28
Source:
Mono.Cecil.Pdb
TargetSite:
Void ReadCustomMetadata(Microsoft.Cci.Pdb.BitAccess)    WindowsFormsApplication3

Am I missing something?

Saman Salehi
  • 1,995
  • 1
  • 22
  • 36

1 Answers1

3

Update the fody package.

update-package Fody

Cameron MacFarland
  • 70,676
  • 20
  • 104
  • 133
  • Ok... I updated it, and then installed `Virtuosity.Fody`. Then builded again the project, and it was build successfully. But were can I found the output exe file? The executable file In bin/debug folder size is 60KB while I'm using awesomium which is size at least 30MB...! – Saman Salehi Feb 04 '16 at 12:44
  • I read documentation and I couldn't embed Awesomium's dlls. I asked a seperate question for this, but no one answered it... Could you please visit the question and give me some advises? Thanks [Question](http://stackoverflow.com/questions/35237624/the-type-initializer-for-module-threw-an-exception-when-try-to-embed-awesomi) – Saman Salehi Feb 13 '16 at 20:51