![](/img/trans.png)
[英]System.IO.FileNotFoundException: Could not load file or assembly. The system cannot find the file SharpSvn.dll
[英]Exception: system.IO.FileNotFoundException: cannot find assembly or file Mysql.Data
當我執行我的獨立程序時,它崩潰並說:
Exception: System.IO.FileNotFoundException: cannot find assembly or file Mysql.Data or load one of the dependable sources at project3.class.executesend<> at project3.class.initialize<> at project3.class.main<>
經過一番搜索,我發現我應該將這些.dll
文件添加為程序的資源。 在我這樣做之后,它產生了同樣的錯誤。
我怎樣才能解決這個問題?
如果我理解得很好,您在項目的引用文件夾中添加了 Mysql.Data。
現在,在 VS Explorer 中右鍵單擊它,轉到屬性,並將屬性“Copy Local”設置為 true。
因此,無論何時構建應用程序,它都會被復制到“調試”或“發布”文件夾中。
對於 MySQL Workbench 8.0.19 版本,我需要安裝 Visual C++ 2015-2019 DLL。
我安裝了 2008、2010、2013 和 2015 年的 x64 和 x32 版本,並且收到此錯誤。
Visual C++ Redistributables 在這里......
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.