I don't have SqlServerCe assembly?

青春壹個敷衍的年華 提交于 2019-11-30 04:49:39

问题


I'm working on a simple WinForms app that uses an .sdf database to store data. I saw this interesting post on how to handle multithreaded access, which seemed useful. Problem is, I can't find the System.Data.SqlServerCe assembly. I installed the Sql Server Compact 3.5 SDK, but that reference still doesn't show up in my .NET assemblies list when I go to add the reference. What am I missing?

I'm using Visual Studio 2010 Ultimate on Windows 7.


回答1:


Go to "Tools" and select "Choose Toolbox Items..." and select .Net Framework components and see if any of the SqlServerCe components shows up, then select one of the System.Data.SqlServerCe components, if you then add it to your form it will add the reference to your project.




回答2:


I believe that you need to browse to the assembly in order to get it included.




回答3:


have a look at this post on MSDN : How to find correct "System.Data.SqlServerCe.dll" in desktop project?




回答4:


Adding my database as a Data Source solved the problem for me. (Shift + Alt + D) then Add New Data Source knowing that my .sdf database is already connected with my project via Data Explorer.



来源:https://stackoverflow.com/questions/11714480/i-dont-have-sqlserverce-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!