Forum Discussion

epatton's avatar
epatton
Occasional Contributor
7 years ago
Solved

"Can not create TestComplete object" Error even after running as admin

I'm trying to run TestComplete in a C# project in Visual Studio using the AutomatedQA dll's, but I'm running into an issue.

 

I have a project that simply opens IE and sets the URL. Whenever I try to run it in debug mode, I get the following error at the RunTest(...) line:

 

"Can not create TestComplete object"

 

I did some searching and found someone who fixed this by either running the exe in the bin folder as an admin or by running Visual Studio as an admin. I'm able to run the exe as an admin with no issues (it opens IE and points it to the URL), but I still get the error in debug mode.

 

I have my PJS file included in my project and made sure it's getting copied over to my bin/debug folder, I made sure the path is correct, and I added a manifest file to make sure I can't even run debug mode for this project unless I'm running Visual Studio as an administrator.

 

I'm not sure what else to try here. Does anyone have any suggestions of what else could be going on? It's just odd that it's working with the exe but not in debug mode.

  • So I figured out the issue in case anyone else is going through this as well.

     

    This seems to be an issue with Windows 10 and truly running Visual Studio in administrator mode. Follow these steps to set the "devenv.exe" file to run as an admin, and it should fix the issue:

     

    1. Right-click devenv.exe and select "Troubleshoot compatibility". (mine is located at "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE") 
    2. Select "Troubleshoot program"
    3. Check "The program requires additional permissions" click "Next", click "Test the program..."
    4. Wait for visual studio to launch
    5. Click "Next"
    6. Select "Yes, save these settings for this program" (this part takes a while)
    7. Click "Close" 

    Go ahead and relaunch Visual Studio, and the issue should be resolved!

1 Reply

  • epatton's avatar
    epatton
    Occasional Contributor

    So I figured out the issue in case anyone else is going through this as well.

     

    This seems to be an issue with Windows 10 and truly running Visual Studio in administrator mode. Follow these steps to set the "devenv.exe" file to run as an admin, and it should fix the issue:

     

    1. Right-click devenv.exe and select "Troubleshoot compatibility". (mine is located at "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE") 
    2. Select "Troubleshoot program"
    3. Check "The program requires additional permissions" click "Next", click "Test the program..."
    4. Wait for visual studio to launch
    5. Click "Next"
    6. Select "Yes, save these settings for this program" (this part takes a while)
    7. Click "Close" 

    Go ahead and relaunch Visual Studio, and the issue should be resolved!