I am trying to perform registration of the DLL which was created during Build.
In project properties -> Build Events -> Post-Build-Event i have added the below command to perform registration,
regsvr32 /s /c "$(TargetPath)"
This command is used to perform registration of the DLL specified in Target Path. When i try to Build my code, i am facing following error,
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5):
error MSB3073: The command "regsvr32 /s /c "D:\Project\Debug\x64\SDK.dll"
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5):
error MSB3073: :VCEnd" exited with code 3.
On clicking the error, it navigates to below tags within Microsoft.CppCommon.targets
<Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
<Message Text="%(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''" Importance="High" />
<Exec Command="%(PostBuildEvent.Command)$(_BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/>
I searched for error MSB3073: :VCEnd" exited with code 3 in few links and found that it occurs when the path specified is invalid or could not be found.
However, the path of the DLL was in the location i specified. I even tried to provide absolute path of DLL within the Post-Build-Event. Yet i'm facing same error.
Am i missing something while performing Post-Build-Event or is there anything to do with regsvr32 command?
regsvr32 /c
switch hasn't worked since NT4 times. – dxiv