How to document an ASP.NET Core Web API using OpenAPI Specification (swagger)

Documenting your API is very important if you want people to be able to consume it. An API documentation should contain the list of accessible endpoints (URL, method), their parameters, and the response (http status code, body). The documentation should be readable by a human, but also by a computer. The later is very useful to generate clients automatically.OpenAPI Specification is the most common way to [read more]

How to create a good bug report using Problem Steps Recorder

As a user, it's hard to explain an issue you have with a software. How to explain the problem to a developer who isn't next to you? A developer needs to know exactly how to reproduce your issue and fix it. As a developer, you know the users are not very good to explain their problems and you have to deal with incomplete explainations, so you have to guess a few steps.Problem Steps Recorder (PSR) is a tool [read more]

How to enforce a consistent coding style in your projects

Every company/team has its own coding style. The coding style is about naming, spacing, or language feature usages. Do you use tabs or spaces, and how many spaces? DO you use PascalCase or camelCase? Do you prefix field names with _? Do you always use var or only when the type is visible? And a few more questions in that vein…In an open/inner source project, you want to ensure every contributor uses your [read more]

How to publish a dotnet global tool with .NET Core 2.1

People doing web development are used to install tools using npm. For instance, you can install TypeScript using npm install -g TypeScript. Then you can use TypeScript directly from the command line. This is very convenient. .NET Core 2.1 allows to create tools that can be install the same way as nodejs. This feature provides a simple way to create and share cross-platform console tools..NET tools are [read more]

Tip: Automatically create a crash dump file on error

Crash dumps are very useful to debug an application. Recently, I worked on a Visual Studio extension we use in my company. It's very easy to develop such kind of application. However, there are lots of reasons for your extension to crash. Of course you can add lots of try/catch, but you'll for sure forget the good one, so VS will crash. When it's happening, you would like to be able to attach a debugger and [read more]

Library Manager, a client-side library manager in Visual Studio 2017

Microsoft released Library Manager a few weeks ago. Library Manager is a Visual Studio's new client-side static content management system. Designed as a replacement for Bower and npm, Library Manager helps users find and fetch library files from an external source (like CDNJS) or from any file system library catalog.Library Manager is open source. You can find the source of the project on GitHub: [read more]

Which version of EcmaScript should I use in the TypeScript configuration

TypeScript allows to convert most of the ES next features to ES3, ES5, ES6, ES2016, ES2017. Of course, you can also target ES Next. But which version should you target?Why you should use the highest possible version?Using the highest version allows allows you to write shorter code, and use more readable features, such as async/await, for..of, spread, etc. It's not only shorter, but also easier to debug. For [read more]