Visual Studio 2019 16.2.0 - XAML0414 Xaml Namespace is missing

The type 'MainWindow' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

Fresh installation of the Visual Studio 2019 16.2.0. File - New - Project - set the language filter to VB.NET, select WPF App (.NET Framework). Next, give it a name, accept the other defaults including using the latest .NET Framework 4.7.2. Wait for the wizard to build the framework.

Create new project
WPF VB.NET Main Window


Notice that there is an error in MainWindow.xaml that has just been created for you by Visual Studio! There is a Quick Actions helper that offers 3 fixes, but none of these resolve the problem and the code they add are then marked as unnecessary and VS2019 says they should be removed.

MainWindow.xaml


Also if you go to Application.xaml, there is a similar issue.

Application.xaml


Neither of these issues occur if you do the same process with a new C# project, so Microsoft hasn't been testing the basic File - New - Project functionality with VB.NET as thoroughly as it has been with C#. This was reported by Andrey Koltsov on 31 July but was closed as a duplicate and we are waiting for Microsoft to respond. They describe it as a ghost error which will not affect the project build and run, but it does not inspire confidence for new users if their own auto generated code has bugs.

 

Update  15 Aug 2019

Microsoft say this will be fixed in 16.3

Update  25 Sep 2019

Visual Studio 16.3 fixed this.