PRJ0050

Hello,

I am building a DLL with ATL8.0 in VS2005. I am getting this error when I build the DLL.

error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.

Very next time I build, it goes away and the comes back next time. Sometimes i can build 4 - 5 times without error and then it comes back. Any help will be appreciated.

I have full permissions on registry. I never had any problems in VS2003.

Thanks



Answer this question

PRJ0050

  • Kwebs

    I could not set the environment variable in the debugging section but I set the system variable "Path" to point to the referenced dll. Its work!

  • AndrewWheeler

    My problem occurs when I am linking my com object to a external library that used many dll.
    Is there a way to tell the compiler where to find them when registring the com.
    I have already set the "additional library directory" to find the library and the dll referenced by my library.

  • ansilb

    I am having the same problem all of a sudden. I could register just fine then something must have changed and now I cannot register and I get the same error as you.

    ATL 8 VS 2005

    I am administrator on my box and I can edit the registry just fine.

  • fenrir

    I got the same problem and I am administrator. I am using COM/ATL using VS2005

  • viczad

    Another problem of this error can be exception inside DLLMain.

    When DLL is loaded DLLMain is called.

    So if you code fails with uncaught exception system will fail to load dll.

    The GetLastError returns as if ther is no access.

    So debug your dll initialization code and make sure that

    both DllMain and DLLRegisterServer do not fail.

    Regards

    Henry


  • oaktown

    I am having the same problem and still can't figure out a solution. Here are the steps that causes the problem.

    1. Compiled my project (same type as in previous post). The solution and all sources were stored on a network drive. The COM object was registered correctly.
    2. I realized that the sources were on a network drive so I copied the entire project to my local machine
    3. I try to build again. Now I receive the error.

    Grem


  • Romain Aubier

    Hi, I found something that could help people getting the PRJ0050 error.

    First all, I'm new to MFC. I was building an ActiveX project, then after some added code I compiled but got that creepy PRJ0050 error.

    I read in one msdn page that the error could be caused by the VS engine in the final compilation phase, when trying to register the component, and that I should try registering the activeX using REGSVR32. After that I should be able to see why the registration failed.

    I tried that and used REGSVR32. It threw a "process not found" error which I thought was somewhat strange. After that I opened the activeX with the dependency walker (DEPENDS.EXE) to check the dependencies and saw that a reference to ADVAPI32 was with a red warning. hmmm....

    I came back to my source files and saw that the last added code was a call to the function RegGetValue, which IS defined in the winreg.h header file. I opened ADVAPI32.DLL with the dependency walker and saw that the function RegGetValue does not exist there, so I realized that another function had to be used instead: RegQueryValueEx. After changing that line of code I could compile the project successfully.



  • chteng

    Looks like you need administrative rights.

    Venu_nair wrote:

    Hello,

    I am building a DLL with ATL8.0 in VS2005. I am getting this error when I build the DLL.

    error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.

    Very next time I build, it goes away and the comes back next time. Sometimes i can build 4 - 5 times without error and then it comes back. Any help will be appreciated.

    I have full permissions on registry. I never had any problems in VS2003.

    Thanks



  • Vicki

    zut117713 wrote:
    I could not set the environment variable in the debugging section but I set the system variable "Path" to point to the referenced dll. Its work!

    Hi ,,

    Can you tell how did you set the System variable "Path" to the your specific DLL. I want your help because I am facing the same problem as you were facing in the past.

    Plz Help me if possible.

    Thanks In Advance.



  • Jesper Lund Stocholm

    I figured my problem out. I had deleted a DLL that was a dependency. Unfortunately the dumb error message from VS 2005 (below) led me down the wrong path.

    rror PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.

  • PRJ0050