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

6

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

    
asked by anonymous 08.11.2017 / 12:44

2 answers

6

Imagine that you want your application to have portability for creating any type of API, such as .NET Framework, .NET Core, Xamarin, and so on. In this case you would use .NET Standard, but your resources would be very limited, after all, you would only have access to the APIs that would be compatible for all platforms.

As for the .NET Framework, you would have access to all the .NET Framework APIs, but you could only create applications for platforms that support the .NET Framework.

If you have more questions, take a look at which explains when to use the .NET Standard.

I hope I have helped.

Hugs!

UPDATE 1

I found this post quite interesting on the subject and in Portuguese to stay clearer.

    
08.11.2017 / 13:35
5

If you choose .NET Standard, you can only use the features listed in this specification. Anything that is not in it will generate an error. Note that it only has the list of components, does not have the same codes, the codes it takes from somewhere else. There is no concrete .NET Standard, it is abstract for you to make sure that you only use things that work across Standard .NET.

If you choose the .NET Framework you can use what's inside it and you can only use the library in projects for the .NET Framework. You will not be able to do this in .NET Core, Xamarin, Mono, etc.

    
08.11.2017 / 13:30