Forum Discussion

Luukdb's avatar
3 years ago

All project variables are gone



I just opened my project file and noticed all my project variables are gone. I tried to restore an older version of our project, but this also didn't work.

Currently I am adding the variables manually. But I am wondering if more people experienced this and how to fix this instead of adding all the variables manually.


Kind regards,


7 Replies

  • AlexKaras's avatar
    Champion Level 3



    Project variables are stored in the project .mds file. So it had to be something done over this file (incorrect source control merge etc.) that removed section with project variables from it.


  • Mr_Bro's avatar
    Frequent Contributor

    HI Luukdb 


    can you make use of adding the variables in your script : 

    Project.Variables.AddVariable("MyExportFilePath", "String");


    please refer this document for your further reference.

    • Luukdb's avatar

      Mr_Bro This is a good idea, I am going to give this a try when it happens again

      • Marsha_R's avatar
        Champion Level 3

        I would contact Support directly about this.  Here's the link:


        fyi, to use Mr_Bro idea, you would need to do it now, in order to ward off the problem in the future.  What that code does is look for the variable in question and if it does not already exist, it adds it at that time.

  • Marsha_R's avatar
    Champion Level 3

    What version of TestComplete are you running?  I saw that happen years ago but I haven't seen it lately.