I come across a problem in VS2005 which has been driving me crazy. Sporadically (and more often then not) when I attempt to open a form in Design view, I get an error page stating that a project dependency (another project that I added to the solution) could not be found. 98% of the time, my entire IDE crashes and I have to restart VS2005. The only way to fix this that I have found it to do the following steps:
1) Clean the Solution
2) Build Solution
3) Clean Project #1
4) Build Project #1
5) Clean Project #2
6) Build Project #2
Doing this manually several times a days is more then a little irritating. (Ultimately I would like to be able to fix whatever is causing this "lost dependency" problem) Now I would like to be able to do all this using a macro, but I an not familier with the required Syntax.
I found the following information/code, I have yet to test it but it seems to only work at the solution level...I need to access each project inside the solution as well. Any ideas?
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Public Module CleanRecompileOfApplication
Public Sub CleanProjects()
Dim objSolution As SolutionBuild
Dim objProjects As Projects
objSolution.Clean(True)
objSolution.Build(True)
For Each objProject As Project In objProjects
Next
End Sub
End Module
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook