Bug: XamlCTask task could not be initialized
I am documenting this since this is a bug in Xamarin.Forms nuget package version 220.127.116.11. You’ll get an error like,
"XamlCTask" task could not be initialized with its input parameters.
The "DebugType" parameter is not supported by the "XamlCTask" task.
The best solution is to update your nuget package for Xamarin.Forms, just make sure that all projects have the same version. The current latest version 18.104.22.1687 does not have this issue.
But if you can’t update nuget packages, here is how to fix this issue,
- Open the packages/Xamarin.Forms.22.214.171.124\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.Targets file in notepad, and
- Remove the DebugType = “$(DebugType)” line ..
Clean/Rebuild, you should be good to go!