Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What causes the "ConvertResourcesCases" failed unexpectedly?

did anyone facing this kind of problem too? It happened when I upgrade Xamarin to current version. Already check at xamarin forum, still zero answer. Thanks.

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB4018: The "ConvertResourcesCases" task failed unexpectedly. System.UnauthorizedAccessException: Access to the path 'obj\Debug\res\values\strings.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at Xamarin.Android.Tools.Files.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(ITaskItem item, Dictionary2 acwMap) at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary2 acwMap) at Xamarin.Android.Tasks.ConvertResourcesCases.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (Gcm.Client)

like image 513
Kenpoo Avatar asked Aug 17 '15 07:08

Kenpoo


1 Answers

Delete the contents of obj folder inside project. Clean the build. Rebuild the project.

Now, everything should work fine. I had this problem once. It is due to the conflict in files that are created when you build the project

like image 139
Yokanand Thirupathi Avatar answered Sep 28 '22 17:09

Yokanand Thirupathi