我试图使用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 targeted framework ".NETFramework,Version=v4.0,Profile=Client". SQL
我也在我的桌面上试过它(也在Windows 8.1上运行vb 2010)然而它不会编译,但是在Windows 7 PC上它编译没有问题,尽管事实上设置看起来是相同的。
有任何想法吗?
将项目属性中的target framework version
更改为4.5
或添加较低版本的引用以匹配您自己的版本(3.5,4.0)
<PropertyGroup> <ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch> </PropertyGroup>