MacakM
MacakM

Reputation: 1820

Common .NET vs common .NET Core namespaces in Console Application

I would like to ask: is there any significant difference between this frameworks' common namespaces? I can't find any info about the difference in basic use cases in this frameworks. Is something much more harder in .NET Core or are they equal in usability?

I know the differences between ASP.NET and ASP.NET Core, I am interested in basic .NET and .NET Core differences.

Upvotes: 3

Views: 659

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062770

Essentially: no. Most common namespaces will be exactly where you expect them. The difference will be that instead of adding an assembly reference, you may need to add a package reference - and the package references tend to be more granular. The simplest approach to that is to simply reference an uber-package that absorbs everything else.

There may be API differences, especially if you are targeting .net standard 1.3 or similar, and if you're targeting 1.2 or below: you'll feel it (the restrictions imposed by windows phone, silverlight, etc). If you are targeting .net standard 1.6 or 2.0 you'll find it much more familiar to regular .net. This is particularly noticeable if you are doing anything with reflection.

There will be some feature differences - but even this is reduced in 2.0. There is a portability analyzer to spot problematic APIs: https://github.com/Microsoft/dotnet-apiport - I find the results from this to be "mixed" at best (it often tells me that my code doesn't run on the platforms that it currently runs on).

Upvotes: 6

Related Questions