Kenpoo
Kenpoo

Reputation: 61

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)

Upvotes: 6

Views: 3485

Answers (1)

Yokanand Thirupathi
Yokanand Thirupathi

Reputation: 99

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

Upvotes: 8

Related Questions