Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unlock NLog.config on Visual Studio 2019

After installing NLog and NLog.config using NuGet package manager I am unable to edit NLog.config, it shows lock icon on it. How to unlock it?

lock icon on NLog.config file

my solution explorer

like image 729
user8886083 Avatar asked Oct 22 '25 06:10

user8886083


1 Answers

For newer projects the NLog.Config package is not recommended.

From: https://www.nuget.org/packages/NLog.config

Note: Unfortunately this package won't work well when using <PackageReference>

Advised to:

  • download manually: https://raw.githubusercontent.com/NLog/NLog/dev/src/NuGet/NLog.Config/content/NLog.config
  • set "Copy To Output Directory" to "Copy if newer"
like image 160
Julian Avatar answered Oct 23 '25 20:10

Julian