views:

112

answers:

5

I included these libraries or namespaces in my C# application and published the solution as freeware. I used Visual C# Express 2008.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Media;
using System.Management;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Drawing.Text;

Is it okay to give the application as freeware or am I violating any license here???

+7  A: 

Those 'usings' are not libraries, they are namespaces built into the .NET framework. You don't have to redistribute anything other than your application.

Jimmy
thanks for your answer
HoNgOuRu
A: 

As long as you only distribute your code (whether compiled or in source form), you should be fine. Those using clauses only reference the namespaces, they don't get copied in. Same goes for the assembly references in your project file, they don't get copied in.

Of course, IANAL.

Bevan
That statement is slightly incorrect. The `using` clauses are not referencing the assemblies, they only help the compiler at build time to resolve the names of the external classes. The actual assembly referencing is in the C# project file.
Franci Penov
Good point - edited to improve accuracy. Thanks for the catch.
Bevan
+1  A: 

I don't think you are violating anything since the .NET Framework is free. I would recommend citing Microsoft in your terms and conditions file, however. Also, I don't think you need to package those namespaces since they are already in the framework and since anyone using your .NET program must have .NET installed on their computer.

If you are just using the namespaces in your program, you don't have to worry about a violation. They are made so that programmers can take advantage of pre-defined libraries instead of inventing the wheel over and over.

A: 

You're only referencing .NET framework namespaces, so you shouldn't have anything to worry about. It's always a good thing to check with the source, though:

http://msdn.microsoft.com/en-us/library/xak0tsbd.aspx

The above link is information about "Redistributing the .NET Framework". You probably aren't doing that much, but even if you were, it would be just fine.

Eric King
thanks for all of your answersI'll set this question as closed...
HoNgOuRu
+1  A: 

The using clauses have no effect whatsoever on the execution of your code, they are only used at build time to help the compiler figure out the right class from framework or other third-party assemblies your code requires.

The actual assemblies (or libraries as you called them) your code depends on are the ones listed in the References section of your C# project.

And as @Jimmy said, all the assemblies that start with System. are part of the .Net framework and are installed when the framework is installed on the machine. Your code does not redistribute those assemblies (or if it does, you should be using the official Microsoft redistributable package for .Net). By using them from an application you released as a freeware, you are not violating the licensing of the .Net framework, as it is licensed royalty-free to end users and developers.

Franci Penov