Receiving error message: "The installed product does not match the installation source(s)"
I have written a .NET C# applica开发者_运维知识库tion and have created an installer in Visual Studio 2008. Everything works fine. The application uses an external config file (not app.config). The application is written such that when the config file is deleted, the defaults for the application are restored and a new config file is created. This behaviour is part of the requirements of the system and cannot be changed.
When the file is deleted, however, the next attempt to run the application results in the following error message:
"The installed product does not match the installation source(s)"
And the system brings up an installer program.
I'm figuring that there is some sort of configuration in the install project that can turn this behavior off, but I cannot find any documentation or parameters to change this behavior.
Any ideas?
Assuming your config file is in the installation program (it sounds like it is)...
Right-click on your config file, and click Properties. The bottom value is called Vital. Set it to false.
How about just don't install the config file?
If your application is going to generate a default one if none exists, then there really isn't a reason to bundle one in the installer.
精彩评论