xamarin System.IO.FileLoadException:未能加载文件或程序集“塞西尔

68bkxrlz  于 2023-03-21  发布在  其他
关注(0)|答案(1)|浏览(152)

“XamlCTask”任务意外失败。系统.IO.文件加载异常:未能加载文件或程序集“Mono.塞西尔.Pdb,Version=0.10.0.0,PublicKeyToken= 50 cebf 1cceb 9d 05 e”或它的某一个依赖项。参数不正确。(HRESULT异常:0x 80070057(E_无效参数))文件名:'Mono.塞西尔.Pdb,版本=0.10.0.0,公钥令牌= 50 cebf 1cceb 9d 05 e' ---〉系统参数异常:参数不正确。(HRESULT异常:0x 80070057(E_无效参数))
System.IO.FileLoadException:未能加载文件或程序集“Mono.塞西尔.Pdb

1>The "XamlCTask" task failed unexpectedly.
1>System.IO.FileLoadException: Could not load file or assembly 'Mono.Cecil.Pdb, Version=0.10.0.0, PublicKeyToken=50cebf1cceb9d05e' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
1>File name: 'Mono.Cecil.Pdb, Version=0.10.0.0, PublicKeyToken=50cebf1cceb9d05e' ---> System.ArgumentException: The parameter is incorrect. (Exception from 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()
kxxlusnw

kxxlusnw1#

我已经禁用了Visual Studio的Mono调试。
工具〉扩展和更新〉Mono Debugging for Visual Studio启用并重新启动VS解决了这个问题。

相关问题