Search code examples
azurexamarinxamarin.iosazure-cosmosdbvisual-studio-mac

Errors running the getting started Xamarin Project from Azure on Visual Studio Mac


I am trying out CosmosDB and Visual Studio Mac for the first time and I'm getting errors such as

The base class associated with this Xaml file could not be found

/Users/Downloads/DocumentDB-Quickstart-Xamarin/packages/Xamarin.Forms.2.3.3.180/build/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.targets(3,3): Error MSB4018: The "XamlCTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file "/Users/Downloads/DocumentDB-Quickstart-Xamarin/iOS/obj/iPhoneSimulator/Debug/DocumentDBTodo.iOS.exe.mdb".
File name: '/Users/Downloads/DocumentDB-Quickstart-Xamarin/iOS/obj/iPhoneSimulator/Debug/DocumentDBTodo.iOS.exe.mdb'

All I did was

  1. Create a cosmos db using the SQL/DocumentDB access
  2. Click on quickstart and download the Xamarin cosmos db quickstart
  3. Build and Run

Was there something in my setup that I'm missing?


Solution

  • The template has not been updated with the latest Xamarin.Forms and VS is not being able to compile the code.

    Update the Xamarin.Forms package manually by right-click (over the package) -> Update. Once updated clean and rebuild your project and you will be good to go.

    Hope this helps.-