taz8020
asked on
Visual Studio does not show my win form app on first build
Visual Studio is no longer showing my app on first build. I have to do a build sometimes 2 or 3 times before it shows my app. It was all working fine but then I stupidly not do a backup for 2 months and then used find and replace (never do that again). I went through the code and changed them all back or I think all of them. But now when ever I change any code I have to build it 2 or 3 times before it will show my app. Once it does show it the win form app it all works fine.
Please help this is driving me mad.
Please help this is driving me mad.
Hi taz8020,
most probably for any reason VS thinks one or more output files aren't up to date. Did you try a Clean or Rebuild All? It even could be a file which is deleted on disk but still present in the project leads to such a beahvior. Or possibly a file with a creation/modification date in the future could cause such a problem too I think.
ZOPPO
most probably for any reason VS thinks one or more output files aren't up to date. Did you try a Clean or Rebuild All? It even could be a file which is deleted on disk but still present in the project leads to such a beahvior. Or possibly a file with a creation/modification date in the future could cause such a problem too I think.
ZOPPO
ASKER
I don't get any build errors I press build a few times in succession (without changing anything) and then suddenly it will work. I did try the build and rebuild will look to see if there are any files no longer on disk.
ASKER
its not any deleted or modified files any other ideas. Most of the time its requires 2 builds sometimes 3.
Are there multiple projects in the solution. If there are then check the build / dependency order
ASKER
yes there is, but where and how do I do that?
Which language are you coding in?
ASKER
vb.net
For VB.net the dialog should be pretty similar if not the same.
ASKER
Checked that and still does not work first time, its driving me mad. The first time you build you can see it building and takes about 40sec to build. but the second time as its built it takes seconds. Any other ideas?
All other projects open fine its just this one which has four internal projects.
All other projects open fine its just this one which has four internal projects.
Create a new solution and import the projects into it. That should be done pretty quickly and, with luck, it will cure the problem.
ASKER
when you say import do you mean add existing project? if so tried this and get the same problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe you can find out what goes wrong by turning on Visual Sutdios system logging - here you can find how this can be done: http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx
When you have configured this you should do a RebuildAll followed by F5 and analyze the log output.
When you have configured this you should do a RebuildAll followed by F5 and analyze the log output.
ASKER
Well I seem now to have other problems but the one I asked about is sort of fixed. In this project there is about 400 forms the logs look fine but after going through page by page I do get a cross thread error on the splash screen. What is confusing is its on the same thread. its just a line of code that sets the theme but once I comment it out its works fine and in my main project. Have other issues now but as they are different will ask on another thread tomorrow. Thank you for your help.
Does the build fail and you make corrections or do you just press build a few times in succession (without changing anything) and then suddenly it will work?