问题描述:

I use clickonce to deploy my program. the problem is the deployement team have to enter his conectionString on installation and write into app.config.

How can I add a dialogbox (for put the connectionString) in click once deployment ?

Or I have to add setup project into myProg.sln ?

Thanks you in advance

网友答案:

What you want to do is not nice. I take it that you want the user to specify a connection string at installation and persist this to your program. Well, this is not a good thing to do, and connections strings are liable to change; with this in mind you need to include a connection string dialog in your code or at least a text box where the user can set a new connection string that your application can use.

You could use the VS2010 database connection dialog that Microsoft have released (download from here). This will do exactly what you want without you having to do the hard work (and for pretty much any remote connection you want).

I hope this helps.

网友答案:

I suggest you integrate those questions in the software itself, something like this:

  1. user gets your software
  2. user installs the packare (no question here!)
  3. the software upon launch searches for the info it needs. if it doesn't find them, it starts questioning the user.
相关阅读:
Top