构建后命令行 [英] Post-build command line
问题描述
我很难解决以下构建后事件命令错误。我使用Eazfuscator.Net进行混淆。所以第一行是由它自动添加的。然后,我需要DLL文件的副本到特定路径。所以我写了第二个命令。当我构建我的项目时,我有以下错误:
Hi,
I am having difficult solving the following post-build event command error. I am using Eazfuscator.Net for obfuscation. So the first line is automatically added by it. Then, I needed a copy of the DLL file to a specific path. So I wrote the second command. When I build my project I have the following error:
The command "if /I "Debug" == "Release" Eazfuscator.NET.exe "C:\Users\XXX\Documents\Visual Studio 2012\Projects\Core\Core\bin\Debug\Core.dll" --msbuild-project-path "C:\Users\XXX\Documents\Visual Studio 2012\Projects\Core\Core\Core.csproj" --msbuild-project-configuration "Debug" --msbuild-project-platform "AnyCPU" --msbuild-solution-path "C:\Users\XXX\Documents\Visual Studio 2012\Projects\Core\Core.sln" -n --newline-flush -v 3.3<br />
c:\Windows\System32\xcopy.exe "C:\Users\XXX\Documents\Visual Studio 2012\Projects\Core\Core\bin\Debug\Core.dll" C:\Users\XXX\Inetpub\wwwroot\WebService\bin" exited with code 2.
我在后期制作中的命令:
命令1:
My commands in the post-build:
Command 1:
if /I "$(ConfigurationName)" == "Release" Eazfuscator.NET.exe "$(TargetPath)" --msbuild-project-path "$(ProjectPath)" --msbuild-project-configuration "$(ConfigurationName)" --msbuild-project-platform "$(PlatformName)" --msbuild-solution-path "$(SolutionPath)" -n --newline-flush -v 3.3
命令2:
Command 2:
c:\Windows\System32\xcopy.exe "$(TargetPath)" C:\Users\XXX\Inetpub\wwwroot\WebService\bin
如果我的命令是正确的,我试过单独运行它们它似乎工作正常。但是,当我保留他们两个时,我有一个错误。有人可以点光吗?在此先感谢。
I tried if my commands are correct by running them alone and it seems to be working fine. But when I keep them both I have an error. Can someone shed a light please? Thanks in advance.
推荐答案
(ConfigurationName)==发布Eazfuscator.NET.exe
(ConfigurationName)" == "Release" Eazfuscator.NET.exe "
(TargetPath) --msbuild-project-path
(TargetPath)" --msbuild-project-path "
(ProjectPath) - msbuild-project-configuration
(ProjectPath)" --msbuild-project-configuration "
这篇关于构建后命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!