Can software developers claim the copyright of code that was generated by the framework, which may not be created/owned by the developer?

For instance, .NET is a software framework made by Microsoft, and it typically generates a lot of code to start a project. Sometimes a developer needs to modify the generated code to better fits his/her needs. Can the developer claim copyright of the code that was not modified by him/her? Does the developer only own the copyright of the code that was actually written/modified by him/her? Does Microsoft have the copyright of generated code?

  • 1
    Who actually wrote the code? If it's auto-generated, it isn't owned by anybody, because it fails the creativity test. The owner of the code-generating program owns the program, but not the output that it produces.
    – user6726
    Jan 28, 2018 at 21:07
  • @user6726 why does it fail the creativity test?
    – Viktor
    Jan 28, 2018 at 22:00
  • 1
    The same way that feeding a printed page into a scanner does not pass the creativity test. Automatic and creative are polar opposites.
    – user6726
    Jan 29, 2018 at 0:24
  • 1
    @user6726 That can't be right. If that were correct, nobody would hold copyright to a photocopy of a poem. But clearly the author of the poem holds copyright. Jan 29, 2018 at 10:00
  • My point being that the act of photocopying or any other machine reproduction does not constitute a creative act.
    – user6726
    Jan 29, 2018 at 16:00

2 Answers 2


Yes Microsoft owns the copyright. .NET does come with licensing terms that allow you to use and modify it. I don't know how far those terms go, but they do allow people to use, modify and sell/profit from it without needing to compensate Microsoft.

It would then be fair to say that anything you do would be a derivative piece of work which is entitled to its own copyright, providing the license allowed the creation in the first place.

  • I think what you're saying is that Microsoft has the copyright on NET (which wasn't asked about) but not on the code that NET produces (which was). If so I'd agree; but it needs to be a bit clearer. Jan 28, 2018 at 21:35
  • I answered the question in the first sentence. You can hold a copyright on the auto generated code because it is simply a template. The templates in Word for example is "auto generated" code.
    – Nick Eu
    Jan 28, 2018 at 21:46
  • @TimLymington If the generated code contains sufficient protectable expression authored by Microsoft (which I would argue it typically does) then it's an aggregate work and Microsoft still holds copyright to those elements they authored that are in the work. You would need Microsoft's permission to copy and distribute it (which you have, per the license). Jan 30, 2018 at 4:33

The short, but not particularly helpful, answer is this: The generated code is not a new work, but it does contain elements of prior works. The authors of any sufficient protectable expression from prior works that appears in the generated code holds copyright to the generated code and their permission is required to distribute or copy that code beyond what is necessary for ordinary use.

Code generation is not a creative process. It just mechanically takes elements of different works and stitches them together. Legally, it's no different from stapling. If I staple a DVD of my wedding to a DVD of The Phantom Menace, the final work is not a new work, merely a compilation. But you cannot copy or distribute it without permission of the copyright holders of both DVDs.

  • What do you mean by "ordinary use"? If I use an IDE and generated code is inserted, I would interpret ordinary use to mean that I use that generated code to compile a program that I wrote and then redistribute that program under terms of my choosing. Do I actually need Microsoft's permission to do that?
    – Brandin
    Jan 29, 2018 at 13:38
  • @Brandin: Yes you do need Microsoft's permission. The good news is that you have it; the code generator comes with a license which allows you to use the generated code pretty much without limit. Jan 29, 2018 at 16:59
  • @Brandin Distribution is usually not considered ordinary use. You could try to make the argument that distribution of parts of a framework is part of the framework's ordinary use. But it's kind of irrelevant here because in addition to copyright law, you are bound by Microsoft's EULA. Jan 29, 2018 at 19:31

You must log in to answer this question.