Hi Edwin,
I'd like to automatically call "regasm /unregister" for the
C# project when I clean the solution. Is this possible?
Since there is no After_CleanSoluiton event to trap in the VS.NET, I think
you can customize a macro command to automate this task:
First you need to add an external tools(Tools/External Tools...) to perform
the "regasm /unregister ...", please make sure you could use this external
tools command to unregister your target assembly and take note of what is
the No.# command in the external tools's list(e.g. it would be the No.9
command which used in the following sample code).
Then you could use the following IDE Macro to implement the customzied
command:
Sub CleanSolutionAndUnregasm()
DTE.ExecuteCommand("Build.CleanSolution")
DTE.ExecuteCommand("Tools.ExternalCommand9")
End Sub
By the way, you can also wrap the above macro inside an customized VS.NET
Addin command:
Adding and Handling Commands
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxconcontrollingcommands.asp
with the sample in that article, please insert the above two macro
ExecuteCommand codes just before the code "handled = True"(inside the Exec
Sub)
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.