Following are the list of problems I am addressing here.
No resource found that matches the given name “Theme.AppCompat.Light” and similar 100+ errors during build.
Couldn’t able to sign into my Xamarin account from visual studio 2017 preview.
Packaging error - “jarsigner.exe” exited with code 1
Project not selected to build for this solution configuration
GoogleServicesJson BuildAction missing
App runs in debug mode, crashes in release mode
Input string was not in a correct format - XAML
The strikethrough indicates that I have found solutions for them. Solutions that worked for me explained below,
Solution for #1: No resource found that matches the given name “Theme.AppCompat.Light” and similar 100+ errors during build.
To solve this, I deleted the Xamarin directory in this path C:\Users\username\AppData\Local\ then opened the solution, rebuild and it worked.
I was trying login in VS 2017 Preview 15.4.0 and it wasn’t working. After adding the Xamarin related feature pack to my 15.3.3 stable VS 2017, I tried the login in it and it worked. Then checked the login status in VS preview and that was also in the same state as in the stable.
I reported the problem #2 to VisualStudio developer community and here is the link
Updated Xamarin.Forms from 184.108.40.206 to 220.127.116.110. Restarted visual studio. Changed configuration to Release. Tried to deploy and it worked. Switched back to Debug configuration and rerun. And it too worked.
Found the solution, check your configuration manager and make sure that the “Deploy” box is checked for your target platform. The configuration manager can be found by selecting it from the drop-down arrow next to “Debug”.
This is the second time I came across this problem. When adding Firebase crash reporting component to our Xamarin forms app, we need to add the google-services.json file to the project as well needs to set its build action to ”GoogleServicesJson”. But after adding the file, when checked the available build actions for the file, there is no ”GoogleServicesJson”. In that case, unload the project and then edit the ”.csproj” file and add the following.
1<ItemGroup>2 <GoogleServicesJson Include="google-services.json" />3</ItemGroup>
Then reload the project. That’s it. Check the build action for the file and you can see that it is set to GoogleServicesJson.
When this issue occurred to me, I thought it is because of any configuration mistakes in my Release configuration but the issue solved by a simple process which is Clean the solution and rebuild.
This was purely my mistake but it took time to figure it out, especially when your XAML contains more elements. The issue was, the parameter I passed to one of the element’s attribute was wrong, i.e more specifically, I passed some hashcode value of some color to one element HeightRequest attribute which should be an integer. There is no warning or anything in VisualStudio to indicate the syntax error and the error during the build is just ”Input string was not in a correct format” pointing to the file.