I have a project with two class libraries. I used 'Setup and deployment tool' to make MSI files.
Initially, I have build v 1.0.0 and installed in a machine. After that, I have made few changes in my libraries and made a build v 1.0.1.
When I tried to install the v1.0.1 in a machine that already has 1.0.0. It get installed replacing the older one as expected.
But, When I tried to run the app v1.0.1 and click a button, it immediately throwing a exception as follows.
SubmitButton_CLICK : Method not found: 'Void Library1.method..ctor(Int32, System.String, Int32, Int32, System.DateTime, System.String, System.DateTime, Int32, TabletEvalLibrary.SkillMethod, System.String, TabletEvalLibrary.User, System.Collections.Generic.List`1<Library1.Porceedure>, Int32)'
Its really something weird. I am sure that my project has this ctor and I am able to run the app successfully via Visual Studio.
Any suggestion for me on this?
When you do an upgrade with a VS setup (RemovePreviousVersions) it can succeed but that doesn't mean that the files have been updated. Standard file replacement rules are used, and that means that files will be replacced only if their file versions have been incremented.
So here is a scenario that fits what you see: You changed that ctor and rebuilt it, and thought you'd installed it, but the older file with the different ctor is still on the system. So a call to it will fail. You should increment AssemblyFileVersion of your code files when you do a release to ensure that the new versions replace the older versions.