|<<>>|36 of 214 Show listMobile Mode

.NET Tips and Resources

Published by marco on

If you’re a .NET developer, this is video you’ve been looking for:

S107 − Build great libraries using .NET Standard by Immo Landwerth (YouTube)

Immo tells you everything you need to know about Nuget, using Package References, switching to .NET Core, and using Assembly-Binding Redirects in .NET Framework (they’re not necessary in .NET Core). He also includes an effusive apology for the nightmare of compatibility issues that accompanied the purported interoperability between .NET 4.6.1 and .NET Core.

If you want to be compatible with .NET Core 1.5 or lower, then you can use .NET Framework 4.6.1. For .NET Standard compatibility, you should definitely use .NET Framework 4.7.2 instead.

He includes a list of resources for digging through open-source code and checking platform and target compatibility.

.NET API Catalog

While you can use Microsoft Docs to find out which targets or platforms support which APIs, this resource lets you do it faster.

You can browse a giant list of namespaces and click on any one of them to see the types, and then drill down to properties and methods. For each level, you can see a nice list of supported targets/platforms and the assemblies to use.

You can also “Search”, which opens what looks like a terminal that let’s you camel-case search for your namespace, type or member. Selecting a result takes you to the location in the catalog.

.NET Framework Source-code browser

Yes, you read that correctly. I had no idea that this existed—I’ve been digging through decompiled assembly code instead. This is much faster and includes the original documentation and comments. The source is syntax-highlighted and all types, methods and properties are linked.

There’s a document explorer, namespace explorer and project manager, all linked up very nicely. You can click any element and show all references in a separate pane. Clicking one of those references navigates there—and other references in that file are also highlighted.

If that’s not sufficient, you can even download the entire source code as a ZIP file from here—complete with solution and project files so you can open it in Visual Studio for browsing.

.NET Core Source Browser
This is the same thing as the link above, but for .NET Core sources.

This is a NuGet package browser combined with an API browser over all of the assemblies in a package.

  • You can search the package for keywords.
  • You can browse types and see the formatted XML documentation.
  • You can diff versions of the package to see which APIs have changed.
  • You can jump to the code in the Git repository, if it’s given in the package.

It’s an open-source GitHub project, so you could even run your own copy for diffing privately published packages.