Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I automate Clean & Build...?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
How Do I automate Clean & Build...?
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01177564
Message ID:
01177564
Views:
52
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()
        '***************************************
        ' Initialize Variables
        '***************************************
        Dim objSolution As SolutionBuild
        Dim objProjects As Projects

        '***************************************
        ' Clean & Build The Main Solution
        '***************************************
        objSolution.Clean(True)
        objSolution.Build(True)

        '***************************************
        ' Clean & Build Each Project Inside Solution
        '***************************************
        For Each objProject As Project In objProjects
            'Tried Looking But Could Not Find a Clean or Build Method Inside the Project Object
        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
Reply
Map
View

Click here to load this message in the networking platform