What is the best way to publish multiple versions of the same ClickOnce application?

前端 未结 3 568
小蘑菇
小蘑菇 2021-01-16 12:31

I have a c# ClickOnce application that I need to be able to publish multiple times for OEM purposes.

The way I understand it now is that publish settings are located

3条回答
  •  野的像风
    2021-01-16 13:21

    If you copy the .csproj in your project folder, it will reference all of the same source files and you can just change the executable name. Create another VS solution and you can reference the copied .csproj and get rid of your first one so that you can publish two separate versions.

    This isn't ideal for ClickOnce however.

    If you use a Singleton object that specifies the "mode" (Company A, B, C, etc.) you can easily store that in the app.config (or another xml file). Then just re-publish your ClickOnce Application but copy the correct version of your configuration file in so it gets shipped with the build. This way, you don't need any additional csprojects Just include all of your icons and set them at run-time on App Start based on your Singleton object.

提交回复
热议问题