Skip to content

Instantly share code, notes, and snippets.

@yyamasak
Created April 14, 2016 07:52
Show Gist options
  • Save yyamasak/91de49eb9f7df402f48967d07b69cc11 to your computer and use it in GitHub Desktop.
Save yyamasak/91de49eb9f7df402f48967d07b69cc11 to your computer and use it in GitHub Desktop.
Attempt to help NLog to find an obfuscated RichTextBox control name (but failed.)
nlogviewer = new NLogViewer(this);
nlogviewer.Show();
log = LogManager.GetLogger("Main");
#region Workaround for ConfuserEx
var richLogTarget = LogManager.Configuration.FindTargetByName<NLog.Windows.Forms.RichTextBoxTarget>("rich");
richLogTarget.FormName = nlogviewer.Name;
richLogTarget.ControlName = nlogviewer.rtbNLog.Name;
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment