skip to Main Content

I am Updating all C++ projects platform toolset from Visual Studio 2012 to Visual Studio 2019.

When I am trying to perform registration of the DLL which was created during Build, it is giving below error.

In project properties -> Custom Build Step i have added the below command to perform registration,

regsvr32 /s /c "$(TargetPath)" echo regsvr32 exec. time > "$(OutDir)regsvr32.trg"

1>Performing registration
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(286,5): error MSB3073: The command "regsvr32 /s /c "D:newomniaOmniasourcecppDependentFilesMGNortelGPRSPreProcessor.dll"
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(286,5): error MSB3073: echo regsvr32 exec. time > "........DependentFilesregsvr32.trg"
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(286,5): error MSB3073: 
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(286,5): error MSB3073: 
1>C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppCommon.targets(286,5): error MSB3073: :VCEnd" exited with code 3.

On clicking the error, it navigates to below tags within Microsoft.CppCommon.targets

    <Exec Command="%(CustomBuildStep.Command)$(_BuildSuffix)"
      StdOutEncoding = "%(CustomBuildStep.StdOutEncoding)"
      StdErrEncoding = "%(CustomBuildStep.StdErrEncoding)" />

I am able to build and register the other projects. only few projects having this issue.

The path of the DLL was in the location i specified. I even tried to directly be registering from the command prompt (As admin). still, it is failing.

Can someone please help in this.

2

Answers


  1. Looks like you are registering 32bit all in 64 bit OS:

    You have to go to:
    cd C:WindowsSysWOW64
    then register using:
    regsvr32 "D:newomniaOmniasourcecppDependentFilesMGNortelGPRSPreProcessor.dll"

    Login or Signup to reply.
  2. "XXX.dll" failed to load. Make sure the binary is stored at the
    specified path or debug it to check for problems with the binary or
    dependent .DLL files. The specified procedure could not be found.

    From How to use the Regsvr32 tool:
    The 32-bit version is %systemroot%SysWoW64regsvr32.exe.

     C:WindowsSysWOW64regsvr32.exe 
    

    The error means MGNortelGPRSPreProcessor.dll is missing dependent libraries. Make sure that the DLLs required by MGNortelGPRSPreProcessor.dll are in the same folder or system environment path.

    In addition, consider using post-build event.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search