Skip to content

Instantly share code, notes, and snippets.

View chivandikwa's full-sized avatar
🏆
winning

Thulani Chivandikwa chivandikwa

🏆
winning
View GitHub Profile
@chivandikwa
chivandikwa / RoslynDeterministic.md
Created August 28, 2019 08:55 — forked from aelij/RoslynDeterministic.md
Deterministic Builds in C#

Deterministic Builds in C#

Status

The C# compiler (Roslyn) supports deterministic builds since Visual Studio 2015. This means that compiling assemblies under the same conditions (permalink) would produce byte-for-byte equivalent binaries.

If you also intend on shipping non-portable (permalink)) PDBs, you must also make sure that paths in the PDBs are absolute using path mapping. The recommended way would be to map the enlistment (repo) root to a fixed path, such as C:\.

For more information, see this [blog post](http://blog.paranoidcoding.com/2016/04/05/deterministic-builds-in-roslyn.