View Single Post
  #10  
Old 04-02-2008, 09:11 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,012
Assuming you're using VB.NET,

1) Open Windows Explorer and navigate to C:\Program Files\VisBuildPro6\Samples\User Actions
2) Copy and paste the VBNETAction folder
3) Rename 'Copy of VBNETAction' to 'MyNewAction'
4) In the MyNewAction folder, rename VBNetAction.vbproj to MyNewAction.vbproj
5) Select all files in the folder, right-click -> Properties, uncheck Read-only and click OK
6) Delete the bin subfolder
7) Open MyNewAction.vbproj in Visual Studio 2003 or later
8) In Project | Properties -> Application, change Assembly name and Root namespace to MyTestAction
8) From the Solution Explorer, Open test.vb and replace VBNETAction.Test with MyTestAction.Test and "VB.NET custom action" with "my test action"
9) Build the solution
10) Open Visual Build, create a new project, and save in the MyNewAction folder
11) Insert a COM Register action, enter a Filename of %PROJDIR%\bin\MyTestAction.dll, check the .NET assembly and Create a codebase entry fields, and OK
12) Right-click in the Actions pane, and choose Insert Action
13) In the Action Properties dialog, enter a Name of MyTestAction on the General tab, add a new tab/property named Msg on the GUI tab, and Action type of COM Component and ProgId of MyTestAction.Test on the Component tab, and OK the dialog
14) In the Actions pane, double-click on the MyTestAction action to insert a new action of that type, and on the 2nd tab of the Step Properties dialog, enter some text, and OK the dialog
15) Building the project should result in build output of "Hello from my test action in project <whatever text you entered in the action GUI>"
Reply With Quote