Skip to content

Code Standards

Robin Rodricks edited this page Dec 16, 2023 · 5 revisions

Code Style

Code style is defined by an editorconfig file. We are not accepting any major changes to that file. We use tabs and not spaces.

All PRs are expected to conform to the defined editorconfig code style.

Framework Targets

Take care to use only official "Target Framework Monikers" to avoid symbol confusion: Some examples:

.NET 8 net8.0
.NET 7 net7.0
.NET 6 net6.0
.NET 5 net5.0
.NET Standard 2.1 netstandard2.1
.NET Standard 2.0 netstandard2.0
.NET Core 3.1 netcoreapp3.1
.NET Framework 4.8 net48
.NET Framework 4.7.2 net472
.NET Framework 4.6.2 net462

FluentFTP is (currently) compiled for these targets:

net6.0;net5.0;net472;net462;netstandard2.0;netstandard2.1

Conditional Compilation Symbols

In the code, preferably AVOID using the generic NETFRAMEWORK, NET, NETSTANDARD symbols.

Try to specify EXACTLY under which conditions conditional code will execute.

If you do INSIST on using one of these generics, be aware that

  • NETFRAMEWORK would effectively mean net462 or net472
  • NET would effectively mean net5.0 or net6.0
  • NETSTANDARD would effectively mean netstandard2.0 or netstandard2.1

You may also use comparative symbols such as NET5_0_OR_GREATER etc.

For a full rendering of available preprocessor symbols and their spelling, see this MS article.

Clone this wiki locally