做mobile开发编译输出提示:
请考虑使用 app.config 将程序集“System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes”从版本“2.0.0.0”[]重新映射到版本“3.5.0.0”
只需在项目中加入 App.Config 文件,文件内容如下即可:
代码
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name= "System.Data" culture= "neutral" publicKeyToken= "969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name= "System" culture= "neutral" publicKeyToken="969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name= "System.Xml" culture= "neutral" publicKeyToken="969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name= "System.Data" culture= "neutral" publicKeyToken= "969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name= "System" culture= "neutral" publicKeyToken="969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name= "System.Xml" culture= "neutral" publicKeyToken="969db8053d3322ac" Retargetable= "Yes"/>
<bindingRedirect oldVersion= "2.0.0.0" newVersion= "3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
个人猜测,可能是运行时检测到安装有多个版本,推荐用新的版本运行.