Generating signature certificates

Source code of support available at GitHub

Sometimes assemblies (executables and libraries) are required to be sign and I don’t have a certificate available for test purpose. In this post I pretend to show how to generate a certificate to sign assemblies.

First, we need to install OpenSSL that we can achive following the steps specified in the next link:

Installing OpenSSL on Windows 10 and updating PATH

Second, let’s create a batch script file called: “generateCertificate.cmd” with content:

Deploying NuGet packages

Source code of support available at GitHub

I a previous post we saw how to: “Create NuGet packages” but the deployment step was still a manual process. Let’s try to automatize this. Figure 1 shows how to generate NuGet package for a .NET Core project (similar to the approach previously shown) using the project’s properties.

Creating NuGet package

Figure 1: “Creating NuGet package”.

This adds a couple of lines into the project file (.csproj) as figure 2 shows:

Creating NuGet packages

Lately I have been involved in the creation of several NuGet packages useful for some portals being developed. I want to share my knowledge in this topic.

If we were developing libraries for .NET Core or .NET Standard life would be easy as figure 1 to figure 8 shows.

Creating a new .NET Core library

Figure 1: “Creating a new .NET Core library”.

Default code

Figure 2: “Default code”.

First build results

Creating and deploying releases using Octopus

Source code of support available at GitHub

Since while ago I wanted to share my experiences automatizing the product releases with Octopus from Visual Studio. Again, let’s do it through an example.

As it could not be otherwise, figure 1 shows the first package you should add to your project in order to create Octopus packages ready to be deployed: “OctoPack”. The latest package version available at the time of this tutorial was the “3.6.1” but we installed the “3.6.0” on purpose in order to show the update process.

Coding style using StyleCop

A colleague ask me to share my experience coding with ReSharper and once he heard that I’m not use ReSharper he was even more curious about how I write source codes. Who knows me knows I love NuGet packages and be updated constantly, that’s why I found a very useful package that I install in all my projects as soon I start it.

StyleCop.MSBuild

StyleCop used to be a standalone application with integration with Visual Studio but that changed a while ago. I’ll explain through an example. Let’s start creating a console application from scratch.