简体   繁体   English

Xamarin“GenerateResourceDesigner”任务意外失败,找不到.dll文件

[英]Xamarin “GenerateResourceDesigner” task failed unexpectedly and .dll file could not be found

Hi I'm running a Xamarin PCL project thats deploying to all platforms including UWP windows 10 and windows 8. 嗨,我正在运行一个Xamarin PCL项目,该项目部署到所有平台,包括UWP Windows 10和Windows 8。

I've just merged a branch on git and resolved some conflicts (not very well clearly) and i'm getting a few errors. 我刚刚在git上合并了一个分支并解决了一些冲突(不太清楚)并且我遇到了一些错误。

The first error: 第一个错误:

The "GenerateResourceDesigner" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'Vigour, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Vigour.dll'
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters)
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(String fullName)
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.GetAssembly(String fileName)
   at Xamarin.Android.Tasks.GenerateResourceDesigner.<Execute>c__AnonStorey0.<>m__0(String ass)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at Xamarin.Android.Tasks.ResourceDesignerImportGenerator.CreateImportMethods(IEnumerable`1 libraries)
   at Xamarin.Android.Tasks.GenerateResourceDesigner.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Vigour.Droid            

The second one: 第二个:

I know this is a common problem and I've tried to un-tick and tick the build of each project in the solutions configuration. 我知道这是一个常见的问题 ,我试图在解决方案配置中取消勾选并勾选每个项目的构建。

I've also tried to remove the .vs/../.suo file to reset the project 我还尝试删除.vs /../。suo文件以重置项目

构建Xamarin解决方案时显示的错误

However I've had no luck. 但是我没有运气。 I think that it might have something to do with the merger that involved changing the .csproj files. 我认为它可能与涉及更改.csproj文件的合并有关。

尝试将API设置为23然后重建项目它将解决问题

解决这个问题的方法是重新安装android的xamarin表单,并且@ hvaughan3说,删除所有目录的bin和obj文件夹以及包。

In my case, I was getting error The "ResolveLibraryProjectImports" task failed unexpectedly. 在我的情况下,我收到错误“ResolveLibraryProjectImports”任务意外失败。 when I open a project downloaded from Xamarin.University on Windows 10 and the path for one of the files ends up being to long (longer than 260 characters). 当我在Windows 10上打开从Xamarin.University下载的项目时,其中一个文件的路径最终变长(超过260个字符)。 So, to solve my problem, I would copy the directory as shallow as possible, so instead working directly in the structure of downloaded project, I would copy deepest directory containing the project into my C:. 因此,为了解决我的问题,我会尽可能地复制目录,所以直接在下载项目的结构中工作,我会将包含项目的最深层目录复制到我的C:中。 Building would work then without an issue as the path to all files in the project got shortened. 随着项目中所有文件的路径缩短,构建将在没有问题的情况下工作。

So, say my downloaded structure from Xamarin.University is something like C:\\Users\\me\\Desktop\\XAMARIN\\XAMARIN CERTIFICATION\\forms\\xam300-advanced-cross-platform-development\\Lab Materials\\Part 03 Resources\\Completed 所以,我从Xamarin.University下载的结构就像C:\\ Users \\ me \\ Desktop \\ XAMARIN \\ XAMARIN CERTIFICATION \\ forms \\ xam300-advanced-cross-platform-development \\ Lab Materials \\ Part 03 Resources \\ Completed

I would copy the Completed folder into C and end up with much shorter path like: C:\\Completed 我会将Completed文件夹复制到C中,并以更短的路径结束:C:\\ Completed

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何处理xamarin表单中的“ GenerateResourceDesigner任务意外失败”错误? - How to handle “The GenerateResourceDesigner task failed unexpectedly” error in xamarin forms? Xamarin - 错误修复“Aapt任务意外失败” - Xamarin – Error Fixing “The Aapt task failed unexpectedly” Xamarin:“ XamlCTask”任务意外失败。 进程无法访问文件异常 - Xamarin: The “XamlCTask” task failed unexpectedly. The process cant access the file exception Docker 构建:“ContainerBuildAndLaunch”任务意外失败。 无法加载文件或程序集“Microsoft.Win32.Registry - Docker Build : The "ContainerBuildAndLaunch" task failed unexpectedly. Could not load file or assembly 'Microsoft.Win32.Registry 链接程序集意外失败(Xamarin.ios.dll) - Link Assemblys failed unexpectedly (Xamarin.ios.dll) “ ResolveLibraryProjectImports”任务意外失败。 Mac上的Xamarin.Android - The “ResolveLibraryProjectImports” task failed unexpectedly. Xamarin.Android on Mac 找不到元数据文件.dll - Metadata file .dll could not be found 找不到元数据文件“.dll” - Metadata file '.dll' could not be found “ GenerateResource”任务意外失败 - The “GenerateResource” task failed unexpectedly GenerateRuntimeConfigurationFiles任务意外失败 - GenerateRuntimeConfigurationFiles task failed unexpectedly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM