我在 VS2013 Professional , Win7 64b Enterprise 下的原生C ++ 中开发DLL项目。
该项目有4种配置,可以从下面的代码片段中看到。
在某个阶段,我在项目的属性中添加了构建后步骤,如下所示:
copy "$(ProjectDir)$(TargetName).ini" "$(TargetDir)*.*"
项目已成功构建,并且.ini文件已按预期复制。但是报告了以下错误:
Error 1 error MSB3191: Unable to create directory "D:\MES\MULTICHANNEL\MULTITHREAD\IOM\IOM.ini D:\MES\MULTICHANNEL\MULTITHREAD\x64\Release". The given path's format is not supported.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets
1228 5 IOM
Error 2 error MSB3191: Unable to create directory "D:\MES\MULTICHANNEL\MULTITHREAD\IOM\IOM.ini D:\MES\MULTICHANNEL\MULTITHREAD\Release". The given path's format is not supported.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets
1228 5 IOM
Error 3 error MSB3191: Unable to create directory "D:\MES\MULTICHANNEL\MULTITHREAD\IOM\IOM.ini D:\MES\MULTICHANNEL\MULTITHREAD\x64\Debug". The given path's format is not supported.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets
1228 5 IOM
Error 4 error MSB3191: Unable to create directory "D:\MES\MULTICHANNEL\MULTITHREAD\IOM\IOM.ini D:\MES\MULTICHANNEL\MULTITHREAD\Debug". The given path's format is not supported.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets
1228 5 IOM
这是怎么回事?
提前谢谢你,
答案 0 :(得分:1)
正确的解决方案是在构建后步骤中定义如下:
copy $(ProjectDir)$(TargetName).ini $(TargetDir)*.*
即省略所有引号"
。