Posts

Showing posts with the label .Net Framework

Running an Asp.Net Core 2.* Web API as a Windows Service

Image
At my current workplace there is a healthy hunger for new technologies and a pragmatic view of the software industry in our corner of the planet. As a Microsoft driven shop, previous reservations of moving to different ecosystems and operating systems have melted away with the arrival and wide adoption of .Net Core. After all the language is the same. The developers need "only" to catch up on their containers. When I joined a month ago as a tech lead, little did I know that putting my money where my mouth is would mean having to deal with outdated Microsoft documentation or even S.O answers to questions such as "How do I run an Asp.Net Core app as a windows service without IIS".
TL;DR add a reference to the NuGet package  Microsoft.Aspnetcore.Hosting.Windowsservices, publish and register your executable as a service.
A Prophecy? Almost a year ago I wrote a blog post about porting full framework projects to core. Ever since I have written my share of .Net Core, Pytho…

How to port a .NET framework project to .NET Core including tests - A Guide

Image
So you want to port your project to .Net Core and don't know how? Are you reluctant to let go of your traditional .Net Framework targeting but want to have a taste of the new .Net buzz?  Is the information on the subject incomplete or too confusing (yes it usually is). Well you have come to the right place. TL;DR This is guide. It will hopefully save you time. Rejoice.
A tale of two frameworks (well actually 3)  I will make this one short and sweet and let this article tell the tale. I recommend to read this article  before you continue: .NET Standard - Demystifying .NET Core and .NET Standard.
To port or not to port It depends If this is your production code and there is no prospect to run it in a platform other than windows then maybe not. If it is a huge complicated project then maybe notIf it is your open source baby maybe yesIf it is a new project and you see the benefit of it being cross platform maybe yes The considerations are many and it is up to you to decide. In any case…