What’s the difference when creating a class libray (.net framework) and class library(.net standard) project in VS2017?

Asked

Viewed 927 times

8

What are the differences and uses of these types of projects?

Templates do Visual Studio

2 answers

8


Imagine that you want your application to have portability for creating any types of API’s, such as . NET Framework, . NET Core, Xamarin, etc. In this case you would use . NET Standard, but its resources would be very limited, after all, you would only have access to API’s that would be compatible for all platforms.

Already the . NET Framework, you would have access to all . NET Framework Apis, however you could only create applications for platforms that support the . NET Framework.

If you have any further questions, take a look at this link from Microsoft explaining when to use or not to use . NET Standard.

I hope I’ve helped.

Hug!

UPDATE 1

I found this post quite interesting on the subject and in Portuguese to be clear.

  • Thanks, it did help!!

5

If you choose . NET Standard you can only use the features listed in this specification. Anything that is not on it will generate an error. Note that it only has the list of components, it does not have the same codes, the codes it takes from elsewhere. It does not exist concretely one . NET Standard, is abstract for you to ensure that you only usurp things that works throughout . NET compatible with Standard.

If you choose the . NET Framework you can use the one inside it and then you can only use library in projects for the . NET Framework. You cannot in the . NET Core, Xamarin, Mono, etc.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.