.NET Core Support and More in Visual Studio 2019 version 16.3 – Update Now!
As we continue to deliver on our mission of any developer, any app, any platform, it’s always an exciting time on the Visual Studio team when we get to launch major features. Today we’ve released Visual Studio 2019 version 16.3 which contains support for the release of .NET Core 3.0, significant C++ improvements, and great updates for Python developers as well as TypeScript 3.6 support. You can download version 16.3 on visualstudio.com or update from the Visual Studio installer.
We are also releasing the first preview of Visual Studio 2019 version 16.4 which can be downloaded from visualstudio.com. For additional information on what’s in Preview 1, check out the release notes.
So, grab your favorite fall beverage, click the update button in the Visual Studio Installer or download the latest version, and while the update commences, peruse this overview of what’s new and awesome in this release.
.NET Core 3.0
Visual Studio version 16.3 includes support for .NET Core 3.0. Why is .NET Core 3.0 exciting? Here’s what Scott Hanselman has to say:
“.NET Core is open source and cross-platform. You can use .NET Core to run server applications on Windows, Mac, a dozen Linuxes, iPhone, IoT devices, and more! .NET Core is open source, cross-platform, and fast as heck. And it’s out today. Fully supported. Open source, yes, but fully supported with the full weight of Microsoft.
Together with .NET Core 3.0, C# 8.0 is out today! It’s also open source and is the language that many of you will use to make your applications. Visual Studio 16.3 supports both C# 8.0 and .NET Core 3.0, and provides tooling support for all new .NET Core 3.0 features. This includes support for building desktop applications with Windows Forms and WPF, client-side web applications with Blazor and back-end microservices using gRPC.
While .NET Core 3.0 is cross-platform, you can also create platform-specific applications! This means your apps can “light up” with operating system-specific features. For example, if you want to talk to a light sensor on a Raspberry Pi with .NET Core, you can!
Taking this to obvious next steps, you take (if you want) a 15-year-old existing Windows Forms or WPF app and swap out it’s “engine” for all new .NET Core 3.0 and reap the benefits. It’s a brain transplant that can make your application faster, easier to deploy, and easier to maintain but it will still be a Windows app using your existing code.
You might think because .NET Core 3.0 includes support for Windows Forms and WPF that it might be heavier or take up more space. In fact, this support exists in optional NuGet packages. Your .NET Core apps are smaller than ever (and will get even tighter in future releases) and run amazingly well in containers/Docker and in the cloud where density is needed.”
There are so many exciting features in .NET Core 3.0. Head over to the .NET Blog to read all of the details.
NOTE if you are working with .NET Core 3.0, you will need to use Visual Studio version 16.3 or greater.
.NET Core Desktop Application Support
.NET Core 3.0 includes full support for Windows Forms and WPF applications.
In Visual Studio 2019 version 16.3, you have the familiar tooling you expect for building and publishing WPF applications, including the WPF XAML designer, tools for creating MSIX packages for WPF applications and more.
Also, we are happy to announce that the first preview version of the Windows Forms Designer for .NET Core projects is available today! We are in the very early days of the designer, so it’s available as a Visual Studio extension (“VSIX”). Once you install the .NET Core Designer, Visual Studio will automatically pick the correct designer based on the target framework of your application. This preview of the designer supports a subset of controls, but more will be added every month in further preview versions. That’s why we don’t recommend porting your Windows Forms applications to .NET Core yet if you need to use the designer on a regular basis.
In addition to supporting WPF and Windows Forms with .NET Core, we recently introduced support for WPF and Windows Forms in Visual Studio App Center as a public preview. This blog post will give more details.
Please reach out with your suggestions, issues, and feature requests. We appreciate your engagement!
.NET Applications in Containers
Developers building Azure Functions (v2) can now add Docker container support (Linux only) to their C# projects. This can be done by right-clicking the project name in Solution Explorer and selecting Add > Docker Support. In addition to adding a Dockerfile to your project, the debug target will be set to “Docker” which means when you debug your Function app it will happen inside the running container.
Also, be sure to check out the Visual Studio Container Tools Extensions (Preview) for a glimpse of even better tooling coming in Visual Studio 2019 version 16.4 Preview 2.
Since C# 8.0 and .NET Core 3.0 are out today, Visual Studio tooling is updated to make you more productive when using these new tools. Here’s a taste of the dozens of refactorings and happiness features we’ve added.
You can wrap chains of fluent calls with a refactoring. To try this out, place your cursor on a call chain and press Ctrl + . to open the Quick Actions and Refactorings menu.
Now you are also able to rename a file when renaming an interface, enum or class. To do so, just place the cursor in the class name and type Ctrl + R, R to open the Rename dialogue and check the Rename file box.
.NET in version 16.4 Preview 1
If you are a developer wanting to try the cutting-edge tools in .NET, check out the features in Visual Studio 2019 version 16.4 Preview 1. It includes new .NET Core 3.0 app publishing options: Ready to Run (Crossgen), Linking, and SingleExe (make tiny .NET Core 3.0 apps) as well as new templates. Again, the release notes contain a larger list of features.
Visual Studio 2019 version 16.3 brings new productivity features to all C++ developers and enhancements to the C++ cross-platform development experience.
Beyond those two aspects (which we’ll dive into next), those of you following our C++ Standard conformance efforts will be glad to hear that in the C++ Standard Library (STL), several new preview features are available under the /std:c++latest switch, including C++ Concepts! Concepts are predicates that can be used to express a generic algorithm’s expectations on its template arguments.
There are several improvements for C++ developers to be excited about. For example, you can toggle line comments using the keyboard shortcut Ctrl + K, Ctrl + / to easily set aside code you don’t want to compile just yet.
The IntelliSense completion list is now more powerful than ever with a built-in filter that considers type qualifiers. For example, if you type after const std::vector, the list will now filter out functions that would illegally modify it, such as push_back.
Next, a new default semantic colorization scheme allows you to better understand your code at a glance. You will notice new colors in the following areas: functions, local variables, escape characters, keyword – control (if/else/for/return), string escape characters, and macros. There is also an option to differentiate between global and member functions and variables. The screenshots below illustrate new colorization for the blue and dark themes of Visual Studio:
Lastly, we turned IntelliCode on by default for C++ developers for AI-powered IntelliSense, added a way to configure the Call Stack window to hide or show template arguments for improved readability, and added some new CppCoreCheck rules to Visual Studio Code Analysis, including a new ‘Enum Rules’ rule set and additional const, enum, and type rules.
Switching gears from productivity to cross-platform development, we made several user experience improvements. First of all, for CMake projects, you can now install missing 3rd party libraries that your application depends on straight from the IDE, using Vcpkg, our cross-platform C++ library manager. You will need to have Vcpkg installed on your machine, have run ‘vcpkg integrate install’ to set it up, and have a vcpkg toolchain file in your CMake project to take advantage of this feature. When you activate this feature, Vcpkg will download your library from source, compile it for you, and make it available for use for your future builds. This quick action will also install the package’s upstream dependencies for you.
Next, the CMake Settings Editor has been updated with better settings descriptions and links to documentation so it is easier than ever to configure your project. Below is a screenshot of the new experience:
There were a few more improvements to the cross-platform development experience. This includes environment variable support for configuring debug targets and custom tasks in launch.vs.json and tasks.vs.json. In addition, remote header copies for Linux projects now run in parallel for improved performance. Visual Studio’s native support for WSL also supports parallel builds for MSBuild-based Linux projects. Lastly, you can now specify a list of local build outputs to deploy to a remote system with Linux Makefile projects.
With this release you will enjoy a revamped testing experience for your Python projects. Not only there is now support for the popular pytest framework, but the support for the unittest framework has been improved to provide you with a more seamless testing experience. Let’s walk through some of those improvements from configuring & executing tests, to debugging, and finally code coverage.
Configuring and Executing Tests
Let’s look at how you do this for Python projects, and then for the Open Folder scenario.
To enable the testing experience within Visual Studio for Python projects, right-click on the project name and select the ‘Properties’ option. This option opens the project designer, which allows you to configure tests by going to the ‘Test’ tab. From the ‘Test’ tab, simply click the ’Test Framework’ dropdown box to select the testing framework you wish to use, as you can see in this screenshot:
Pressing CTRL+S initiates test discovery for the testing framework you have selected, whether that is pytest, or unittest.
For Open Folder scenarios, the testing experience relies on the PythonSettings.json file for configuration. This file is located within your ‘local settings’ folder as shown here:
Code Coverage for Tests
Below you can see how Code Coverage is supported for unittest and pytest in both project mode and open folder scenarios:
To enable Code Coverage for your currently opened project/folder, you must install the Python package, coverage, into your active virtual environment. Then, you can analyze Code Coverage by going to the Test Explorer and selecting Analyze Code Coverage for All Tests.
Version 16.4: Our Next Servicing Baseline
When version 16.4 moves to the release channel later this year, it will be the second “servicing baseline” for Visual Studio 2019. We introduced servicing baselines with Visual Studio 2019 to provide large organizations increased flexibility over when they adopt the new features in minor version updates included in the Enterprise and Professional editions. Unlike versions 16.1, 16.2, and 16.3, which received servicing fixes only until the next minor update is releases, we offer fixes for servicing baselines for an extended period. We will service version 16.4 for 12 months after the next servicing baseline is declared.
As version 16.0 is the first servicing baseline, it will continue to receive servicing fixes for one year after version 16.4 releases later this year. Full details can be found at Visual Studio Product Lifecycle and Servicing.
Update now and let us know what you think
If the above summary got you as excited as we are, head on over to visualstudio.microsoft.com/downloads to get the latest releases. As always, you can continue to use the Report a Problem tool in Visual Studio or head over to the Visual Studio Developer Community to track issues or suggest a feature. We continue to make many tweaks and improvements along the way to address your feedback, and rest assured that we will continue doing so in releases going forward.