Error loading project

jcookejcooke Posts: 7
I am getting an error while trying to load a generator project. It fails during 'Reading Permissions' with the follwoing error:
"The given key was not present in the dictionary".

I have been able to sucessfully load some other projects. This seems to be affecting about half of my current projects. It has been about a month since accessing the projects, but no changes have been made other than DB location.

I have tried to resolve the situation by performing the following steps:

1. I tried changing the database source by updating the .sqlgen project file. No change

2. I created a new project. Then I copied the <Tables> tag from the project file that was not working into the new project. Hoping that I would get the new project setup with the table changes associated to the existing project. This did not work either.

3. I have tried comparing a working project file with the non-working one using BeyondCompare2. I did not get through the whole file ( it's pretty big), but I was not able to see anything that seemed that it would cause this error.


Jim Cooke


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    While we can't really support hand-editing the project files outside of Data Generator, there are some circumstances where it could be useful, for instance if you have set up a project and have an identical copy of the same database and want to simply change the database name.

    If the error happens while applying the project to the database schema, I don't think it would be possible to troubleshoot this unless we are sent the project file and the schema, and even then it may take some time to work out.

    I would recommend creating new project files as this may be easier.
  • Brian,

    Thanks for getting back to me. I had editted the project file under some direction from the red-gate support team. This was done because I had a number of projects that were pointing to a database that was taken down to be rebuilt, and the projects would not load without a valid schema to connect with.

    Can you give me any information on what the application is looking for when, during loading the project, it is reading permissions? That appears to be where it is failing.

    Additionally, is there any logging so that I might be able to see more detailed debugging information. The message "The given key was not present in the dictionary" doesn't tell me what key it was looking for or in which dictionary. I don't know that I would be able to figure it out even if I had the additional information, but it just makes me feel better knowing that I have exhausted all possibilities.

    Thanks again,

    Jim Cooke
    804-272-3800 x292
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    I'm starting to suspect that the project file is not to blame. It sounds like a generic database registration error that you would get from a bunch of different Red Gate products when the schema can't be understood by the software.

    What sort of account are you connecting to the database with? Does it have a dbo role?
  • Brian,

    My SQL Server account does have the dbo role. I am almost certain it is in the project file. Here is why I think that:
    1. I tried changing to another database schema that I have loaded to previously with Data Generator.
    2. I tried installing the software on another machine and copying over the project file.
    3. Not all of my projects are failing. Some work just as they did before.

    I will start rebuilding my projects, but hopefully, you can point me in a another direction on Monday.

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    Best suggestion I have at the moment is to try installing our SQL Compare demo and see if comparing the database to itself fails with the same error. If it does, the projects may not work regardless of whether or not you start from scratch because both programs use the same underlying schema engine and I suspect that there is some bit of metadata that it doesn't understand.
Sign In or Register to comment.