VS净:邮政搭建&QUOT事件;来自以下的主要输出; myProject的&GT;&QUOT;在安装项目 [英] VS .Net: Post build events for "Primary Output from <myProject>" in installer project
问题描述
我用下面的帖子在项目建设行动,合并一个lib到我的应用程序:
I'm using the following post build actions in a project, to merge a lib into my application:
IF $(ConfigurationName) == Debug GOTO end
cp $(TargetPath) $(TargetDir)app_unmerged.exe
del $(TargetPath)
"C:\Program Files\Microsoft\ILMerge\ilmerge.exe" /internalize $(TargetDir)MyApp_unmerged.exe $(TargetDir)someLib.dll /out:$(TargetDir)myApp.exe
del $(TargetDir)myApp_unmerged.exe $(TargetDir)someLib.dll
:end
这工作得很好。现在我有一个安装项目和补充项目输出。我想到的是,从主输出时,即位于/ bin /释放的exe文件。但实际上反而/bin/release/myApp.exe的,/obj/release/myApp.exe被使用。
This works fine. Now I have an Installer project and added the Project Output. I would expect that the "Primary Output from " is used, i.e. the exe in /bin/Release . But actually instead of /bin/release/myApp.exe , /obj/release/myApp.exe is used.
有谁知道,如果我可以改变这种行为,并使用位于/ bin /输出发布安装项目?谢谢。
Does anyone know if I can change this behavior and use the output in /bin/release for the installer project? Thanks.
推荐答案
似有针对此问题没有真正解决,但有解决方法。我创建微软票连接:的https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=428898
Seems there is no real solution for this problem, but a workaround exists. I created a ticket on Microsoft connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=428898
微软anwser:
您好,
为了执行这些后建的行为,则需要将它们放在一个批处理文件,然后添加此时,相应的命令来调用后生成事件对话框中的批处理文件。我看到有在脚本几个实例以引用的一些的Visual Studio变量。由于我们没有这些变量公开为环境变量,你必须把它们作为参数传递给批处理文件。
In order to execute those post build actions, you will need to put them in a batch file and then add the appropiate command to invoke the batch file in the post build event dialog. I see that there are several instances in the script with references to a number of Visual Studio variables. Since we do not expose those variables as environment variables, you will have to pass them as parameters to the batch file.
我希望帮助!
糖果蒋 项目经理 - Visual Studio的
Candy Chiang Program Manager - Visual Studio
这篇关于VS净:邮政搭建&QUOT事件;来自以下的主要输出; myProject的&GT;&QUOT;在安装项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!