Wednesday, May 2012:00 PM – 12:30 PM EDT Scott Hanselman, Microsoft; Scott Hunter, Microsoft Demo: Created a Blazor WebAssembly app in VS You can check PWA. Showing local variables in the browser while debugging, which has only worked for a couple of months. Can debug the backend API in VS. Set breakpoints. This is full-stack …
Tag: C#
Jan 05 2013
Text Encoding Options for NLog
I’ve been using NLog for a while now and recently decided I wanted to have some of my log files written as Unicode text. I learned that you can specify this in your <target> sections of NLog.config as follows:
1 |
<targets><br /> <!-- add your targets here --><br /> <target xsi:type="File" name="mainFile" fileName="${logFile}"<br /> archiveEvery="Day" archiveNumbering="Sequence" concurrentWrites="false" maxArchiveFiles="30"<br /> layout="${layout}" encoding="UTF-8" /><br /></targets> |
Note that I only tested two different encodings, “Unicode” and “UTF-8”. Also, “UTF-8” must have …
Nov 21 2011
Unit Testing Private Static Methods in C#
I had never needed to unit test a private static class method in C# before, but it turns out that Microsoft created a special object type to handle just such a case. To test the private static method DetermineFilename (that takes filePath as a string parameter and returns a string) in the FileManager class, do …
Sep 02 2011
Disable C# “var” Recommendation in ReSharper
I have been trying to use type names instead of “var” in my C# code lately. However, ReSharper wants me to convert every type name in a declaration to “var”. The squiggles under my type names were driving me nuts, so I decided to dig into the settings to turn this off. To disable these …