开发者

Create two (slightly) different executables from same visual c# project

开发者 https://www.devze.com 2023-03-05 03:37 出处:网络
I have a visual c# project from which I want to compile two executables: Full.exe, and Limited.exe.Limited.exe simply hides a couple of UI controls.

I have a visual c# project from which I want to compile two executables: Full.exe, and Limited.exe. Limited.exe simply hides a couple of UI controls.

I'm thinking of adding another pair of solution con开发者_如何学Pythonfiguration (DebugLimited and ReleaseLimited) which simply sets a flag, and then in my build script just build my app with Release configuration and with ReleaseLimited configuration.

Is there an easier way to accomplish this?


If you really want 2 differnet executables this approach works. Make sure that each flavor builds into its own directory. "Build-> batch build" option will let you build all of them at once.

If goal is to have different UI instead of different executables you can use setting in .config file to control what UI to show/hide (with appropritate code to turn on/off controls).


I would make a couple of projects. One called Full and the other called Limited. They are simply wrappers around your main project and set your appropriate options before starting. This way, on a full build of your solution you always get both executables.

0

精彩评论

暂无评论...
验证码 换一张
取 消