locked
Error PRJ0019 : A tool returned an error code from "Performing registration" ProjectName RRS feed

  • Question

  • Hi,

    I'm facing one problem when compiling vc6 project into vc8 compiler.

    Error PRJ0019 : A tool returned an error code from "Performing registration" PantherConfig

    I have gone thru a number of links providing solution for this but couldn't get correct solution.

    I think it is having problem in registration dll but not sure.

    In Build log it is telling that "Cannot open the specified file testerinfoerrors.err for reading" while this file is existing.

    Please highlight some point over this.

    Thanks in advance.

    Madhur

    Monday, November 28, 2005 6:50 AM

Answers

  • any one of the steps in that batch file (custom build steps are launced as batch files) could be failing. try running each line by itself and see if it is really the regsvr32 line that is failing.

    josh
    VC++ Project System developer
    Wednesday, November 30, 2005 7:18 PM

All replies

  • Does running regsvr32 to register your component on the command-line (outside the IDE) work at all?

    If not, you'll need to diagnose why your DLL is failing registration. If it does register, then there's a build system issue that we need to diagnose.

    Thanks.

    Monday, November 28, 2005 10:33 PM
  • Thanks Tarek.
    Yes, manually it is registering.

    These are the custom build steps.
    Dll is copying into Selfregister folder but it is not registering.

    copy ".\BBACCapClient.h" "%VobRoot%\inc\drivers\."
    copy "$(TargetPath)" %VobRoot%\rel\debug\bin\SelfRegister\.
    copy .\"$(TargetName)".idl %Vobroot%\inc\MIDL\.
    copy .\"$(TargetName)".h %Vobroot%\inc\MIDL\.
    copy .\"$(TargetName)".tlb %Vobroot%\inc\MIDL\.
    copy .\BBACCapPI.idl %Vobroot%\inc\MIDL\.
    copy .\BBACCapPI.h %Vobroot%\inc\MIDL\.
    copy .\BBACCapPIImpl.h %Vobroot%\inc\MIDL\.
    regsvr32 /s /c %Vobroot%\rel\debug\bin\SelfRegister\"$(TargetName)".dll
    echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"

    Hope you will get some clue.

    Regards,

    Madhur
    Tuesday, November 29, 2005 10:26 AM
  • any one of the steps in that batch file (custom build steps are launced as batch files) could be failing. try running each line by itself and see if it is really the regsvr32 line that is failing.

    josh
    VC++ Project System developer
    Wednesday, November 30, 2005 7:18 PM
  • Hi...

    I'm also facing the same problem.....

    A tool returned an error code from "Performing registration"

    when i build the project, all the files be complied & linked successfully but at last give the error
    "

    "A tool returned an error code from "Performing registration"



     after building i got .....

    1>ocidl.acf

    1>Compiling...

    1>StdAfx.cpp

    1>Compiling...

    1>HPZIDTEST.cpp

    1>TestDialog.cpp

    1>Generating Code...

    1>Compiling resources...

    1>Linking...

    1>Embedding manifest...

    1>Performing registration

    1>The directory name is invalid.

    1>Project : error PRJ0019: A tool returned an error code from "Performing registration"

    1>Build log was saved at "file://s:\ice\ICEDriverTest\Debug32\BuildLog.htm"

    1>HPZIDTEST - 1 error(s), 0 warning(s)

    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========



    can any one help me in regad this....



    alok ranjan,

    Thursday, December 1, 2005 12:35 PM
  • Could you follow Josh's advise mentioned in his post? Wihout more info, we can just speculate what might be happening without solid explanations.

    EDIT:
    If we don't hear from you for a week, we will assume that you managed to resolve the issue and hence will delete the post or mark the relevant answer as the correct one.


    Thanks,
      Ayman Shoukry
      VC++ Team
    Thursday, December 1, 2005 1:42 PM
  • Hi Josh,

    Thanks for your suggession. "try running each line by itself " means I have to run these commands one by one from command prompt or in a batch file?  Can you please little explore more?

    Thanks & Regards,

    Madhur

    <madhur_tiwari@hotmail.com>

     

    Friday, December 16, 2005 9:47 AM
  • Hi Josh,

    Error :

    Error: Cannot open the specified file(m:\madhur_dotnet_porting_view\igxlwc\Core\Utilities\ListMakers\ListMakersErrors.err) for reading.

    But this file is existing. It may be related to read permission of file or something else?

    Full Build Report:

    1>------ Build started: Project: ListMakers, Configuration: Debug Win32 ------

    1>Performing registration

    1>Error: Cannot open the specified file(m:\madhur_dotnet_porting_view\igxlwc\Core\Utilities\ListMakers\ListMakersErrors.err) for reading.

    1>Project : error PRJ0019: A tool returned an error code from "Performing registration"

    1>Build log was saved at "file://m:\madhur_dotnet_porting_view\igxlwc\Core\Utilities\ListMakers\Debug\BuildLog.htm"

    1>ListMakers - 1 error(s), 0 warning(s)

    The Contents of the file is:

     

    ErrorPrefix=LSTMKRS
    ErrorBehaviorDefault=tlErrorForceFail

    LanguageNames=(Japanese=0x0411:MSG00002)

    ;// Formatting considerations:
    ;// - Don't embed newlines in your text
    ;// - To substitute arguments, use %1, %2, %3 for first, second, third argument, etc.
    ;// - To substitute a sting argument, use %1!s!
    ;// - To substitute an integer argument, use %1!d! or %1!x!
    ;// - To substitute a floating point argument, pre-format using sprintf and treat like a string

     

    MessageId= Severity=Error Facility=Application SymbolicName=INTERNAL_ERROR
    Language=English
    Internal Error: %1!s!.
    .
    Language=Japanese
    “à•”ƒGƒ‰[: %1!s!.
    .

    MessageId= Severity=Error Facility=Application SymbolicName=EXCEPTION
    Language=English
    INTERNAL: Exception caught in %1!s! at %2!d! on %3.
    .
    Language=Japanese
    “à•”ƒGƒ‰[: —áŠOƒGƒ‰[‚ª %3 ã‚Ì %1!s! ‚Ì %2!d! ‚Å”­¶‚µ‚Ü‚µ‚½B
    .

    MessageId= Severity=Error Facility=Application SymbolicName=NO_INIT
    Language=English
    Uninitialized ListMaker object.
    .
    Language=Japanese
    ‰Šú‰»‚³‚ê‚Ä‚¢‚È‚¢ ListMaker ƒIƒuƒWƒFƒNƒg
    .

    MessageId= Severity=Error Facility=Application SymbolicName=UPDATE_FAILED
    Language=English
    Could not update string list with tags '%1'.
    .
    Language=Japanese
    ƒXƒgƒŠƒ“ƒOƒŠƒXƒg‚ðƒ^ƒO %1 ‚ŃAƒbƒvƒf[ƒg‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B
    .

    MessageId= Severity=Error Facility=Application SymbolicName=UPDATE_FAILED_V
    Language=English
    Could not update string list with tags '%1' and values '%2'.
    .
    Language=Japanese
    ƒXƒgƒŠƒ“ƒOƒŠƒXƒg‚ðƒ^ƒO %1 ‚ƁA’l '%2' ‚ŃAƒbƒvƒf[ƒg‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B
    .

    MessageId= Severity=Error Facility=Application SymbolicName=TAG_OVERRIDE
    Language=English
    Illegal attempt to call put_Tag more than once.
    .
    Language=Japanese
    put_Tag ‚ð•s³‚É‚P“xˆÈãŒÄ‚яo‚»‚¤‚Æ‚µ‚Ü‚µ‚½B
    .

    -------------------------------------

     

    Hope you will get some clue from this report.

    Thanks & Regards,

    Madhur

     

     

    Friday, December 16, 2005 9:58 AM
  • the buildlog.htm file contains all the actual commands that are being run (we execute custom build steps by putting the commands into a batch file and executing that). what we need to find out is specifically what line is failing. if you take the contents from the build log file and try to run each line separately then we can find out which line is failing.

    clearly from what you included above we cannot access that file, and not having permission to read it seems likely if the file does exist, but what command is trying to read that file?

    josh

    VC++ project system developer

    Wednesday, December 21, 2005 2:51 AM
  • Thanks Josh for explaination..Even I remove all the custom build steps this is giving same error...i.e. can't open for reading. But if I open from explorer then it is opening.

    Regards,

    Madhur

    Wednesday, December 21, 2005 5:26 AM
  • I'm afraid I don't understand. if you remove the custom build steps, how are you getting this error about accessing the .err file? the custom build step should be the only thing trying to access that file (the project system doesn't know anything about such a file). or is it a different error altogether?

    from your paths it looks like you may be building on a network location, in which case you should be aware that builds don't work well over a network. (see the thread at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=24453&SiteID=1 regarding one potential issue).

    josh

    Wednesday, February 1, 2006 11:30 PM
  • Josh,

     

    I have had this same error come up. In brief, it is the build step that runs regsvr32. The regsvr32 program itself is reporting an error that it cannot find the named module. This occurs in VS8 as well as if I run the regsvr32 step manually. I have tried running it manually as administrator but I keep getting the same error. I think this is exactly what the previous poster is experiencing.

     

    In my case I am running the following command line:

    regsvr32 mydll.dll

     

    and this kicks off the "module not found error". The funny thing is that I can see my module (it builds and links with no errors but fails on the registration step.) using the explorer. I have also tried moving the module to the system32 directory and running regsvr32 from there but I still get the same error.

     

    Thanks,

     

    Peter

     

    Friday, September 7, 2007 12:28 AM
  • it might be due to you are using some other dll's exported functions  inside this dll and that other dll is not getting properly linked.
    Wednesday, March 12, 2008 10:47 AM
  • I am also getting this error.

     

    System Vista x64 SP1 VS 2008

     

    If I go to the folder and run Regsvr32 SomeDllFile, it fails with the message "The module "SomeDllFile" failed to load.

     

    Now if i use Regsvr32 SomeDllFile.Dll then it succeeds. (Note the use of the .dll extension this time)

     

    My guess is that VS is not using the dll extension and for whatever reason RegSrv32 is then trying to load the .ilk or .pdb file of the same name and failing.

     

    Regards

    Neal

    Thursday, March 20, 2008 3:14 PM
  • I encouter the same error. I solved it in this way...

     

    I run VS 2088 using "Run as Administrator".

     

     Then the error is gone Smile

     

     

    • Proposed as answer by rk_Edurite Friday, February 3, 2012 7:32 AM
    Tuesday, April 1, 2008 6:25 AM
  • Thanks Shenjun Wu

    "Run as Administrator" also solved my problem Smile

    Monday, May 12, 2008 6:44 AM
  • I had this same error and was able to get around it (this was all in VS 2003).
    My problem was that I had created a DLL (called Foo.dll) for my class Foo:

    #ifdef MAKE_DLL
       #define IMPEXP __declspec(dllexport)
    #else
       #define IMPEXP __declspec(dllimport)
    #endif

    class IMPEXP Foo
    {
    .
    .
    .
    };

    Now, I needed to use this class in "C" only code, so I decided to wrap it with a COM+ object, which I called FooCOM.  I used the ATL Project wizard to create the project and then added the "COM+ 1.0 Component" and let VS do all the stuff underneath the hood, while I just filled in the code.  As soon as I had declared my Foo instance in the COM wrapper it started spitting out that "error PRJ0019" message.

    The fix was to drop the Foo.dll in the same directory (DEBUG or RELEASE) as where my FooCOM.dll was being created.

    Hope this helps

    -C
    Thursday, August 28, 2008 5:58 PM
  • Have you tried running VS as admin? I was getting the same error and this fixed it.
    Tuesday, September 15, 2009 10:06 AM
  • I am facing the same problem with one of my COM Addin. Earlier it was working fine, only recently it started displaying this error. Even with regsvr32 it does'nt register the DLL. Surprisingly with release build it works fine

    A tool returned an error code from "Performing registration"

    This is the error message I receive when I manually register the debug build using regsvr32

    Thursday, March 31, 2011 4:13 AM