
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.


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.

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

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.