Xamarin构建错误加载程序集时异常:System.IO.FileNotFoundException [英] Xamarin build error Exception while loading assemblies: System.IO.FileNotFoundException
问题描述
我使用.Net Framework 4的System.Security.dll和我虽然这应该工作。
谢谢。
C:\Program文件
(x86)\MSBuild\Xamarin\Android \Xamarin.Android.Common.targets(2,2):
错误:加载程序集时异常:
System.IO.FileNotFoundException:无法加载程序集
'System.Security,Version = 4.0.0.0,Culture = neutral,
PublicKeyToken = b03f5f7f11d50a3a'。也许在Android配置文件的Mono
中不存在?
Dateiname:'System.Security.dll'
bei
Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference
reference,ReaderParameters参数)
bei
Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1
assembly,AssemblyDefinition assembly)
bei
Xamarin.Android.Tasks.ResolveAssemblies .AddAssemblyReferences(List`1
assembly,AssemblyDefinition assembly)
bei Xamarin.Android.Tasks.ResolveAssemblies.Execute()
(TaskManager2) / p>
我与System.Web有同样的问题。我只需要从GAC添加System.Web参考。
更新
GAC可能是错误的词。那些是默认的.net(单声道)框架库。您可以在Project / References /中找到它们,然后右键单击编辑参考,您将在包选项卡下找到框架库。
always i try to Build my Xamarin app i get this error. And i dont know why. I use the System.Security.dll of .Net Framework 4 and i though this should work. Thanks.
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
Dateiname: 'System.Security.dll'
bei Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
bei Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly)
bei Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly)
bei Xamarin.Android.Tasks.ResolveAssemblies.Execute() (TaskManager2)
I had the same issue with System.Web. All I had to do was to add the System.Web reference from the GAC.
update
GAC is probably the wrong word here. Those are the default .net (mono) framework libraries. You can find them in Project/References/ and right click to 'Edit References' you'd find the framework libraries under Packages tab.
这篇关于Xamarin构建错误加载程序集时异常:System.IO.FileNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!