PDA

Click to See Complete Forum and Search --> : [1.0/1.1] Deploying (MSI) my too also deploys a xxx.exe.config file? [C# 2003]


Shaitan00
Jul 27th, 2007, 04:01 PM
Not sure if this is normal or not but I created a deployment project for my tool (tool.exe) which was created using VSC# 2003 .Net 1.1 and after running the MSI (installing) there is a tool.exe.config file that also appears (I can also see it in primary outputs of the deployment project).

If I delete the file after install the tool.exe still runs fine and I see no reason to keep it (I kind of liked that it was a one-file deployment) so I wanted to know a few things:
- Is there a reason to keep this file post-install?
- Is there a way to remove it from the outputs of my MSI package (deployment package)?
Because I don't recall ever adding it before and I don't see anywhere I can remove it from the outputs of the project...

Any information or help would be much appreciated...
Thanks,

RudiVisser
Jul 27th, 2007, 04:31 PM
If it is a one file deployment (ie. the setup only outputs one file), why don't you just distribute the executable (tool.exe) rather than the MSI.

Unless of course you're doing some registry configuration/dll registering etc.

Shaitan00
Jul 27th, 2007, 05:33 PM
So I guess I can omit that one file and simply deploy the .exe then?

jmcilhinney
Jul 27th, 2007, 07:28 PM
The config file is where you can store configuration information. Normally there is no config file unless you've specifically added one or else you've done something that requires the IDE to add one in order to store some information. If the file is there then it's likely to be important unless you've created it, either implicitly or explicitly, and then later removed the need for it by removing the information stored in it from the application. If you're not sure then I'd suggest distributing it because your app may crash if it tries to use it and doesn't find it. You could post its contents here and we can try to assess whether it contains anything important.

Shaitan00
Jul 27th, 2007, 07:33 PM
Well - I set the project settings to .NET 1.1 so I thought that might be it... The contents of the file are as follows


<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<requiredRuntime version="v1.1.4322" safemode="true"/></startup></configuration>



What do you think?

jmcilhinney
Jul 27th, 2007, 07:42 PM
Like I said, there usually is no config file unless it's needed to store some important information. Without that your app will not know that it's not to run on a lower Framework. In that case it may run and error if that version is not present. You probably haven't seen an issue because that version is always present. You may not see an issue even if it wasn't but, then again, you might. Don't take the risk. Deploy the config file.

mendhak
Jul 28th, 2007, 10:34 AM
My guess is that the tool.exe.config file comes useful when there is a machine with both versions of the framework installed on it.

Hack
Jul 30th, 2007, 06:14 AM
Moved to Application Deployment