Unable to load file or assembly 'Mono.Cecil.Pdb' VS17

巧了我就是萌 提交于 2021-01-28 06:36:34

问题


I'm developing a xamarin.forms project using VS17. I have a build faild with this error:

1>System.IO.FileLoadException: Unable to load file or assembly 'Mono.Cecil.Pdb, Version = 0.10.0.0, PublicKeyToken = 50cebf1cceb9d05e' or one of its dependencies. Invalid parameter (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

        1>File name: 'Mono.Cecil.Pdb, Version=0.10.0.0, PublicKeyToken=50cebf1cceb9d05e' ---> System.ArgumentException: Paramètre incorrect. (Exception de HRESULT : 0x80070057 (E_INVALIDARG))
    1>   at System.AppDomain.nApplyPolicy(AssemblyName an)
    1>   at System.AppDomain.ApplyPolicy(String assemblyName)
    1>   at Microsoft.VisualStudio.Platform.VsAppDomainManager.MatchAssemblyName(AssemblyName reference, AssemblyName definition)
    1>   at Microsoft.VisualStudio.Platform.VsAppDomainManager.FindAssembly(String name, IEnumerable`1 probingPaths)
    1>   at Microsoft.VisualStudio.Platform.VsAppDomainManager.VsAssemblyResolver.CoreAssemblyResolveHandler(Object sender, ResolveEventArgs args)
    1>   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
    1>   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
    1>   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
    1>   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
    1>   at System.Type.GetType(String typeName)
    1>   at Mono.Cecil.Cil.SymbolProvider.GetSymbolType(SymbolKind kind, String fullname)
    1>   at Mono.Cecil.Cil.SymbolProvider.GetReaderProvider(SymbolKind kind)
    1>   at Mono.Cecil.Cil.DefaultSymbolReaderProvider.GetSymbolReader(ModuleDefinition module, String fileName)
    1>   at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
    1>   at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
    1>   at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
    1>   at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
    1>   at Xamarin.Forms.Build.Tasks.XamlCTask.Execute(IList`1& thrownExceptions)
    1>   at Xamarin.Forms.Build.Tasks.XamlTask.Execute()
    1>   at Microsoft.Build.Framework.ITask.Execute()
    1>   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    1>   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I can't understand the problem. Any suggestions please? I want to find the Mono.Cecil.Pdb file and where do I want to put it?


回答1:


Tools > Extensions and Updates> Mono Debugging for Visual Studio enable and restart VS solved it



来源:https://stackoverflow.com/questions/51403844/unable-to-load-file-or-assembly-mono-cecil-pdb-vs17

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!