Posts

Showing posts with the label dotnet

Tests code coverage in Visual Studio Code with C# and .Net Core

Image
While writing tests for you code goes without saying, there is much to be said about code coverage of tests. How much of your code is actually covered by these tens of tests you just wrote? If you work in a TDD approach most probably you don't have such "mundane" questions. Of course you code is 100% covered. You did make sure every test failed before you added that line in your code to make it pass... and that conditional statement... or did you? While purists would argue there is no chance of no coverage I beg to differ. Let alone if you write your tests after the code is written... After such and such years and experience in the industry when we are nearing deadlines some things are thrown out the window. They shouldn't but they are. TL;DR tools help with coverage. In this case .Net Core Test Explorer with coverlet and Coverage Gutters.

Coverlet to the rescue As I blogged a while ago I have made myself a warm and cozy development environment for Visual Studio Code…

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…