Runar Ovesen Hjerpbakk

Science-based software development

Two Xamarin.iOS build errors

I’m creating a new Xamarin Forms app using a PCL-project for shared code and an iOS project for the iOS specific details. After a short hiatus, I upgraded to Visual Studio for Mac version 7.0.1 for a nice morning of coding. No such luck, the iOS project would not build.

The first error

MSB4064: The “DebugType” parameter is not supported by the “XamlCTask” task. Verify the parameter exists on the task, and it is a settable public instance property.

The brave heroes of the Internet suggested to clean all bin and obj folders, together with ensuring that all projects use the same version on Xamarin forms.

Not good enough for me.

I needed to delete the app repo, update all nuget packages and then build. Cleaning bin and obj was apparently not as easy as it sounds.

The second error

This brought me to the second error. Now the iOS project would not build with the following error:

error MSB6006: “csc.exe” exited with code 1”

Crashing the compiler is always a good start for a productive day.

Fortunatly, Xamarin has a list of common issues.

The suggested solution which worked for me was to install the Microsoft.Net.Compilers pre-release version 2.3.0-beta1 NuGet package (or higher) into all of the projects to get the pre-release Roslyn C# compiler that includes the fix.

Conclusion

All software sucks.