docs/coding-guidelines/adding-api-guidelines.md
Recommended reading to better understand this document: .NET Standard | Project-Guidelines | Package-Projects
net11.0 is the target framework version currently under development and the new apis
should be added to net11.0. More Information on TargetFrameworks
Implement your API modification
Update the reference source
Update tests
TargetFramework to the TargetFrameworks.dotnet build <Library>.csproj -f <TargetFramework> /t:Test. TargetFramework should be chosen only from supported TargetFrameworks.New public APIs must be documented with triple-slash comments on top of them. Visual Studio automatically generates the structure for you when you type ///.
API writing guidelines has information about language and proper style for writing API documentation.
If your new API or the APIs it calls throw any exceptions, those need to be manually documented by adding the <exception></exception> elements.
After your change is merged, we will eventually port them to the dotnet-api-docs repo. The tools used for this port live in api-docs-sync repo. Once the dotnet-api-docs change is merged, your comments will start showing up in the official API documentation at https://learn.microsoft.com, and later they'll appear in IntelliSense in Visual Studio and Visual Studio Code.
The rest of the documentation workflow depends on whether the assembly has the UseCompilerGeneratedDocXmlFile property set in its project file:
For libraries without this property (or with it set to true, which is the default):
For libraries with <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>:
UseCompilerGeneratedDocXmlFile property.What to do if you are moving types down into a lower contract?
If you are moving types down you need to version both contracts at the same time and temporarily use project references across the projects. You also need to be sure to leave type-forwards in the places where you removed types in order to maintain back-compat.