2016-08-16 80 views
2

我想建立一个新的Xamarin项目,我将与Aws dynamoDB连接。但是现在我得到这个错误。我搜索了一切,找不到任何好的答案。我发现了一个'System.Configuration.dll'文件,但它是最大版本2.0。任何解决方案Android的Xamarin视觉工作室错误:'System.Configuration.dll'

提前致谢!

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 

回答

0

开始拉开你的“便携式”项目(或你的Droid,或类似的项目)。

不知怎的,你包含一个引起System.Configuration.dll被拖入的引用。注释掉任何与ConfigurationManager(AppSettings或ConnectionStrings?)有关的东西,然后删除System.configuration引用。

如果您需要配置信息,您可以通过其他方式获取吗?例如。从Web服务或从本地“配置”文件手动读取?

+0

如果您需要使用“通用”配置方法,请参阅:https://forums.xamarin.com/discussion/73623/appsettings-reader-for-xamarin-and-xamarin-forms/p1 ?新= 1 –

1

为项目添加新的参考,从系统浏览并设置C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319(*版本)\ System.Configuration.dll 的路径。 再次重建项目。

3

您必须从系统添加参考。

C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 {{版本}} \ System.Configuration.dll

清洁和重建项目,然后再试一次。