1

We have turnkey software that we release to clients. We set up a set of servers to run the server SaaS portion, and for many clients, we set up terminals that allow agents to place orders for customers. The terminal software is a ClickOnce app that runs on the client terminals. One group of these clients have ever-so-slightly different requirements so I made another project where almost every file in that project links (using Add As Link) to the original project, and then I have compiler directives to print orders on a printer differently, etc. as well as the project file having a different project GUID and other things.

It's obviously not the ideal solution. However, since these people are setup on ClickOnce, and that does its thing based on the project GUID, I can't just swap them over to the 'main' terminal project. Now, we're about to add more people to this program, and they're all about to use the terminal software, and I want to get away from these bad practices.

It would be GREAT if I could define a 'template' that contained a few things - namely, project name, description, copyright information, the project GUID, and parameters for publishing clickonce. I could say 'I'm using template XYZ' and it would then load all of the parameters into the project, replace AssemblyInfo.cs parameters, and prepare it for ClickOnce without having to hit the dropdowns and find or paste in the URLs. I'd also like to be able to swap out the icon, if possible. A nice benefit is that I could keep a copy of each application on my machine for a quick uptime test - since most clients are released with the same GUID (with the exception of the other group), I can't install another clients' terminal app on my machine without uninstalling the existing one first!

In my research so far, I either need to just deal with the issue by swapping stuff in and out, or possibly have a project file (located in the 'main' folder) that is identical to the main one but with the info swapped around. Is there a way to easily do this? I feel like there may be a much easier/better way to accomplish what I want to do.

1

I assume you are currently using visual studio to create the ClickOnce manifests? (You mentioned dropdowns)

You could use the mage CLI and pass your dependencies in as parameters. Your template file would then be some sort of powershell or batch file which calculated the right parameters.

Alternatively you could ditch ClickOnce and use something a bit friendlier like Squirrel.Windows

1
  • I'm going to look into this and get back to you. This sounds promising. Dec 7 '17 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.