News: 1611238398

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Visual Studio 16.9 Preview 3 brings Chromium WebView debugging, noisy tests for visually impaired, and more

(2021/01/21)


Preview 3 of Visual Studio 2019 16.9, the next big release of Microsoft's Windows IDE, features debugging for Chromium-based WebView, audio cues in tests, and updated C++ support.

The Visual Studio release cycle is based around minor version updates every three or four months with previews in between. Version 16.9 will be a "servicing baseline" release, which means it has longer support than most, extended to one year.

[1]

A key new component for Windows desktop developers is WebView2, a browser control based on Edge Chromium rather than the old Internet Explored-based Trident. This is in preview, but how do you debug it if things are not as expected?

Built-in developer tools can be used by clicking on the control at runtime and pressing F12, but now there is also an option to enable the Visual Studio JavaScript debugger in Project Properties. JavaScript devs also get new options for running test frameworks such as Mocha and Jest and the built-in Test Explorer, including in .NET and .NET Core project types.

[2]

[3]

Chromium-based WebView2 has improved debugging support in the latest Visual Studio preview

Another new feature can configure sounds to play when a test succeeds or fails. "We had some fun with this," [4]said the Visual Studio team , though it is also intended to be an accessibility feature for developers with visual impairments.

We looked in vain at the Test options in our version, but they can be found in Windows Sound Settings under Microsoft Visual Studio. On the subject of accessibility, Visual Studio support for Windows High Contrast Settings is now optional as it caused problems for some.

There are a bunch of new features for C++, including better CMake support for remote development (such as deploying and debugging on Windows ARM64), support for the LLVM version of the OpenMP runtime, and improved IntelliSense. There is gradually improving support for C++ 20.

Also a work in progress, according to the [5]roadmap , is the ability to build and debug natively on Windows Subsystem for Linux 2. There are also bug fixes including one for a [6]bad optimisation that generated incorrect code in infinite loop constructs – note that these are not intended to run infinitely, but rather until an explicit break statement is hit.

A [7]recent survey of 4,000 developers conducted by the Entity Framework Core team gave some clues about how Visual Studio is used, at least among .NET Core developers. Despite the popularity of Visual Studio Code in the wider development world, the great majority of respondents said they use Visual Studio: 2,814 versus 386 using VS Code and 364 using JetBrains Rider. A factor in this is that most develop on Windows, nearly 90 per cent, with the other 10 per cent split mainly between Linux and Mac.

[8]

Entity Framework Core developers largely target ASP.NET but Windows Presentation Framework and Windows Forms both have significant use

The apps they are writing are dominated by ASP.NET Core Web API and ASP.NET Core MVC or Razor, though there is substantial interest in ASP.NET Core Blazor for both server and WebAssembly. WPF is the most popular desktop framework, but the ancient Windows Forms is not far behind – and, yes, there are actually [9]new features in Windows Forms for .NET 5.0 now that the community is able to submit changes.

Another survey question asked about how developers address issues. At the top of the list was "Search for the issue on StackOverflow". The Microsoft team said that devs may undervalue what can be learnt from logs and from searching GitHub issues for an open-source project like Entity Framework Core.

[10]

That said, those deeply involved with a library like this may not appreciate that for many developers, the issues are not so much about intricate details, and more about trying to understand the basics of how the stuff is meant to work. ®

Get our [11]Tech Resources



[1] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YAmzKUkbXdaMLctdP@DpfQAAAIQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YAmzKUkbXdaMLctdP@DpfQAAAIQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[3] https://regmedia.co.uk/2021/01/21/webview2.jpg

[4] https://devblogs.microsoft.com/visualstudio/visual-studio-2019-v16-9-preview-3/

[5] https://docs.microsoft.com/en-us/visualstudio/productinfo/vs-roadmap

[6] https://developercommunity2.visualstudio.com/t/Visual-Studio-2019-produces-incorrect-co/1238360

[7] https://devblogs.microsoft.com/dotnet/help-us-plan-ef-core-6-0/

[8] https://regmedia.co.uk/2021/01/21/app-targeted.jpg

[9] https://devblogs.microsoft.com/dotnet/whats-new-in-windows-forms-runtime-in-net-5-0/

[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YAmzKUkbXdaMLctdP@DpfQAAAIQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[11] https://whitepapers.theregister.com/

itzumee

Just had a quick look at the MS docs for WebView, seems pretty limited in what it can do compared with the old IE-based equivalent which allowed manipulation of the DOM.

Tim Anderson

Rick Strahl has done some blog posts going into detail on WebView2 and how it compares to the old one. See:

https://weblog.west-wind.com/posts/2021/Jan/14/Taking-the-new-Chromium-WebView2-Control-for-a-Spin-in-NET-Part-1

NerryTutkins

I recently started a windows forms project using .NET 5 for first time. I looked for the webview control, but noticed it was missing, and guessed was because it was IE based and that is obsolete now.

In the end I used selenium to remote control Chrome instead, and I actually think it's a better result for what I needed to do and I can access the DOM and use xpath to find values in a page and so on.

What's really needed

Mike 137

" The Visual Studio release cycle is based around minor version updates every three or four months with previews in between. "

The optimum development tool is one that is thoroughly familiar to the developer so it intrudes as a tool as little as possible into the development process, leaving the user free to concentrate on the task they're trying to accomplish.

Quarterly updates, particularly if they include any significant changes to features or functionality, place the user on a permanent learning curve, making the tool a barrier between the user and their task. This can't possibly be a really good idea.

The real purpose behind this update cycle (demonstrated by the "previews") is most likely maintenance of a license revenue stream, rather than facilitating software development for the user.

Re: What's really needed

iron

You are completely free to skip these upgrades an lose out on useful new features like HotReload in Xamarin apps or performance improvements in your applications. The VS interface itself doesn't change.

Re: What's really needed

NerryTutkins

Visual Studio is so big, the changes rarely change the interface significantly. Even the recent changes to the GIT dialogs were pretty logical and quick to get used to.

There is a community edition, and most who are on paid versions will get updates through their licensing anyway.

The updates tend to revolve around tooling for new things like .NET 5 and so on, a development tool has to keep moving to support the various technologies it is used for authoring on.

Danger: do not shake.