As we mentioned in our previous chapter on Topshelf, all our microservices will be created as console applications. There are, however, two exceptions to this. Both our Common Messages project and our Base MicroService project will be a Class Library (.NET Framework). They will be referenced by all other projects and will never have the need to run themselves, so we save all that code and overhead.
To start, we should create a new project. Select the project type of Class Library (.NET Framework), label it Base MicroService, and click on OK, as shown in the following screenshot:
Once done, our base project will be created. We now have an empty base project that looks as follows:
namespace Base_MicroService
{
public class Class1
{
}
}
Now, let's install our NuGet packages that we will use. First up is an open source package called CacheManager. This will...