记事本构建失败++带有消息 PostBuildEvent:系统找不到指定的文件

发布于 2024-09-28 11:59:04 字数 916 浏览 1 评论 0原文

在 VS 2010 中构建 Notepad++ 时,由于构建后事件失败,我遇到构建失败。

以下是输出窗口中的消息:

PostBuildEvent:
  The system cannot find the file specified.  
  The system cannot find the file specified.  
  The system cannot find the file specified.  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "copy ..\src\config.xml ..\bin\config.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: copy ..\src\langs.xml ..\bin\langs.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: copy ..\src\stylers.xml ..\bin\stylers.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073:  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.  

请帮忙

I get a build failure due to a post build event failure when building Notepad++ in VS 2010.

Here's the message from Output window:

PostBuildEvent:
  The system cannot find the file specified.  
  The system cannot find the file specified.  
  The system cannot find the file specified.  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "copy ..\src\config.xml ..\bin\config.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: copy ..\src\langs.xml ..\bin\langs.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: copy ..\src\stylers.xml ..\bin\stylers.xml  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073:  
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.  

Please help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

随风而去 2024-10-05 11:59:04

为可能遇到此问题的其他人发布答案

经过对这个主题的一些研究后,
我了解到项目构建后事件中指定的 XML 文件名已更改,因此您必须更新它以使用新的文件名

您可以通过修改项目文件来解决此问题,如下所示:
在视觉工作室中,
选择项目(Notepad++)并选择“项目”>“项目” VS 菜单中的属性(或按 ALT + F7)

在“属性页”窗口中,
展开配置属性节点
然后,展开“构建事件”节点
选择构建后事件以查看其属性

将命令行属性修改为如下所示:
复制 ..\src\config.model.xml ..\bin\config.model.xml
复制 ..\src\langs.model.xml ..\bin\langs.model.xml
复制 ..\src\stylers.model.xml ..\bin\stylers.model.xml

单击确定并构建...

Posting the answer for others who might run into this issue

After a little research on this subject,
I learned that the XML file names that are specified in the projects Post-Build Event have changed, so you have to update that to use the new file-names

You can fix this by modifying the project file like this:
In Visual Studio,
Select the Project (Notepad++) and choose Project > Properties from VS Menu (or hit ALT + F7)

In the Property Pages window,
expand the Configuration Properties node
then, expand the Build Events node
Select Post-Build Event to view its properties

Modify the Command Line Property to look like this:
copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml

Click OK and Build away...

葬シ愛 2024-10-05 11:59:04

另外,请注意路径中的空格。我只是浪费了半个小时来说服自己预构建复制步骤中的路径确实是正确的(它们是)。

被路上的空格咬住了。您想要引用它,而不是复制 d:\a path\*.dll d:\b path\ ,如下所示:

copy "d:\a path\\*.dll" "d:\b path\"

Also, be careful of spaces in the path. I just wasted a half hour convincing myself that the paths in a Pre-Build copy step were indeed correct (they were).

Got bitten by spaces in the path. Instead of copy d:\a path\*.dll d:\b path\ you want to quote it, like this:

copy "d:\a path\\*.dll" "d:\b path\"
请持续率性 2024-10-05 11:59:04

不特定于 Notepad++,但我在最近的构建后步骤中遇到了类似的问题。当你看到...

PostBuildEvent:系统找不到指定的文件。

..您的源路径错误。就我而言,我使用了错误的相对源路径。这解决了它:

copy /Y $(TargetName).* $(ProjectDir)..\Latest

Not specific to Notepad++ but I had a similar problem with a recent post-build step. When you see...

PostBuildEvent: The system cannot find the file specified.

..your source path is wrong. In my case I was using the wrong relative source path. And this fixed it:

copy /Y $(TargetName).* $(ProjectDir)..\Latest
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文