cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fluxmunki
Level 3

MSBuild not renaming app.config

I have an Installshield basic MSI project with project output from my executable which includes an app.config. When I build the installer in visual studio the installer includes the renamed file (Administrator.exe.config). However when I build with MSBuild the installer contains the file with it's original name (app.config). This is incorrect and stops the app working correctly.

I've looked at the project outputs in the log file and it is picked up as being app.config. Any ideas what the problem could be or how I can get around it? I guess one answer would be to not include it as a "project output", but this seems a bit of a shame.
Labels (1)
0 Kudos
(5) Replies
fluxmunki
Level 3

Sorry, but it's been a while since I posted, and no replies. I've recreated the problem with a really simple console app to check it wasn't anything to do with my project. Still happens!
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Well, the overkill approach that might work would be to essentially copy the InstallShield.targets file into your .isproj, and get extra control over how project outputs are farmed. Worst case you could override the single file very explicitly. That said, if you enable the dump of project outputs (the commented line in InstallShield.targets is close, but needs to be %(Name) instead of %(ProjectName)), is the desired name present anywhere, or just the source name?
0 Kudos
fluxmunki
Level 3

Thanks for your reply.
I've attached a detailed build log from the project I created to reproduce the problem. (With project output logging added). The interesting bit is:

Project Output Files:
EBSTestClient.Primary output:EBSTestClient.exe;
EBSTestClient.Primary output:app.config;

The desired name EBSTestClient.exe.config is present in the log, but I think this is more related to MSBuild building the project rather than the installer.

I'll take a look at the installshield targets file a bit myself, see if I can figure out what's going on.
0 Kudos
roderickPrince
Level 2

If you check the build output in your applications debug/release folder you will see the app.config was correctly renamed to myApp.exe.config.

It seems that InstallShield does not consider this to be a project output and instead picks up the app.config and directly copies it over to the folder.

This has to be something other people have resolved...

Does anyone from Flexera monitor these threads?
0 Kudos
Ole_K_
Level 2

How it could be that installshield does not provide renameing the app.config to .config by default?

I mean as "Setup and Deployment project" replacement from MS I am expecting that this is working without doing anything...

So when are you going to implement it?
0 Kudos