Unable to add data connection The given key was not present in dictionary

  在VS2010的Data Source或者Server Explorer面板中添加Data Source的过程中,出现“Unable to add data connection The given key was not present in dictionary”的错误提示。

  解决方案:http://connect.microsoft.com/VisualStudio/feedback/details/552006/unable-to-create-data-connection-in-server-explorer 

  具体操作:

  edit C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\10.0\ServerExplorer\DefaultView.SEView and remove the connection with the wrong Provider. If you do not know which of the provider is failing, simply delete the file :)

  If this won't help try deleting also C:\Users\...\AppData\Local\Microsoft\VisualStudio\10.0 

 

  编辑上文提到的“DefaultView.SEView”文件,删除里面错误的数据链接适配器,如果不知道哪个适配器是错误的,可以索性把这个文件删了完事,如果还出现这个错误,那么直接把上层的“10.0”文件夹也给删了就行。重启VS2010时会重新创建这个文件或文件夹。建议提前备份一下这个文件夹,以免出现其他问题。

posted on 2011-01-12 22:54  夕颜  阅读(735)  评论(0编辑  收藏  举报