![](/img/trans.png)
[英]Could string variable in vb.net be a reference in SQL Where statement?
[英]Primary reference could not be resolved?? (VB.NET)
我正在嘗試使用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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.