I have managed to rebuild the project by remove the line DebugType = "$(DebugType)"
in the xml file below. What does this line really do and why it can fix my problem. I have the error because I pulling the new code from source tree.
<Target Name="XamlC">
<XamlCTask
Assembly = "$(IntermediateOutputPath)$(TargetFileName)"
ReferencePath = "@(ReferencePath)"
Verbosity = "2"
OptimizeIL = "true"
DebugSymbols = "$(DebugSymbols)"
/>
</Target>
I solved this problem by simply restarting Visual Studio and doing a rebuild in the solution.
I did nothing, and the project worked.
Following this thought, in your case, restarting Xamarin Studio should resolve.