fc_curling
asked on
Clean and Rebuild Macro problem
I'm trying to create a macro that will perform a Clean Solution ad then a Rebuild Solution.
When recording a macro doing so it creates:
When I run this, I get the following error (after cleaning the solution)
I tried inserting a Threading.Thread.Sleep() but that didn't help.
Any suggestions ?
When recording a macro doing so it creates:
Public Module RecordingModule
Sub TemporaryMacro()
DTE.ExecuteCommand("Build.CleanSolution")
DTE.ExecuteCommand("Build.RebuildSolution")
End Sub
End Module
When I run this, I get the following error (after cleaning the solution)
An exception of type 'System.Runtime.InteropServices.COME xception' occurred in VBAssembly but was not handled in user code
Additional information: Et kald til en COM-komponent returnerede fejlen HRESULT E_FAIL.
I tried inserting a Threading.Thread.Sleep() but that didn't help.
Any suggestions ?
Build.RebuildSolution
automatically does a Clean before starting the build.
http://www.codekicks.com/2009/06/difference-between-build-solution-and.html
automatically does a Clean before starting the build.
http://www.codekicks.com/2009/06/difference-between-build-solution-and.html
ASKER
@DanRollins
No it doesn't.
Rebuild forces a rebuild on all projects in the solution, it doesn't make a cleanup of the bin folder first.
No it doesn't.
Rebuild forces a rebuild on all projects in the solution, it doesn't make a cleanup of the bin folder first.
ASKER
Full points available for a solution-
I don't know why the error occurs, but what I said stands.
Try it. Note that the timestamp changes on the DLLs and other files in the BIN folder that are normally deleted by Clean. They (all of them) are rebuilt during the Rebuild process.
Try it. Note that the timestamp changes on the DLLs and other files in the BIN folder that are normally deleted by Clean. They (all of them) are rebuilt during the Rebuild process.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect Dan, just what I needed.
Do you have any links to any programming references for developing VS Macros and/or AddIns?
Do you have any links to any programming references for developing VS Macros and/or AddIns?
No. I just googled and tested.
ASKER