Android xamarin visual studio错误:'System.Configuration.dll'

4
我正在尝试设置一个新的Xamarin项目,其中我将连接到AWS DynamoDB。但现在我遇到了这个错误。我搜索了所有相关内容,但没有找到任何好的答案。我找到了一个'System.Configuration.dll'文件,但它的最高版本只有2.0。有什么解决办法吗?
谢谢!
Severity    Code    Description Project File    Line    Suppression State
Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Configuration.dll'
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute() Grocery 
3个回答

4

您需要为系统添加一个引用。

C:\Windows\Microsoft.NET\Framework64\v4.0.30319{{version}}\System.Configuration.dll

清理并重新构建项目,然后再试一次。


1
在项目中添加新的引用,浏览并设置路径。

C:\Windows\Microsoft.NET\Framework64\v4.0.30319(*version)\System.Configuration.dll

来自系统。

重新构建项目。


1
开始分解您的“便携式”项目(或您的Droid或类似项目)。
不知何故,您正在包含一个引用,导致System.Configuration.dll被拖入。注释掉与ConfigurationManager有关的任何内容(AppSettings或ConnectionStrings?),然后删除System.configuration引用。
如果需要配置信息,您可以以其他方式获取吗?例如从Web服务或手动从本地“config”文件中读取?

如果您需要使用“常见”的配置方法,请查看:https://forums.xamarin.com/discussion/73623/appsettings-reader-for-xamarin-and-xamarin-forms/p1?new=1 - Andrew Jens

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接