Let's say I'm planning to sell a .NET application in my website. If I need to use a library
A (a reference to the compiled assembly, not the source code)...
Under which license could be
A so I can do this?
If the library is licensed under LGPL (Lesser General Public License)
You're free to use the library however you want as long as you don't modify it or create any derived works from it.
Here's Paragraph 5:
That means, don't modify and compile the source. Just use the dll that the site provides and you can use it on whatever you want (even proprietary software).
Most open source libraries should be covered by this license (unless they're authored by a GPL nazi).
The MIT License is the other licence you may encounter a lot
MIT is significantly more liberal than the GPL (General Public License) or even the LGPL (Lesser General Public License).
It's so simple I can quote the whole thing directly here:
Basically, you can do what ever the hell you want with it for free (including modify and sell it) as long as you maintain the rights that anybody can do whatever the hell they want with it for free.
When I write open source software I prefer this license because it doesn't contain the 'viral' traits and (IMHO) legal sleaziness that GPL does. If I'm going to go to the effort to make it free, I might as well make it truly free.
Note: With GPL if you use it, not only do you also have to license your project under GPL but you have to share the source of any changes you made to the source. I don't see much freedom in that.
There are many licenses that would fit this, see the licenses under "Release changes under a different license" here: Comparison of free software licences
You didn't say that you intend to keep your own software closed source (people do sell open source software), but I assume that's what you meant or you probably wouldn't have asked the question.
Practically all open source software that is distributed as a library (i.e. you don't have to recompile their code to use it, just link to it) has a license that permits your intended use, but you should give it a once over or post the details here when you select a specific one, because there are exceptions, mysql being perhaps the most notable. If you are also distributing the library, not just instructing your users to download it from the original site, you usually also need to provide a link to download the library's source, even if you don't have to open your own source. Also, there may be attribution requirements to keep in mind.