views:

68

answers:

2

Greetings, Anyone who is big into TDD and who uses .NET seems to eventually run into the sealed classes problem. Some classes in the .NET library are sealed which prevents you from extending them (and thus mocking them). To add insult to injury Microsoft does not provide interfaces for these classes. Work of all the classes have a tendency to be ones that tie you to things like IO (FileInfo, DirectoryInfo) or IIS (HttpContext, HttpRequest, HttpResponse)

Eventually you just end up writing your own interfaces and matching wrapper classes. I've done this so many times that I've decided to just make a open source project out of it for everyone to use.

My question is what License can/should I use. I'm partial to a Apache/BSD style license; but can I use that with .NET? Can I use GPL and still let people use it in commercial applications? Or should I be using something like the Microsoft Permissive License?

+1  A: 

If you want to be entirely open, use the MIT license.

Copyright (c) year copyright holders

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

John Gietzen
+3  A: 

You can use any license you wish with .NET - the framework and platform does not lock you into any specific license.

As for your specific questions:

I'm partial to a Apache/BSD style license; but can I use that with .NET?

Yes, this is perfectly acceptable to use for .NET applications, and a good option, along with the MIT license.

Can I use GPL and still let people use it in commercial applications?

GPL does put fairly strong restrictions on usage, which tends to limit the commercial uptake (since it forces users to redistribute their application based on your library as GPL). LGPL is an option that doesn't prohibit commerical usage nearly as much, though.

Or should I be using something like the Microsoft Permissive License?

This is much more commonplace with .NET libraries, and will be much more familiar to many .NET developers. If you are happy with the terms of this license, its a very good option (at least, in terms of not limiting usage by license alone).

Reed Copsey