Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

christophwille/ilspycmd-pdbgen-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How-To Generate a PDB on Build with ilspycmd

ilspycmd: https://github.com/icsharpcode/ILSpy/tree/master/ICSharpCode.Decompiler.Console

A simple PDB generation scenario

To properly fake an assembly without PDB, the Sample3rdPartyDemoLibrary project copies the output dll to the root of the solution (see copy code). The DemoApp project references the assembly from this location, and it has an AfterBuild task that uses ilspycmd to generate the PDB.

NOTE: You must install https://www.nuget.org/packages/ilspycmd/5.0.0-preview1 as a global tool at the moment!

dotnet tool install --global ilspycmd --version 5.0.0-preview1

Program.cs in DemoApp has a Debugger.Break statement, so simply F5-ing is fine after build. You should be able to step into Add.

The Real World

You would use ilspycmd to pre-generate the PDB, and not do it on every build.

About

A simple PDB generation scenario

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages