NDepend

Improve your .NET code quality with NDepend

Debugging a .NET App on Linux from Windows Visual Studio with WSL

NDepend analysis, reporting, API and Power-Tools will run on Linux and MacOS with the next version 2021.2. To achieve that, a major refactoring session has been achieved to isolate code...
Patrick Smacchia September 15, 2021

Code Testability: A Case Study

[crayon-616adc8453cf0482744777/] This method is untestable because its logic depends on NdpOperatingSystem.Kind which returns an OSPlatform object. Notice the usage of the attribute UncoverableByTest that lets code reviewers and tools like...
Patrick Smacchia September 1, 2021

3 productivity Resharper features missing in Visual Studio

Resharper is a great Visual Studio productivity extension but on the other hand it slows down significantly the IDE, especially when working with large solutions. However there are real hopes...
Patrick Smacchia August 10, 2021

Top 10 New .NET 6.0 API

.NET 6 introduces new handy APIs that will make our development journey easier. Let’s go through the top 10 new API in terms of usage likelyhood. Then in the conclusion,...
Patrick Smacchia July 7, 2021

How to Logically Name Embedded Resources in .csproj?

You can work with .NET for two decades and still discover some useful stuff.  One thing that bothered me till now is that an embedded resource name is “the project...
Patrick Smacchia June 16, 2021

In the Jungle of .NET Obfuscator Tools

In this article I will explain our genuine experience with various .NET Obfuscator Tools. There are actually dozens of .NET Obfuscator as listed here obviously we didn’t try them all....
Patrick Smacchia June 8, 2021

Migrating Delegate.BeginInvoke Calls to .NET Core, .NET 5 and .NET 6

In this 2019 post, the .NET Base Class Library engineers announced that the good old Delegate.BeginInvoke .NET Framework syntax wasn’t supported in .NET Core and consequently in .NET 5, 6...
Patrick Smacchia May 26, 2021

On replacing Thread.Abort() in .NET 6, .NET 5 and .NET Core

Thread.Abort() is not supported in .NET 5 / .NET Core We are actually migrating the NDepend analysis and reporting to .NET 5 and figured out that there is no equivalent...
Patrick Smacchia May 19, 2021

Visual Studio 2022 64 bits: Elements of history

Finally after all these years of waiting Visual Studio 2022 will run in a 64 bits process on 64 bits machines! As a consequence the effective process address space of the...
Patrick Smacchia May 11, 2021

Covariance and Contravariance in C# Explained

Introduction This article explains and demonstrates the concepts of Covariance and Contravariance in C# .NET. These concepts will be first introduced for generics, then for delegates and finally for arrays....
Patrick Smacchia May 4, 2021

Hungarian Notation for Fields in C#

If there is one topic that divides the C# developers community, it is the Hungarian notation for fields. In our team we rely on Hungarian notation for fields, not just...
Patrick Smacchia April 21, 2021