Home » Visual Studio

Category: Visual Studio

How to port from .net framework to .net standard

The last days I spent some time to port my NuGet packages (AzureBillingApi and FeedReader) to .net standard. As it was not so straight forward, I want to share what I did. The migration is certainly more complicated the larger the project is, but this post will hopefully give you some basic insights on how to migrate. The most time-consuming part will be to change the existing code so that it works with .net standard. In this blog post, I’ll focus on how to change the project to use .net standard and .net framework. In this case, I’ll port the AzureBillingApi to .net standard 1.4, but it will still support .net framework 4.5.2.

Prerequisites

Before migrating the project, you should at first check if the NuGet packages that you use in your project are already compatible to .net standard. There are different ways how to check it. You can create a new .net standard project and manually add all NuGet packages to it – then try to build it. This will immediately show you if these packages support .net standard or not.
Another way is to go to nuget.org or use the NuGet Package Explorer and check the dependencies (Dependencies section) for all your packages.

Read more

Use code analyzers in C# to improve code quality

There is a new feature available in Visual Studio 2015 and roslyn compiler – live code analyzers. Those can be used, to improve your code quality. Code analyzers can be installed via NuGet packages and if you want, you can also implement your own analyzers.

What are live code analyzers?

Analyzers are extensions that can be added to the Visual Studio project. They are available in Visual Studio 2015 with the Roslyn compiler and they analyze the code live and check if there are improvements. Live in that case means, that it finds issues as you type. Really cool feature!

Read more