链接程序集任务意外失败 Xamarin Forms [英] The Link Assemblies tasks failed unexpectedly Xamarin Forms

查看:31
本文介绍了链接程序集任务意外失败 Xamarin Forms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建跨平台应用程序,每次尝试将应用程序部署到我的 Android 手机时,我都会收到此错误.每次我必须在部署之前清理构建解决方案.导致此问题的错误是什么.

I'm creating cross platform app and every time I tried to deploy the app to my android mobile, I'm getting this error. Each time I have to clean build the solution before deploying it. What is the error that causing this problem.

严重性代码描述项目文件行抑制状态错误 LinkAssemblies"任务意外失败.System.IO.IOException:进程无法访问文件'C:\用户\用户\文档\Visual Studio2015\Projects\Camera\Camera\Camera.Droid\obj\Debug\linkdst\Camera.Droid.dll'因为它正在被另一个进程使用.在System.IO.__Error.WinIOError(Int32 errorCode, String MaybeFullPath) 在System.IO.FileStream.Init(String path, FileMode mode, FileAccess访问、Int32 权限、布尔 useRights、FileShare 共享、Int32bufferSize、FileOptions 选项、SECURITY_ATTRIBUTES secAttrs、字符串msgPath、布尔 bFromProxy、布尔 useLongPath、布尔 checkHost)在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess访问)在 Xamarin.Android.Tools.Files.HashFile(字符串文件名,HashAlgorithm hashAlg) 在 Xamarin.Android.Tools.Files.HashFile(String文件名)在 Xamarin.Android.Tools.Files.HasFileChanged(字符串源,字符串目的地)在Xamarin.Android.Tools.Files.CopyIfChanged(字符串源,字符串目的地)在Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfChanged(字符串源,字符串目标)在 Xamarin.Android.Tasks.LinkAssemblies.Execute()在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecution Host.Execute() 在Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Camera.Droid

Severity Code Description Project File Line Suppression State Error The "LinkAssemblies" task failed unexpectedly. System.IO.IOException: The process cannot access the file 'C:\Users\User\Documents\Visual Studio 2015\Projects\Camera\Camera\Camera.Droid\obj\Debug\linkdst\Camera.Droid.dll' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at Xamarin.Android.Tools.Files.HashFile(String filename, HashAlgorithm hashAlg) at Xamarin.Android.Tools.Files.HashFile(String filename) at Xamarin.Android.Tools.Files.HasFileChanged(String source, String destination) at Xamarin.Android.Tools.Files.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.MonoAndroidHelper.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build. BackEnd.ITaskExecution Host.Execute() at Microsoft.Build.BackEnd.TaskBuilder. d__26.MoveNext() Camera.Droid

推荐答案

试试这些:

1.将 Xamarin Forms 包更新到 2.5.0.91635.2.将所有Android包更新到25.4.0.2.3.重新启动Visual Studio.4.删除Bin &Portable & 中的 Obj 文件夹安卓.

1.Update Xamarin Forms package to 2.5.0.91635. 2.Update all Android Packages to 25.4.0.2. 3.Restart Visual Studio. 4.Delete Bin & Obj folders in Portable & Android.

这对我有用.

这篇关于链接程序集任务意外失败 Xamarin Forms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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