legal to copy MS's code?

N

not_a_commie

So is it legal to copy stuff out of the .NET framework and mix it into
your own code? I assume so, since I could call their function directly
if I didn't want to avoid the UI library reference in my server code.
Do I need to reference it?
 
J

Jon Skeet [C# MVP]

not_a_commie said:
So is it legal to copy stuff out of the .NET framework and mix it into
your own code?

No, it's not.
I assume so, since I could call their function directly
if I didn't want to avoid the UI library reference in my server code.

That's not the same thing as being able to copy it yourself though.
Do I need to reference it?

Yup, or reimplement it yourself without looking at the original source
(or a decompiled version).
 
P

Peter Ritchie [C# MVP]

Yes, it's the Reference License. You can only reference the source, you
can't distribute it in any way (like copying, recompiling, and deploying).

The .NET Framework technically has a no reverse engineering clause (the .NET
Framework 2.0 license is a supplement to the Windows EULA, and doesn't
explicitly grant license to reverse engineering). So, you can't distribute
anything you get from decompilation because you're not allowed to decompile
it.

I believe there's multiple MSFT sources that show reflecting on the .NET
Framework; so it may be an uphill battle to charge someone with decompilation
of the managed .NET code; but certainly charging someone for redistribution
of the .NET Framework, outside of running donetfx.exe, would be a easy win...

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
 
M

Marc Gravell

want to avoid the UI library reference in my server code

Some useful methods are undoubtably in the wrong assemblies, due to
them being implemented first by a particular team. Examples would be
the cache functionality in System.Web (originally for web apps, but
enhanced in 2.0 so that it is reasonable to use from any caller), or
some simpler things like the Application class, or perhaps just the
MethodInvoker delegate*.

Now; I'm not saying that it is always OK to use any code in any
scenario, but if you are aware of what the code is doing (and why)
then I don't see any issue using a UI assembly from a server app etc.
But you *must* be aware of what you are doing and why (for instance,
System.Drawing has some big issues in service code).

In terms of deployment, since these assemblies are in the core GAC you
have no issues.

Just my tuppence.

Marc
 
M

Marc Gravell

the MethodInvoker delegate*.

Oops; I forgot to add my footnote:

*=yes, this is logically identical to ThreadStart, but I've found
repeatedly this causes confusion with some people who assume it
relates to threaded code. Of course, once I get the projects up to 3.5
we can switch to Action ;-p

Marc
 
M

Mihai N.

Some useful methods are undoubtably in the wrong assemblies, due to
....
Just my tuppence.

I doubt that a technical thing (a bug in implementation, or whatever)
can trump a legal thing (the license).
If something is broken, you ask to be fixed, you cannot go ahead and
fix it yourself, then redistribute it.

When in doubt, read the license 20 times, then check with somebody
who can read legalese. Taking advide from random Joe on the net
(including me) might get you in trouble.
 
M

Marc Gravell

Mihai - I agree with what you say, but I'm not sure how this relates
to your quoting me? I never said anything about bugs or re-deployment
- just that it is sometimes reasonable to reference a UI assembly from
service code...

Marc
 
C

Cor Ligthert[MVP]

Hi,

What do you think will be the benefit.

I know the other side, your program loading time will be longer and the
deployment packages will be larger.

I don't see any advantage in what you want to do?

While at least here in the EU you are most probably violating the copyright
laws.

Cor
 
M

Mihai N.

Mihai - I agree with what you say, but I'm not sure how this relates
to your quoting me? I never said anything about bugs or re-deployment
- just that it is sometimes reasonable to reference a UI assembly from
service code...

Because of this:
<<Now; I'm not saying that it is always OK to use any code in any
scenario, but if you are aware of what the code is doing (and why)
then I don't see any issue using a UI assembly from a server app etc.>>

"Use any code" does sound like more than just reference.
But maybe I did not understand it (especially since English is not
my first language).

So, sorry for misquoting you.

But for whoever reads: even if quoting Marc was a misunderstanding,
what is legal and what is not might be tricky, and checking with
someone who can offer proper advice is best.
 
M

Marc Gravell

Because of this:

Fair enough - I could perhaps have been clearer; I meant via a
standard reference, not by ripping the guts out of somebody else's
code ;-p

Marc
 
M

Mihai N.

Fair enough - I could perhaps have been clearer; I meant via a
standard reference, not by ripping the guts out of somebody else's
code ;-p
It was probably not a big problem, but I tend to be a bit
paranoic about legal stuff :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top