【发布时间】:2013-04-19 06:08:37
【问题描述】:
我已将旧的 Visual C++ 6.0 项目转换为新的 Visual C++ 2010 项目。它可以运行,但是我从旧项目中获取的构建后事件存在问题。它在计算机上注册了目标文件(一个.ocx):
copy $(ProjDir)\PDFXChange\dll.Debug\*.* $(TargetDir)
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
在我的新解决方案中它不起作用。我还在单个命令中对其进行了测试:在三个命令(copy、regsvr32 和 echo)中,只有最后一个可以执行。我的错误可能是什么。
错误:
error MSB3073: The command "copy \PDFXChange\dll.Debug\*.* C:\_tests_\ocx2010\Debug\
regsvr32 /s /c "C:\_tests_\ocx2010\.\Debug\LayoutBox.dll"
echo regsvr32 exec. time > ".\Debug\\regsvr32.trg"
:VCEnd" exited with code 3. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
COPY 和 REGSVR32 似乎不起作用。
【问题讨论】:
-
哪部分不起作用?你得到什么“错误”?
-
@Cody Gray 我已经更新了我的问题。
标签: visual-studio-2010 visual-c++-6 post-build-event