I've installed a fresh copy of Visual Studio 2017 Community Edition on Windows 10 Pro Fall Creators Update recently, and I'm unable to properly create a new ContentPage on Xamarin.Forms (see screenshots 1-3). At my first attempt of creating a new ContentPage in a new Xamarin.Forms project, I encountered the errors seen on screenshot 1 and 2.
Next, an automated error log was generated (as attached). If I don't create any new items and run as-is, I can successfully launch the app on my Android emulator with no issues.
Exception of type 'System.Exception' was thrown
The project system has encountered an error.
Did not find new element in the hierarchy for item "Page2.xaml". The
item would have been added with type "Page". The project item
schema service knows about this item type. The item does exist
in the project file.
A diagnostic log has been written to the following location: "C:\..." (see below link)
Automatically generated error log file - txt
The issues arise when I create a new ContentPage. The code-behind .cs file and .xaml file will not be immediately visible in the Solution Explorer. I need to manually click the Show All Files button to show the newly created files (as seen in screenshot 3). However, I couldn't include them into project despite multiple tries.
When I open a .xaml file (in this case Page2.xaml), errors mentioning missing references and assemblies are visible (see screenshot 4 below).
I've done the following thus far:
- Removed mobile app development (Xamarin) in the Visual Studio installer
- Reinstalled Xamarin by including (checking) the mobile app development (Xamarin) in the Visual Studio installer
Are there any known solutions to this issue? Any assistance is kindly appreciated. Thanks!
UPDATE (Feb 27): Attempted recommendation by Paul-Jan but the issues still persist. However, the newly created Page1.xaml was properly included and recognized by Solution Explorer (as shown below).