質問

We have a reasonable size application that is rolled out for N customers across Z zones for Y versions. For each of these situations each clickonce URL corresponding WCF Service URL(s) are all different.

We don't know what these will be until a deployment / update is required. This is a very manual process at the moment:

build solution, update assembly versions update clickonce client configuration to have correct url re sign click once app setup services (url's, config etc) deploy

We are trying to automate this process and free up a lot of time and error within this. Our approach has been on every commit builda generic version and archive that as an artifact by version number (we auto increment the client version number and store the whole app, client, server, db scripts etc under that version number). This means the business can say we have UAT'd version X and can be happy for it to go live.

I have been in the process of creating the automated tools to archive, config transforms etc then re sign the client app. We then realized that the click once creates a setup.exe which has resources in it that need to be updated, for example the name will change, the url changes.

I am trying to find a way to get this setup.exe and change the resource strings in an automated / command line / C# way.

I tried ildasm but it won't open it saying "error: setup.exe has no valid CLR header and cannot be disassembled"

Any way of editing this resource or ensuring we can build a generic version of the app then customize it for each new requirement would be great.

役に立ちましたか?

解決 2

Found a way of updating the baseurl and a couple of other bits:

http://msdn.microsoft.com/en-us/library/8st7th1x(v=vs.90).aspx

would seem it knows how to update it self. From my initial tests this seems to work, going to test it out more asap.

他のヒント

I think the best answer to your problem is to take a different approach. You can't access these resource details (that I am aware of) in the setup.exe file that is built by Visual Studio. However, ClickOnce also has a .Net API that you can use to integrate into your application when you want to control the update and installation process, yourself.

Check out the MSDN article here on creating a Custom Installer Project.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top