被纳入安装项目之前重命名项目输出 [英] Rename project output before being included into Setup project
问题描述
我有一个建成并放置到部署安装项目exe文件。
我想重命名所产生的EXE(到.SCR文件 - 这是一个屏幕保护程序)包含在安装项目之前。我该怎么做呢?
I have an exe that is built and placed into a Setup project for deployment. I want to rename the exe that is produced (to a .scr file - it is a screensaver) before inclusion in the setup project. How do I do this?
我知道我可以重命名后的文件安装过程,但我不想做这种方式,我想该文件纳入安装项目之前更名
I know I could rename the file in a post install process but I don't want to do it this way, I want the file to be renamed before inclusion into the setup project
任何帮助将是巨大的感谢
我使用Visual Studio 2008和程序是用C#
Any help would be great thanks I am using Visual Studio 2008 and the program is written in C#
感谢
推荐答案
我发现了的 MSDN
您需要安装在你的的csproj文件中的一些AfterBuild事件(手动编辑),这里是我的样子
You need to setup some AfterBuild events in your csproj file (manually edit it), here is what mine looks like
<Target Name="AfterBuild">
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(ProjectDir)\bin\$(ConfigurationName)\smileyscreensaver.scr" SkipUnchangedFiles="true" />
</Target>
这篇关于被纳入安装项目之前重命名项目输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!