Visual Studio安装项目 - 添加预建步骤

时间:2022-05-17 22:57:26

I want to make my build process for producing a setup project to be a single click. However, I also want to add {smartassembly} to the build step to obfuscate the build, but only on our build machine. How can I add a pre-build step to a visual studio 2008 vdproj?

我想让我的构建过程生成一个单击的设置项目。但是,我还想将{smartassembly}添加到构建步骤以混淆构建,但仅在我们的构建机器上。如何在visual studio 2008 vdproj中添加预构建步骤?

Basically, I want to move the command line argument to obfuscate the build from the end of building the application to part of the setup program, so only the build machine needs to have a license.

基本上,我想移动命令行参数,以便从构建应用程序到安装程序的一部分结束时对构建进行模糊处理,因此只有构建机器需要拥有许可证。

Alternatively, should we just get {smartassembly} for all of our developers? It's a very large cost change (going from one build license to 5 is not a trivial amount of money), so the reasoning here has to be pretty airtight. I was going to add it to just the machine responsible for the build, rather than having all developers have it, and then force developers to try to reproduce bugs in the release build that customers actually have.

或者,我们应该为所有开发人员获取{smartassembly}吗?这是一个非常大的成本变化(从一个构建许可证到5个不是一笔微不足道的金钱),所以这里的推理必须非常密集。我打算将它添加到负责构建的机器,而不是让所有开发人员都拥有它,然后强迫开发人员尝试重现客户实际拥有的版本构建中的错误。

2 个解决方案

#1


yeah, it turns out I'm a moron. The UI is different, but the pre- and post- build items are in the properties as if it were a UI property, not a project property.

是的,事实证明我是个白痴。 UI是不同的,但是构建前和构建后的项目都在属性中,就好像它是UI属性,而不是项目属性。

#2


Why not have a different target/build/configuration for your solution/projects. It is the only one built on the build machine.

为什么不为您的解决方案/项目提供不同的目标/构建/配置。它是唯一一个构建在构建机器上的。

(pre/post build step only for that project/target/configuration)

(仅针对该项目/目标/配置的前/后构建步骤)

If that doesn't work, I'd ask the company who wrote it their suggestions.

如果这不起作用,我会问那些写下建议的公司。

#1


yeah, it turns out I'm a moron. The UI is different, but the pre- and post- build items are in the properties as if it were a UI property, not a project property.

是的,事实证明我是个白痴。 UI是不同的,但是构建前和构建后的项目都在属性中,就好像它是UI属性,而不是项目属性。

#2


Why not have a different target/build/configuration for your solution/projects. It is the only one built on the build machine.

为什么不为您的解决方案/项目提供不同的目标/构建/配置。它是唯一一个构建在构建机器上的。

(pre/post build step only for that project/target/configuration)

(仅针对该项目/目标/配置的前/后构建步骤)

If that doesn't work, I'd ask the company who wrote it their suggestions.

如果这不起作用,我会问那些写下建议的公司。