MyApp.exe.config and Deployment

T

Todd C

Hello all. I'm very new to VB 2005 development.

I have created a simple Windows Forms project for a database. I have the
ConnectionString property saved in my app.config file.

When I build the project, I see the MyApp.exe.config.deploy file gets
created in the build location. This will, I assume, become the
MyApp.exe.config file when it gets installed somewhere else.

When I run the Setup on another machine, I cannot find this file. I have
seen references to the fact that it should be in the same FOLDER as the
installed application, but all I see in THAT regard is something under the
users' Startup folder under Setting, etc.The only thing it contains is a
shortcut file of type "Application Reference". Where did the executeable get
installed to?

My ideal solution would be to allow the end user to modify their
MyApp.exe.config file once, and not have to worry about subsequent
installations (upgrades, etc) overwriting it.

The main thing they will need to do is modify a ConnectionString property to
point to their local SQL instance.

Do I need a Setup Project?

Thanks in advance.
 
M

Mr. Arnold

Todd C said:
Hello all. I'm very new to VB 2005 development.

I have created a simple Windows Forms project for a database. I have the
ConnectionString property saved in my app.config file.

When I build the project, I see the MyApp.exe.config.deploy file gets
created in the build location. This will, I assume, become the
MyApp.exe.config file when it gets installed somewhere else.

When I run the Setup on another machine, I cannot find this file. I have
seen references to the fact that it should be in the same FOLDER as the
installed application, but all I see in THAT regard is something under the
users' Startup folder under Setting, etc.The only thing it contains is a
shortcut file of type "Application Reference". Where did the executeable
get
installed to?

I would think that the files would have been installed to whatever folder
you *told* the install package to install the files, when you configured the
install package.
My ideal solution would be to allow the end user to modify their
MyApp.exe.config file once, and not have to worry about subsequent
installations (upgrades, etc) overwriting it.

Well, that would be a problem for you if you had to deploy the solution on
the machine again using a setup package that had the .config in it.
The main thing they will need to do is modify a ConnectionString property
to
point to their local SQL instance.

You assume that they know how to do that?
Do I need a Setup Project?

Maybe, you need two install packages one that includes the app.exe.config
and one that doesn't include the app.exe.config.

You might want to look at .Net's One Touch Deployment or whatever it's being
called now, as well.
 
M

Michel Posseth [MCP]

You only need a config file if you want other settings as the default
settings , so if your user doesn`t know how to create such a file you could
add one to your deploy package .in the setup package you can mark it so that
it isn`t overwritten or uninstalled ( check the file properties in your
installer project )

HTH

Michel
 
J

JDS

Hello all. I'm very new to VB 2005 development.

I have created a simple Windows Forms project for a database. I have the
ConnectionString property saved in my app.config file.

When I build the project, I see the MyApp.exe.config.deploy file gets
created in the build location. This will, I assume, become the
MyApp.exe.config file when it gets installed somewhere else.

When I run the Setup on another machine, I cannot find this file. I have
seen references to the fact that it should be in the same FOLDER as the
installed application, but all I see in THAT regard is something under the
users' Startup folder under Setting, etc.The only thing it contains is a
shortcut file of type "Application Reference". Where did the executeable get
installed to?

My ideal solution would be to allow the end user to modify their
MyApp.exe.config file once, and not have to worry about subsequent
installations (upgrades, etc) overwriting it.

The main thing they will need to do is modify a ConnectionString propertyto
point to their local SQL instance.

Do I need a Setup Project?

Thanks in advance.

It sounds as though you are referring to ClickOnce deployment rather
than a setup project.

A typical location in Vista would be c:\Users\username\AppData\Local
\Apps\2.0\ .... and then some obscure numbering for the subfolders.
Once you have found the correct location then the exe and config files
should be apparent.

Using a setup project you would be able to have more control over the
location of your application files.

However, are you really sure you want to do this? If you want to
specify a local connection string can you not just use "LocalHost\" or
".\"? Requiring users to modify the connection string would not
normally be a good idea.

HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top