Clickonce does not create appname.exe.config.deploy file correctly

I am trying to publish an internal application that I developed. I have done this several times before, no problem, but never with this application.

In VS2010, I go to my TestManager project, hit the publication and set everything up correctly. I go to my folder and run setup.exe . Then the installation completes with an error and gives me a log file which indicates that it cannot find the file TestManager.exe.config.deploy .

When I go to the Application Files directory, it is true that he did not create the TestManager.exe.config.deploy file, but instead created the configuration as App.config.deploy .

I looked at other ClickOnce installers (even installers for other projects in one solution) and made sure that it creates <appname>.exe.config.deploy and does not create App.config.deploy .

Why does Click-Once not create the app.config file for deployment and how to fix it?

+7
source share
1 answer

I don’t understand if this will work, but if you have problems deploying the ClickOnce file with certain files, the first thing I will check is the action property for these files.

Using Solution Explorer, verify that the App.Config build action is still "No."

If it was specified as "Content", this can lead to the fact that the file will be expanded with the original name (and not with the prefix name), as you mentioned.

NOTE. Other configuration files should be marked as Content to make sure they get to the deployment folder.

+23
source

All Articles