1
头图

What's new in Visual Studio 2019 v16.10?

We are happy to announce the release of Visual Studio 2019 v16.10 GA and v16.11 preview 1. This version makes our theme "Developer Productivity and Convenience" universally applicable to Visual Studio users! We added c++ 20 features, optimized Git integration, analysis tools, and many features to improve development efficiency.

Download the latest Visual Studio version to try out the new features in 16.10. As always, we hope you provide feedback and interaction developer community
install visual studio 2019 v16.10

C++

Our compiler and STL are now fully functional and suitable for the latest available C++20 standard! 16.10 brings some highly anticipated features: calendar, time zone and <format>. These features can all be used under the /std:c++latest switch. However, the /std:c++20 switch is not yet available, because some features are expected to be corrected in the defect report (ISO c++20 bug fix) in an ABI incompatible way (for more details, please refer to Microsoft/STL Issue #1814 ).
<format> is a new text format tool fmtlib It provides a fast and safe alternative to the iostreams and printf series:

auto version = 20;
std::format(“STL is now C++{} feature-complete!”, version);

The calendar and time zone are <chrono> tool. They provide a type-safe and time zone aware way to represent and manipulate dates and times.

std::chrono::year_month_day world_bee_day = May/20d/2021y
std::format("Buzz buzz on %F!”, world_bee_day);

In addition, we have improved the IntelliSense experience of modules, scopes and concepts. "Go to definition" applies to both the module itself and the definition imported from the module. It is notoriously difficult for the compiler to get into scope, but IntelliSense can now do it for you. In addition, the defined concept name will be automatically completed.

Visual Studio 现在具有范围的补全.gif

Now, in addition to x64, x86 and ARM64 also support the LLVM OpenMP runtime. Use the /openmp:llvm switch to point to it.
If you want to use a c++ 20-style coroutine, but target c++ 11 or c++ 14, you can now use the /await:strict switch to get the desired behavior.
We have improved the debugging and visualization of coroutines. In particular, the visualization of std::coroutine_handle now shows the original coroutine function name and signature and the current hang point.

协程调试和可视化已得到改进.png

If you are using our CMake support, then you can now use CMakePresets to specify the configuration instead of using cmakessetting .json. This format is consistent between Visual Studio, Visual Studio Code, and any other tools that support this new standard.

Git productivity

The status bar has a new branch selector that allows you to filter local and remote branches and perform common operations from the right-click shortcut menu.

状态栏中的分支选择器.png

Now, when you select a branch individually, the branch selector in the status bar and the Git Changes window will move to the local or remote branch.

左击以检出一个分支,右击以获得其他操作.png

Filter and switch local Git repositories from the repository selector in the status bar. Right-click the shortcut menu to delete items from the list.

通过上下文菜单从存储库选择器列表中删除项.png

Click the unpush commit button in the status bar, and synchronize commands in the Git menu to synchronize (pull and push) your branch to the remote.

同步按钮在状态栏.png

Even if there is no incoming commit, it can be retrieved and pulled from the history pane of the Git Repository window. Access these sections from the status bar or keyboard shortcut Ctrl+0+Y.

进入部分在Git Repository窗口与调出取和拉按钮.png

Select a commit in the Git Repository window, you can view its details and comparison of file changes without having to navigate to other windows. Select two submissions and right-click to compare them in the same window. Pop up the details into their own window and display them in full screen to gain insight into the changes.

在Git Repository窗口中嵌入提交细节和文件比较.png

Check the number of deletions and insertions in the file, and change the layout of the comparison.

弹出多个提交窗口.png

Now you can perform more actions from the Git Changes window. The toolbar icons are customizable, and you can choose which operations are displayed. You can synchronize with multiple remotes from the extended menu. You can also open the remote web page of the repository in your browser.

Git 更改溢出菜单,标注同步、在浏览器中打开和工具栏操作.png

When opening the Azure DevOps Git library, it will automatically reconnect or prompt to establish the initial Azure DevOps connection. This allows access to work items and builds in the open repository.

当缺少Azure DevOps初始连接时,提示信息栏.png

When rebuilding or merge conflicts are resolved, the merge editor and shortcut menu will display the branch names of the current and incoming branches. This fixes the confuses the source and target terms .

快捷菜单在解决冲突时显示分支名称.png

“重建”和“合并”编辑器在标题中显示分支名称.png

We have added menu items, which are shortcuts for PR creation and list pages, making it easier to create and view pull requests. The menu is dynamic, based on whether your repository is on GitHub or Azure DevOps.

从Git菜单中创建一个PR并查看web上的PR列表.png

Git settings

We have added some new options in Git> Settings to manage opening and switching repositories. Now, when switching to another repository, you can keep the current solution open.

设置以保持当前解决方案处于打开状态.png

You can also choose not to load the repository root folder when opening the repository. This will leave the solution explorer empty and you will not get a list of solutions.

设置打开文件夹.png

However, if you choose to open the root folder, Visual Studio will no longer automatically load the solution. Instead, you will see the available folder views and solutions in a list. You can change this behavior by toggling the checkbox in Git> Settings.

设置为切换解决方案资源管理器的自动导航.png

By double-clicking the branch name, you can choose to check out the branch from the Git Repository window. If you want to change this behavior, then toggle the checkbox in Git> Settings.

切换自动sln加载和分支迁出的设置.png

Performance profiler

The start page of Performance Profiler now has some links to help users find online documents, detailing how to use these tools and our toolbox video series. You can use them to learn more about these tools and learn how to better identify areas in the code for optimization and verification changes.

图形用户界面,文本,应用程序,电子邮件描述自动生成.png

The .NET object allocation tool in Performance Profiler is the first tool to transition to our new analysis engine, which is significantly faster and provides more features. After collecting, get the results and build the call tree faster (about 40% increase). We now also support SourceLink to pull source code, so you can see exactly where the code is allocated, even if it is not in your code.

图形用户界面描述自动生成.png

This requires the symbol corresponding to the code, which can be enabled by pulling down from the Microsoft symbol server and selecting Debug>Options>Symbols.

图形用户界面,文本,应用程序描述自动生成.png

container

This version provides some exciting features for users of Docker container tools. You can now run any combination of services defined in the combination file and enjoy improved container and image management in the container window. For more information, please refer to the container new feature announcement in our 16.10 Preview 3 blog.

.Net productivity

Our .net team brings you several features to help you continue to increase productivity.

We have added the function "Delete unused reference commands". This command allows you to clean up unused project references and NuGet packages. By default, this option is turned off, but you can enable it under the menu Tools> Options> Text Editor> c#> Advanced. Select the delete unused reference command in the Solution Explorer (experimental). Once this option is enabled, the delete unused reference command will appear in the right-click menu of the project name or dependency node.

删除解决方案资源管理器中未使用的引用.png

删除未使用的引用对话框.png

When you choose to delete unused references, a dialog box will open. You can then view all the references that will be deleted, but you can also choose to keep any references you wish to keep.

Completion of IntelliSense

When the type is known, even if the Enum value is not entered, it will be completed by the extra IntelliSense of the Enum value. We have also expanded this option to include coercion, indexer, and operator completion.

枚举的智能感知完成.png

There is now a completion option to automatically insert parameters when writing method calls.

在编写方法调用时自动插入参数.png

This feature is turned off by default, so you need to enable it in Tools>Options>Text Editor>c#>IntelliSense, and then select Tab twice to insert parameters (experimental).

To use this feature, first write a method call, and then press the tab key (tab+tab) twice. Note that the method call contains parameters based on the default value of the method. Use the parameter information to cycle through the list of parameters you want to insert by pressing the up and down arrow keys. Start typing a parameter to bring up the IntelliSense completion list and enter a semicolon, which will submit the parameter and add a semicolon at the end of the method call.

Visualize and navigate the inheritance chain

Now, there is a visual representation function for navigation and checking inheritance.

导航继承链的可视化指示器.png

By default, this option is turned off, so you need to turn it on in Tools> Options> Text Editor> c#> Advanced, and then select Show inheritance margin. Enabling inherited margins will add new icons to margins representing code implementation and rewriting.
Click the inheritance margin icon to display inheritance options you can navigate to.

通过单击边距图标导航继承链.png

Test Explorer accessibility improvements

We have made some updates to the Test Explorer to improve the accessibility of the keyboard and the usability of the test details window and log files. test experience accessibility improvement in the 16.10 preview 3 blog.

WinForms update

We have refactored the behavior services of Visual Studio 16.10. This makes the performance of the new WinForms designer of .net Core 5 and 6 significantly improved. This also fixes many issues related to selecting, dragging and dropping multiple controls.

XAML tool update

We continue to improve existing features and add new features to make you more efficient when developing XAML UI.

XAML designer quick action

Now you can quickly change the properties of the control by using the pop-up menu behind the light bulb displayed for the selected control.

XAML设计器中的快速操作.png

When you select a control in the XAML designer, you will see a light bulb. Once the control is clicked, a list of the most commonly used properties of this particular control will be displayed, saving you the time of finding these properties in the property explorer or entering code in the XAML editor.

Support controls:

  • WPF: Border, Button, Canvas, CheckBox, ComboBox, Grid, Image, Label, ListBox, ListView, StackPanel, TextBlock, TextBox.。
  • UWP: Border, Button, Canvas, CheckBox, ComboBox, Grid, HyperlinkButton, Image, ListBox, ListView, NavigationView, RadioButton, Slider, StackPanel, TextBlock, TextBox.

This feature is applicable to UWP, WPF Core and WPF Framework (enable the "New WPF XAML Designer for .NET Framework" feature flag). You can also create your own actions, please refer to XAML Designer Extensibility GitHub learn more.

XAML sample data

Generally, to see the appearance of a control using data values, you must implement all data binding, populate the database with values, and run the application. With this feature, you can see the appearance of the control through "fake" data in the designer. Set d:ItemSource='{d:SampleData}' on ListBox, ListView or DataGrid. The control will automatically populate a "fake" data that matches your datatemplate and BindingPaths. These data are displayed in the designer and will not affect the source code.
You can use the ItemCount property to change the number of items generated, for example: d:ItemSource='{d:SampleData ItemCount=3}', it is set to 5 by default.

What's new in Visual Studio 2019 v16.11 Preview 1

.NET hot reload

In this version, we are happy to provide the first version of the new hot reload user experience, which can be used when editing code files for applications such as WPF, Windows Forms, ASP.NET Core, and consoles. With hot reloading, you can now modify your application management source code at runtime without having to pause execution or use breakpoints. Instead, just make the supported changes and apply them immediately using the new "Apply Code Changes" button in the toolbar.

a-picture-containing-text-monitor-screenshot-in.gif
Make changes and hot load the WPF application.

In this update of Visual Studio, when you run your application under the debugger (F5), this new experience is already available. It is driven by the edit and continue (EnC) mechanism . .NET hot reloading can also work with XAML hot reloading, making it possible to make UI and code background changes in desktop applications (such as WPF or WinUI).

EnC and hot reload have the same restrictions, so not every type of editing is supported. A complete list of supported or unsupported can be found in our document .

Hot reloading can now also be used under CLI tools of .NET 6 Preview3 or higher. For more details, please refer to the blog published by .NET.

This is the beginning of our journey. In Visual Studio 2022 and the future version of .NET 6+, we will seek and further improve this experience, for example, there is no debugger (CTRL- F5) reduces the number of unsupported edits, allows editing of Razor pages, supports hot reloading and .NET MAUI applications, etc. If you want to know more details about our technology, please refer to our detailed blog post on the .net blog.

We really hope that you can try hot reloading in your application and provide feedback through the feedback feature of Visual Studio.

.NET MAUI

Visual Studio 16.11 Preview 1 adds support for .NET MAUI! The .NET Multiplatform Application UI (MAUI) will be officially released in November this year. It is the best way to write cross-platform applications for iOS, Android, Windows and Mac . .NET 6 Preview 4 today released new .NET MAUI features, including individual project improvements, capabilities for all supported platforms, and Blazor hybrid desktop support! Visual Studio 16.11 p1 allows you to open, build and debug .NET MAUI applications from the IDE, and add functionality to the new single project architecture. In addition, you can use the new project configuration wizard to create new .NET MAUI applications!

.NET MAUI 演示应用程序 WeatherTwentyOne.png
.NET MAUI demo application
WeatherTwentyOne

Using .NET MAUI and Visual Studio, you only need one project in your solution to target mobile devices and desktops. Images, fonts, application information, and even splash screens can all be defined in a project and deployed to each platform at compile time. With multiple targets, you can debug on any supported platform without having to maintain different projects for different target frameworks. For more information about the new .NET MAUI single project architecture, you can watch 2021 Nian May Xamarin community station will !

图片32.png

Use the single project architecture of .NET MAUI to locate Android, iOS, Windows and Mac from one project.
To try .NET MAUI now, download Visual Studio 16.11 and follow the in the 160e95a9e2fb69 .NET MAUI sample repository to install the .NET 6 Preview SDK!
For more information, see .NET MAUI Preview 4 .

install visual studio 2019 v16.11 preview 11

To experience the latest features that Visual Studio 2019 must provide, please download preview version . Do not forget that in the developer community report problems or give us feedback ! At the same time, you can also ask any questions about development Microsoft Q&A forum


MicrosoftReactor
109 声望19 粉丝

微软 Reactor 是微软为构建开发者社区而提供的一个社区空间,以“予力多元化社区建设,帮助每一个开发者成就不凡”为使命,旨在通过不定期举办的技术讲座、开发者交流会面及技术沙龙和专题活动,帮助开发者和初创企...