In addition to @SwDevMan81's answer with whom I agree, I would say that setting both the output and reference paths may help avoid such behaviour for class libraries. For instance, your application references a class library that you are currently writing, and you perform some changes to this referenced library, but the changes don't show.
What happens is that the compiler will copy localy (to the project's output directory) thereferenced DLL and as long as it is there, it won't get updated. You may verify it by clicking right on the referenced assembly, then clicking Properties. Look at the Filepath property. If you see it doesn't match your actual filepath, then you will have to make sure to set the reference path accordingly in the project properties, then removing then removing the actual reference to add it where the actual build is, that is, where your class library output folder is set. So, whenever you regenerate your class library, your application gets the update automatically. Here's an example:
Application Project references : The ClassLibrary1.dll
assembly.
Once you will generate your application, the ClassLibrary1.dll file will be copied to your application output directory. Let's suppose C:\Open\Projects\ApplicationProject1\Debug\bin
. So, this directory will now contain the ClassLibrary1.dll file.
- You rewrite a method to behave completely differently;
- You regenerate the ClassLibrary1 assembly;
- You rerun your application (remember that the file already exists!);
- Ends up wondering why the changes didn't take effect? That is because your application referenced the cached assembly within its
Debug\bin
folder.
To workaround:
- Remove the assembly reference from your application project;
- Go to the project's properties and click the Reference Path tab;
- Browse to your ClassLibrary1 output folder, then open it;
- Your Reference Path property is now set for this library, then re-add the ClassLibrary1 assembly to your application project;
- Run once, stop running, and see if the Path property of your referenced assembly is still the same as the one in the project's Reference Path property;
- You're done (if everything worked fine).
C:\Open\Projects\ClassLibrary1\Debug\bin\ClassLibrary1.dll
In the end, this might be the cause of your problem if your GUI Forms are part of a class library, and the solution I described should work.