The .NET SDK assemblies for Dynamics 365 (online) are built on .NET Framework 4.5.2.
You can use Visual Studio to build your managed code applications using .NET Framework 4.5.2 or later.
You should build any custom client applications using Microsoft .NET Framework 4.6.2 or later. Starting with the Dynamics 365 (online), version 9.0, only applications using Transport Level Security (TLS) 1.2 or better security will be allowed to connect. TLS 1.2 is not the default protocol used by .NET Framework 4.5.2, but it is in .NET Framework 4.6.2.
Enforcement of this higher standard for security will only be applied to Dynamics 365 (online), version 9.0 at this time. If your clients are designed to connect to any version or deployment type you can prepare by re-compiling the application to use .NET Framework 4.6.2.
When installing .NET Framework 4.6.2 on your development computer, be sure to install the developer pack and not just the run-time. This will enable the 4.6.2 framework to be chosen in the New Project dialog box of Visual Studio and in the target framework drop-down menu of the project’s properties.
You can use a Visual Studio Community edition for development.