Xamarin Studio错误MSB4018:“ ConvertResourcesCases”任务意外失败 [英] Xamarin Studio Error MSB4018: The "ConvertResourcesCases" task failed unexpectedly

查看:78
本文介绍了Xamarin Studio错误MSB4018:“ ConvertResourcesCases”任务意外失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试构建解决方案时出现以下错误。我正在尝试更新一个已经几个月没有碰到的现有项目。它在我的PC中的位置没有更改。

I am getting the following error while trying to build my solution. I am trying to update an existing project that I haven't touched for a few months. Its location in my PC has not changed.

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB4018: The "ConvertResourcesCases" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'obj\Debug\res\anim\slide_out_left.xml'.
File name: 'obj\Debug\res\anim\slide_out_left.xml'
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.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (TekaTekiMalaysia.Droid)

I从其他线程中读取了我要取消阻止的信息通过文件资源管理器打开文件,但是该选项对我不可用。

I've read from the other thread that I've to 'Unblock' the file via File Explorer but such option is not available for me under properties.

我还尝试将解决方案移到文件夹树上的另一个文件夹。

I've also tried moving the solution to a different folder up the folder tree.

还尝试通过授予文件夹完全控制权限来更改文件夹属性。

I've also tried changing the folder properties by giving it Full Control permission.

我正在使用Xamarin Studio构建项目。任何想法导致问题的原因是什么?

I am using Xamarin Studio to build the project. Any ideas what is causing the issue?

推荐答案

好,我终于明白了。为了使那些遇到相同问题的人受益,这里是我如何解决它。这是由根解决方案文件夹中的任何非英文字符引起的。

OK I finally figured it out. For the benefit of those encountering the same problem here's how I fix it. It's caused by any non English character in the root solution folder.

例如,我原来的解决方案位置是

For example my original solution location is

D:\Users\OneDrive\Dev\Xamarin\TekaTeki3\TekaTeki3\

我创建了一个新文件夹,并将文件夹从 TekaTeki3 重命名为 TekaTekiTiga 。现在它可以正确编译了!

I created a new folder and rename the folder from TekaTeki3 to TekaTekiTiga. Now it compiles properly!

D:\Users\OneDrive\Dev\Xamarin\TekaTekiTiga\TekaTeki3\

这篇关于Xamarin Studio错误MSB4018:“ ConvertResourcesCases”任务意外失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆