I have a .NET 4.0 solution in Visual Studio 2012 with two projects and a setup project. Project A is a Windows Forms app. Project B is a class library, referenced by project A. Project B has a *.txt file, marked with a Build Action of Content and Copy to Output is set to Copy Always.
On a new installation, everything works perfectly. However, when the installation preexists, and the deployment involves changes to the txt file, the installer fails to upgrade the preexisting txt file. If I uninstall/reinstall the proper version of the txt file is deployed.
The process I'm going through for deployment is:
I'm sure if I did something silly like increment the txt file name, everything would work. What am I missing to ensure the content file gets updated?
This is caused by a known Windows Installer limitation: http://setupanddeployment.com/windows-installer-bugs/missing-files-upgrade
A solution is to modify the Version column in the File table for your TXT file. If you set a version, the file in your package should overwrite any existing file.