Recently I came across this weird problem at my workplace when I was working with entity framework and .net 4.0.
I was working on a proof of concept using the entity framework and SQL server express. That seemed easy and straight forward and I jumped right into coding it. Unfortunately I failed in the very first step, I just couldn't connect the database. It threw the error, "the given key was not present in the dictionary".
Naturally I googled and most of the solutions pointed to me to delete the folder
C:\users\yourusername\appdata\local\Microsoft\visualstudio\10.0\
But in vain , it didn't work. Then I googled more . I found that , there existed another directory where some more configurations are stored
Solution 1:
Navigate to the below folder
C:\users\yourusername\appdata\roaming\Microsoft\visualstudio\10.0\serverexplorer\
You will find a file named defaultview.seview
Delete this file. This is where all the data connections are stored for your visual studio installation.please remember that this will delete all the data connections.
"This problem usually comes up when we have used a third party database connector/provider
And later uninstalled it without deleting the data connection in visual studio. "
Solution 2:
Another alternative solution is installing the data provider driver in case you have uninstalled it but forgot to delete the data connection for that provider. In my case it was MySQL .
I had installed the MySQL connector for .net and worked on the entity framework when I was done I uninstalled the driver without deleting the data connection in visual studio. When I later installed the driver again the problem was rectified!
If any of the above solutions worked please let me know which solution worked out for you through comments. Hope this helped. If you have found an alternate solution please add it in the comments section.
I was working on a proof of concept using the entity framework and SQL server express. That seemed easy and straight forward and I jumped right into coding it. Unfortunately I failed in the very first step, I just couldn't connect the database. It threw the error, "the given key was not present in the dictionary".
Naturally I googled and most of the solutions pointed to me to delete the folder
C:\users\yourusername\appdata\local\Microsoft\visualstudio\10.0\
But in vain , it didn't work. Then I googled more . I found that , there existed another directory where some more configurations are stored
Solution 1:
Navigate to the below folder
C:\users\yourusername\appdata\roaming\Microsoft\visualstudio\10.0\serverexplorer\
You will find a file named defaultview.seview
Delete this file. This is where all the data connections are stored for your visual studio installation.please remember that this will delete all the data connections.
"This problem usually comes up when we have used a third party database connector/provider
And later uninstalled it without deleting the data connection in visual studio. "
Solution 2:
Another alternative solution is installing the data provider driver in case you have uninstalled it but forgot to delete the data connection for that provider. In my case it was MySQL .
I had installed the MySQL connector for .net and worked on the entity framework when I was done I uninstalled the driver without deleting the data connection in visual studio. When I later installed the driver again the problem was rectified!
If any of the above solutions worked please let me know which solution worked out for you through comments. Hope this helped. If you have found an alternate solution please add it in the comments section.
Thanks! This really helped
ReplyDeleteNitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download Now
Delete>>>>> Download Full
Nitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download LINK
>>>>> Download Now
Nitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download Full
>>>>> Download LINK j5
Thank you, this solved my problem!
ReplyDeleteI remove both of them and I still get the message...
ReplyDeleteThank you - I could not find anything on this and finally came about this blog.
ReplyDeleteInstructions to Solve C# MySQL Connection Problem through MySQL Backup Database
ReplyDeleteAt Cognegic we will help you to take care of your C# MySQL association issue and furthermore enable you to recognize the root to cause behind your specialized issues. Here we give MySQL Enterprise Backup support and MySQL Remote Support to recoup from any blackouts. We have quite a while of experience and devoted specialized specialists who resolve to tackle your issue and make you blunder free. Along these lines, don't sit tight for some other help organization essentially contact to our MySQL Remote Service and get the best help.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801
thanks it really helped .
ReplyDeleteNow another problem connection windows crash after successful connection
It worked in Visual Studio 2017. Thanks very much!
ReplyDeleteThank you so much its really helpful
ReplyDeleteNitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download Now
ReplyDelete>>>>> Download Full
Nitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download LINK
>>>>> Download Now
Nitin Manju'S Blog.: How To Solve "The Given Key Was Not Present In The Dictionary" Problem! >>>>> Download Full
>>>>> Download LINK Nf