xamarin MSB401“ResolveLibraryProjectImports”任务意外失败,系统.IO.IOException

wgeznvg7  于 2022-12-07  发布在  其他
关注(0)|答案(1)|浏览(200)

I have an XF solution that used to work flawlessly until last week.
This weekend I updated my VS2017 to the latest version i.e. v 15.9.24 and I started getting this compile-time error which says that my classes.jar is being used by another process. No other processes in my knowledge should be using it!!!
The previous version of Visual studio I had was v 15.9.12.
This happens only in the Android project rest seems to build just fine.
Any suggestions are welcomed.
Severity Code Description Project File Line Suppression State Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.IOException: The process cannot access the file 'ProjPath\obj\Debug\90\lp\45\jl\bin\classes.jar' 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, FileShare share, Int32 bufferSize) at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle) at System.IO.File.SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc) at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action 2 progressCallback, Func 2 modifyCallback, Func 2 deleteCallback, Boolean forceUpdate) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection 1 jars, ICollection 1 resolvedResourceDirectories, ICollection 1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() FoodSafety.Android
Output:

  • -----已开始全部重建:项目:食品安全。Android,配置:调试任何CPU------C:\程序文件(x86)\Microsoft Visual Studio\2017\专业版\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5):警告MSB3277:在不同版本的"Microsoft. CSharp"之间发现无法解决的冲突。当日志详细程度设置为详细时,这些引用冲突会列在生成日志中。C:\Program Files(x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2):错误MSB4018:"解析库项目导入"任务意外失败。C:\程序文件(x86)\Microsoft Visual Studio\专业版\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2):错误MSB4018:System.IO.IOException:该进程无法访问文件"ProjPath\obj\Debug\90\lp\45\jl\bin\classes.jar",因为另一个进程正在使用该文件。C:\Program Files(x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2):错误MSB4018:(1327,2)..............................................错误MSB4018:(字符串路径,文件模式,文件访问权限,Int32权限,布尔值使用权限,文件共享共享,Int32缓冲区大小,文件选项选项,安全属性secAttrs,字符串消息路径,布尔值bFromProxy,布尔值使用长路径,布尔值检查主机)C:\Program Files(x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2):错误MSB4018:文件共享共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件共享文件错误MSB4018:(字符串路径、文件访问权限、安全文件句柄和句柄)C:\程序文件(x86)\Microsoft Visual Studio\2017\专业版\微软构建\Xamarin\安卓\Xamarin.安卓通用目标(1327,2):错误MSB4018:(1327,2).在系统. IO.文件.设置最后访问时间Utc(字符串路径,日期时间最后访问时间Utc)C:\程序文件(x86)\微软Visual Studio\2017\专业版\微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软微软错误MSB4018:C:\Program Files(x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin. Android. Common.targets(1327,2):在Windows平台上运行的应用程序(x86)\Microsoft Visual Studio\2017\专业版\MSBuild\Xamarin\Android\Xamarin. Android.错误MSB4018:在Xamarin上运行。Android。任务。解析库项目导入。执行()C:\程序文件(x86)\微软Visual Studio\2017\专业版\微软构建\Xamarin\Android\Xamarin。Android。公共目标(1327,2):错误MSB4018:在微软的。构建。后端。任务执行主机。微软。构建。后端。IT任务执行主机。执行()C:\程序文件(x86)\微软Visual Studio\2017\专业版\微软构建\Xamarin\Android\Xamarin. Android.公共目标(1327,2):错误MSB4018:在Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()中的"重新生成所有文件"选项卡上执行此操作。2成功,2失败,0跳过==========

更新

    • 现在看来,无论我打开什么解决方案,Android项目中总是出现此错误。即使我创建了新项目:/**
i86rm4rw

i86rm4rw1#

对于那些正在寻找解决方案的人来说,显然这不仅仅是由VS引起的,而且是因为与我的Xamarin.Build.Download包的一些不兼容。
更新它到0.4.11和更新我的VS到最新的解决了我。

相关问题