notes/notes/visualstudio/copyright.md
2023-12-21 14:52:20 +08:00

67 lines
2.2 KiB
Markdown

## Copyright
Generally the copyright notice for a project in the .NET Foundation is given as
"Copyright (c) .NET Foundation and Contributors. All Rights Reserved".
The copyright notice should be placed in the LICENSE for the project so
the beginning of the LICENSE for an MIT Licensed project would be:
```
The MIT License (MIT)
Copyright (c) .NET Foundation and Contributors
All Rights Reserved
Permission is hereby granted...
```
And an Apache 2.0 Licensed project would begin
```
Copyright (c) .NET Foundation and Contributors
All Rights Reserved
Apache License, Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions...
```
When including third party open source code in a project, any third party
copyright notices should be preserved with the code. It is good practise
to also surface any third party notices required in your project
into a file called NOTICE.md (or ThirdPartyNotices.txt) in the project root.
## File Headers
The following file header format is the used for .NET Foundation projects.
Please use it for new files and update the headers of existing code files as
appropriate. Note that the general copyright notice for the project is given
in the project's LICENSE file but any third party copyright notices should be
preserved.
```
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the <<LICENSE_TYPE>> license.
// See the LICENSE file in the project root for more information.
```
Therefore the file header for an MIT licensed project would be:
```
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
```
Where-as the file header for an Apache 2.0 licensed project would be:
```
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
```
The addition of existing files from other projects is handled on a case by casebasis.