在我的NMAKE visual studio项目的构建命令行中,我有:
NMake /NOLOGO /R /F ...
copy D:\myfile $(outdir)..\..\mynewfile.txt
这两个文件都存在于指定的位置,但是我收到以下构建错误:
2> The system cannot find the file specified.
2>C:\Program Files (x86)\MSBuild\...\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command "NMake /NOLOGO /R ...
2>C:\Program Files (x86)\MSBuild\...\Microsoft.MakeFile.Targets(37,5): error MSB3073: copy D:\myfile ..\..\mynewfile.txt" exited with code 1.
答案 0 :(得分:0)
visual studio build命令行中的复制命令必须始终带引号,而不管路径是什么(即是否有空格)。命令必须是:
copy "D:\myfile" "$(outdir)..\..\mynewfile.txt"