Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-21-2012, 09:00 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Creating Custom Actions for VBP 8

In previous version I have a custom action that I pass a list of labels to and a custom VB dialag box appears that displays that list in a drop down, once selected it updates a macro in the calling script and continues. This works fine in Version 7, I just installed Version 8 on a new workstation and I want to upgrade that action to work with the newer version of Visual Build. Now that I got the background out, I will get to my questions:

First I want to write my action using VS2010 and Framwork 4.0 is this supported?

Second, since I have to refrence VisBuildSvr, I want to create two action one to support 32 bit and one for 64 bit. Do I need to create two seperate solutions one for each since some build machines are 32 bit only. Would I need the appropreate version of VBP installed in order to build each type?

Any suggestions would be great!
Reply With Quote
  #2  
Old 03-21-2012, 12:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
My testing suggests you need to target .NET 2.0 (will have to investigate further to see if it's possible to support 4.0).

If you use Any CPU for the platform, the compiled .NET action can be registered and used in 32- or 64-bit Visual Build, but I suspect that actions with a user interface will not work properly in the 64-bit edition.
Reply With Quote
  #3  
Old 03-21-2012, 12:41 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Thanks, I will give it a try an let you know
Reply With Quote
  #4  
Old 04-04-2012, 12:51 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I am working on creating a new version, when attempting to run a BLD file that registers the DLL I get the following error from within VB8

4/4/2012 1:51:20 PM: Building project step 2 - Register DLL...
RegAsm : error RA0000 : An error occurred while writing the registration information to the registry. Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks.

Process completed with exit code 100
4/4/2012 1:51:20 PM: Step '2 - Register DLL' failed
4/4/2012 1:51:20 PM: Build ended (elapsed = 00:00:00).
Reply With Quote
  #5  
Old 04-04-2012, 12:56 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I fogot to add the acutal command line thats run, it appears to defualt to the highest framword version installed on the box. The assembly is trageting the 2.0 framwork

C:\Windows\Microsoft.NET\Framework\v4.0.30319\rega sm.exe C:\TFS\SCM\Dev\ACE.VisualBuild.Solution-DEV1\ACE.VisualBuild.SelectVersion\bin\Release\ACE .VisualBuild.SelectVersion.dll /nologo /s /codebase
Reply With Quote
  #6  
Old 04-04-2012, 01:03 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
regasm does require elevated privileges to register a COM assembly.
http://kinook.com/Forum/showthread.php?t=2258

The COM Register action use the highest installed framework version that is found for locating regasm.exe. You can override the regasm.exe on the Register tab.
http://www.kinook.com/VisBuildPro/Ma...omregister.htm
Reply With Quote
  #7  
Old 04-04-2012, 02:30 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Great, thanks for the quick turn around!
Reply With Quote
  #8  
Old 04-05-2012, 12:24 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I found as I created a new action and compared the scripts with my previos version there appears to be a new property that I cant find information on. If I open up a build file I see the following property added to my custom action.

<buildfailsteps type='11'>0</buildfailsteps>

If I try to add exisitng actions to the same script the added actions also have this value added but the exisiting actions do not get modified when saving to have this new propery.

Can you tell me more about this and what the values represent?
Reply With Quote
  #9  
Old 04-05-2012, 12:56 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
That property determines whether failure steps are built if an occurs when building that step (corresponds with the 'Build failure steps' option on the More tab of the step properties dialog).

You may need to re-download and install the latest build -- there was a bug in the initial release that caused checking, then unchecking of this option to not get persisted properly in the .bld file.
Reply With Quote
  #10  
Old 04-05-2012, 01:40 PM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
I just downloaded the latest build and I still see that behavoir, it only adds it to new items added to the script but the exisitng actions do not get updated. I am viewing the BLD file in Notepad++, just so you know were I am seeing this change from.

Is there any details about this setting? What properties in the GUI affect this value, I tried changing some values in the GUI and it it disappears if I try and change anything from the default.


Visual Build Professional 8.0
Windows Version: 6.1.7601.1.0
Install path: C:\Program Files (x86)\VisBuildPro8
HideConsole.exe version 1.0.0.0
SftPrintPreview_IX86_U_20.dll version 2.04
VisBuildCmd.exe version 8.0.0.2
VisBuildPro.exe version 8.0.0.2
VisBuildAct.dll version 8.0.0.3
VisBuildCore.dll version 8.0.0.3
VisBuildDotNET.dll version 8.0.0.1
VisBuildExt.dll version 8.0.0.3
VisBuildMisc.dll version 8.0.0.3
VisBuildMS.dll version 8.0.0.3
VisBuildMS2.dll version 8.0.0.2
VisBuildNet.dll version 8.0.0.3
VisBuildSvr.dll version 8.0.0.4
VisBuildSvr.Interop.dll version 1.0.0.0
VisBuildVCS.dll version 8.0.0.3
Reply With Quote
  #11  
Old 04-05-2012, 01:44 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
That property will only be stored in the .bld file if unchecked (false). When a property is set to its default value, it is not stored in the .bld file to save space.
Reply With Quote
  #12  
Old 04-06-2012, 08:22 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
So if the default value for this is to be checked when I add an action to my scripts I should expect this value to be checked when I check the "More" tab.

What I am seeing is when I add a new action, this value is NOT checked when created, like the default value would be off.

I hope I explained that correctly.
Reply With Quote
  #13  
Old 04-06-2012, 09:35 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
In v8, the default for that property is unchecked. You can copy, paste, and rebuild this step in a project to set the property to true/checked for all steps:

Code:
<step action='Run Script'>
	<Language>VBScript</Language>
	<Script><![CDATA[' process all steps in project
For i = 0 To vbldStepSubroutine
	' iterate over all steps in the collection
	For Each s In Project.Steps(i)
		' set to build failure steps on failure
		s.Property("buildfailsteps") = True
	Next
Next]]></Script>
	<name>Set failure option</name>
</step>
Reply With Quote
  #14  
Old 04-06-2012, 10:24 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Ok thanks for the script, I am still a little confused. This is just so I can understand the way it stores data.

If the default value for this is to be unchecked, than based off what you said I shouldnt see a value stored in the BLD file, viewing it in a text editor, because this is the default value.

What I am seeing is that if its set to the default of uncheck it stores this value in the BLD file and if its checked which is opposited the default the tag is not stored.
Reply With Quote
  #15  
Old 04-06-2012, 10:50 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Legacy code is the short explanation. The long explanation: Because the default value for this property used to be true, that is still the "default" as used to determine whether to store the value in the .bld file. When inserting a new step, the step's buildfailstep property is explicitly set to false (the new "real" default), and this value gets stored in the .bld file since it is not the "default" as described above. If the step is checked, it has the old "default" value which does not get stored in the file.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:16 AM.


Copyright © 1999-2023 Kinook Software, Inc.