Mysql 无法解析主引用??(VB.NET)
我正在尝试使用MySQL DLL文件将vb.net 2010连接到SQL数据库,但是每当我编译它时,就会出现以下错误:Mysql 无法解析主引用??(VB.NET),mysql,.net,sql,vb.net,dll,Mysql,.net,Sql,Vb.net,Dll,我正在尝试使用MySQL DLL文件将vb.net 2010连接到SQL数据库,但是每当我编译它时,就会出现以下错误: Warning 1 The primary reference "MySql.Data" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targ
Warning 1 The primary reference "MySql.Data" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". SQL
我也在我的桌面上尝试过它(也在windows 8.1上运行vb 2010),但是它不会编译,但是在windows 7 PC上它编译没有问题,尽管设置看起来是一样的
有什么想法吗?将项目属性的
目标框架版本更改为4.5
或者添加一个较低版本的参考,以匹配您自己的版本(3.5、4.0)
在解决方案中右键单击建模项目以卸载该项目
“资源管理器”窗口并选择“卸载项目”
然后单击鼠标右键,然后单击编辑projectname.modelproj
然后向其添加以下代码
真的
“卸载建模项目”是下面的项目,对吗?
<PropertyGroup>
<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
</PropertyGroup>