You may have noticed that all the blog posts make mention to commands that don’t exist. Such as update-database and other migration like commands
This is because these classes no longer exist in dotnetcore. If you want to save the changes you’ve made to a database, here are the following commands to issue in a command prompt, power shell or through VS Code
dotnet ef migrations add nameOfMigrationHere
And then run
dotnet ef database update
Check the database of your target and your changes will be there! You’ll even notice a table in your database showing the migration
Did you recently remove a package, but Visual Studio insists it’s there? Or did you readd it and VS seems to disagree? People on the Xamarin Forums tend to get good luck cleaning/rebuilding, and it miraculously starts working again for them. I wasn’t so fortunate and wasted a lot of time taking their word for it.
My exact error message
Error Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Google.MobileAds, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null' iosTests
If you’re like me, you’ve tried readding the package, modifying your packages.config file and still nothing is working
Here’s what you need to do:
- Locate your .csproj file and open it in a text editor (Double clicking opens it in VS)
- Press CNTRL + F and search for the offending library
- Comment out the entry or delete it
- Build the project again (Since it’s Xamarin, it will take a lifetime to build) and it will hopefully work again!
I spent days trying to figure this out. When we as Xamarin developers run into issues like this, we need to share our solutions since there is little to no support from Xamarin. I hope all my fellow Xamarin developers will find this useful!