Tag: dotnet
All the articles with the tag "dotnet".
-
obj.ToString(), nulls and ReSharper
ReSharper incorrectly marks ToString() as non-nullable, but BCL types like HtmlString can return null.
-
WCF _ useless ProtocolException
WCF ProtocolException truncates the server error response; an extension method on WebException extracts the full response body.
-
T4 Assembly references for Design-time templates
Common patterns for referencing assemblies in T4 design-time templates using GAC paths, absolute paths, and MSBuild variables.
-
T4 Design-Time templates base class
How to create a shared custom base class for T4 design-time templates by extending TextTransformation, with a working example.
-
T4 Templates and Null in Expression block
T4 templates throw ArgumentNullException on null expression blocks; fix by overriding ToStringWithCulture in the base class.
-
Useful Dictionary extensions I am always using
Two reusable C# IDictionary extension methods: GetValueOrDefault and GetOrAddValue with a factory function.
-
T4 Runtime Template and code-behind logic
How to add a code-behind partial class to a T4 runtime template by manually editing the csproj file, with a Visual Studio add-in.
-
T4 Runtime Templates Base Class
Demonstrates extracting T4 runtime template auto-generated base class into a shared reusable C# base class for all templates.
-
Developing Custom Tool (aka Single File Generators) for Visual Studio 2012
Step-by-step guide to creating and registering a COM-visible Single File Generator custom tool for Visual Studio 2012.
-
[WTF] Visual Studio 2012 not supporting MSI Setup project (.vdproj)
Visual Studio 2012 dropped .vdproj MSI setup project support; workaround options include WiX and InstallShield Limited Edition.