Forum Xamarin Xamarin.Forms

The "XamlGTask" task failed unexpectedly.

GeethaThangamGeethaThangam USMember ✭✭
edited September 2018 in Xamarin.Forms

Hi,
My Xamarin.iOS application was working perfectly. Since my mac system was slow, I completely cleared the ~/Library/Caches directory. After that when I try to build the application, it throws the following error and not building the application. Don't know whether it is related to cache files or not. Need help to resolve this issue.
I'm using Xamarin.Forms -> V2.3.4.247.

Error that I have received:
/packages/Xamarin.Forms.2.3.4.247/build/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.targets(3,3): Error MSB4018: The "XamlGTask" task failed unexpectedly.
This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.
System.FormatException: Input string was not in a correct format.
at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000e9] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/text/stringbuilder.cs:1371
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00011] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:2978
at System.String.Format (System.String format, System.Object[] args) [0x00021] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:2943
at Microsoft.Build.Utilities.TaskLoggingHelper.FormatString (System.String unformatted, System.Object[] args) [0x00021] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs:93
at Microsoft.Build.Utilities.TaskLoggingHelper.LogError (System.String subcategory, System.String errorCode, System.String helpKeyword, System.String file, System.Int32 lineNumber, System.Int32 columnNumber, System.Int32 endLineNumber, System.Int32 endColumnNumber, System.String message, System.Object[] messageArgs) [0x00026] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs:134
at (wrapper remoting-invoke-with-check) Microsoft.Build.Utilities.TaskLoggingHelper:LogError (string,string,string,string,int,int,int,int,string,object[])
at Xamarin.Forms.Build.Tasks.XamlGTask.Execute () [0x000f7] in <238d10a4df434b2a927a049a46837b68>:0
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x0002a] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
at Microsoft.Build.BackEnd.TaskBuilder+d__26.MoveNext () [0x002bf] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/XMakeBuildEngine/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 (MSB4018)

Tagged:

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    Try to remove the bin and obj folders then clean rebuild your application again.
    Also can try to restart your mac.

  • GeethaThangamGeethaThangam USMember ✭✭

    Thanks for the reply. I removed the bin and obj folders. Cleaned and rebuild the solution. Closed & reopened Visual Studio. Restarted the system.

    But nothing works.

Sign In or Register to comment.