I have solved my own problem!
After a long time trying to save the savedState object to the projects settings and trying to debug through the code, I some how manage to crash the whole thing. I currently have it installed but I cannot uninstall it as it throughs many errors! So decided to start a new project again by just copying the code needed!
Whilst doing this I knew that in my Setup project I need to add the projects dll to the GAC when it is installed.To do thisI go to the setups File System Editor. I then select from the 'Add Special Folder' menu, 'Global Assembly Cache Folder'. From this folder I then went to 'Add' -> 'Assembly'. This brings up the 'Select Component' dialog. Under the browse tab I then browsed to my dll which was under:
C:\My Documents\Visual Studio 2005\Projects\SharePoint\SharePoint\bin\Debug !
That is when it clicked!
When I want to uninstall my project it is getting the dll from the GAC and this is the debug dll! I then changed this by adding the Primary output from <ProjectName> (Active). Now when my project is uninstalled in debug mode I get the message box saying 'DEBUG' and in release mode the message box says 'RELEASE'!
Lucy