Does anyone know how to get Nlog's nlogger snippet to work in Visual Studio 2012 like it did in 2010? I don't see anything on their forum or on the internet when googing around. Seems like something that people who use Nlog would want back.
Haven't worked out how to get the real snippet installed, so I manually created a snippet to perform the same function as the original did.
Create the file nlogger.snippet in the following folder:
My Documents\Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets
The contents of the file should be as follows:
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>
NLog Logger Snippet
</Title>
<Shortcut>nlogger</Shortcut>
</Header>
<Snippet>
<Code Language="CSharp">
<![CDATA[private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Hopefully this helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With