MSLinqToSQLGenerator failed in VS2008.
Hi,
I'm getting the following error when I try to add a new item (Linq to SQL Classes):
"Error 1 The custom tool 'MSLinqToSQLGenerator' failed. Object reference not set to an instance of an object."
I got this error in Beta 2 (not initially though).
I de-installed Beta 2 and installed the RTM Visual Studio 2008, but the same error keeps appearing.
Repairing RTM was of no use.
I then de-installed RTM and re-installed again, but this didn't help either.
When I open an existing dbml file in VS2008, there is no error, but the file is opened in an XML editor in stead of the 'MSLinqToSQLGenerator' editor.
I suppose the link between the editor and the filetype is gone.
When I open the menu item Tools / Options / Database tools / O/R designer, the right pane is not displayed, only "An error occurred loading this property page" is displayed.
How can I recreate this link?
kind regards,
Karel Vandenhove
All Replies
Did you uninstall *everything*? There are a lot of entries in Add/Remove Programs [Programs and Features in Vista] that are related to Visual Studio, and you should remove them all.
Here's a summary by Scott Guthrie: http://weblogs.asp.net/scottgu/archive/2007/11/20/steps-to-uninstall-vs-2008-beta2-before-installing-the-vs-2008-final-release.aspx
Hi Keith,
Before installing RTM I uninstalled all Beta 2 programms as indicated in the help.
After reading your post I unstalled VS 2008 again, with the blog recommendation you mentioned.
The problem still occurs.
Kind regards,
Karel
I've got the same question.
Any one can help it out?
When add a LINQ to SQL Classes(.dbml),it causes
Warning 1 The custom tool 'MSLinqToSQLGenerator' failed. Could not retrieve the current project. G:\MyProjects\ClassLibrary1\ClassLibrary1\DataClasses1.dbml ClassLibrary1
And when I open a dbml file which I made in past,it got follow error:
Error 1 DBML1113: Database node not found. Is the DBML namespace (http://schemas.microsoft.com/linqtosql/dbml/2007) correctly specified? 1 1
I had the same problem, and after trying lots of different things I found a solution.
It looks like this is happening because of some sort of bad per-user settings.
I fixed it by deleting the registry tree under:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0
Do this at your own risk, this probably has the potential to cause some issues. I also deleted all of the VS files in the user directories as well at the same time, that might be necessary also.
I had the same problem with my visual studio 2008 professional edition.
I found a very easy way to solve it...
I created a new windows administrator user account and opened visual studio in the new account. It worked as a piece of cake.
I then deleted my previous account and recreate it. I then logged into my previous account and the problem has just disappeared...
Bishoy
Hi all,
I had the same problem.
I deleted 'just' the values underneath the subkey:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages
It seemed that MSVS had decided not to load my designer tool on startup and marked it to be skipped next startup.
After deleting these values, everything worked again.
Greets,
John.
Thank You John!!
Totally solved my issue.
- After I instaled the SP1 Beta, I had this problem and its solve for me to.
Tks Thanks a lot John,
It seems like no one else knows how to resolve this issue.
Cheers,
Mehdi
you have solved my life
I love you
Tnk
- thx very mach, my problem solved too. very good my friend.
OMG. I've been struggling with this one. Thanks John! This solved it for me too!!
JohnMJGorter wrote: Hi all,
I had the same problem.
I deleted 'just' the values underneath the subkey:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages
It seemed that MSVS had decided not to load my designer tool on startup and marked it to be skipped next startup.
After deleting these values, everything worked again.
Greets,
John.
- Instead of deleting the values under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages, you could try running "devenv /resetskippkgs" from the VS2008 command prompt (All Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt).
Having said that, neither of those solutions worked for me. I also tried deleting the entire HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 entry and repairing my Visual Studio 2008 installation. I had to uninstall and reinstall VS2008 to fix the problem - not really ideal as it took about an hour. works for me.
thanks

hahaha Who's this guy ?
I mean, it solved the problem, yes I'm very happy but how he did find about it and why do we have to do things like that ?
What went wrong at some point.
Ah Well, happy to see the dbml designer back
By the way what is this Package in the registry and what this deletion does other then solve this problem ?
If this exists in the Registry it's not for any reason in this world.- Hi,
instead of deleting HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages, i just changed SkipLoading DWORD value to 0 under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages\XXXXX-XXXX-XXXXX-XXXX-XXXX.
It solved the problem.
Rovsen. If this doesn't work the following was my solution: -
I created an asp.net web application and then, for consistency named a folder App_Code stuck all my classes in it including my dbml file.
This caused issues when I tried to compile giving me the object reference error.
All I needed to do was rename the App_Code folder to Master_Code or something.
And then recreate the dbml file from scratch (Or just try regen it, I only had 1 table).
Hope this helps someone.
Hi recently I've got an issue with MSLinqToSQLGenerator (DBML). Faild to load existing DBML with message "The operation could not be complete".
Nothing help, no execute "devenv /resetskippkgs" from Visual Studio command prompt, no delete registry key "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0"
The solution was found when i tried to connect to database from Server Explorer in VS.
1. Tried to connect to DB
2. Got message "The event log file is full".
3. Setted up in Event Viewer for Application and System logs "Overwrite events as needed".
Computer Management->Event Viewer->Application(System)->"right mouse click"->choose properties.
4. After this. DBML designer load success, connect to DB via Server Explorer success.
- Proposed As Answer byfrielitz Thursday, June 04, 2009 2:23 PM
- Thanks for your help.
I always do this when i want to add a new table in my dbml files, but VS response that my Event List is full.
every time I just Clear the list and did not do this . ant way thanks - Tank you Anton, that served my problem.
For me it was the Applications event log.
How wonderful would be speaking error messages! - Thank you John, after doing a repair, re-installing SP1, uninstalling, reinstalling, reinstalling sp1 and still had the problem. Wish I would have seen your post earlier. THANK YOU THANK YOU.

