【发布时间】:2016-01-11 03:30:02
【问题描述】:
我在尝试构建我的解决方案时遇到以下错误。我正在尝试更新几个月未触及的现有项目。它在我的电脑中的位置没有改变。
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)
我从另一个线程中读到我必须通过文件资源管理器“取消阻止”文件,但在属性下我无法使用此类选项。
我还尝试将解决方案移至文件夹树上的不同文件夹。
我还尝试通过授予 Full Control 权限来更改文件夹属性。
我正在使用 Xamarin Studio 来构建项目。任何想法是什么导致了这个问题?
【问题讨论】:
-
你能在 Xamarin Studio 之外打开
obj\Debug\res\anim\slide_out_left.xml吗? -
slide_out_left.xml从obj\Debug\res\anim` but I can open it from its original location which isResources\anim` 中丢失,没有问题。每次我重新构建解决方案时,都会报告找不到不同的文件并且构建失败。 -
您使用的是哪个版本的 Xamarin Studio?如果您删除
obj\Debug文件夹会发生什么情况? -
我使用的是版本 5.10.1(构建 6)。如果我删除
obj\Debug,它将在下一次构建操作中重新创建。
标签: c# xamarin cross-platform xamarin-studio