3

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.

1 Answer 1

6

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).

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your answer. However I don't understand the paragraph about adding references. I spotted no difference in .NET Core console application (it is the same when I want to add some other project from my solution or when I want to add some package from NuGet)
@MacakM the TFM that you are targeting is probably already taking a dependency on all the things you need. However, behind the scenes the package tree is more granular. If you don't need to change it: that's great. This probably impacts library authors more than app authors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.