fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Xide Plugin - AssemblyInfo manipulator (BuildCount)

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 3 weeks ago #1

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi all,

maybe someone is interested in a plugin for Xide.
It manipulates AssemblyInfo.prg.

First part is change VersionAttibutes.
It increments the build number (third part of version) in all VersionAttibutes after every compile.
When I deploy my apps I always set the build number to divisible by 10 (zero at end, I call it release build no). So via menu item one can set the build number back to previous release build no or up to next release build no (due to fact that a new comile has to be done the number is set to 9 at the end). At export the current version is added to filename. Also the minor version (seconds part of version) can be incremented via menu.

Seconds part of the plugin is setting/changing the other AssemblyAttributes.
Backgound: I sell standard software to resellers. Some of the reseller have there own product name. So via menu item it is possible to change easily the attributes. I hope the sample is self explaining.

Attached a zip with the plugin (copy to PlugIns folder in XIDE folder) and a sample AssemblyInfo.prg

Any suggestions are wellcome.

Regards,
Stefan
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by SHirsch. Reason: wrong picture

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 3 weeks ago #2

Hi Stefan,
got it, works ;-)
Enhancement requests:
* increment only, if there was any change between compiles (useful)
* showing version info e.g. in XIDE's shell caption (sugar candy ;))

Thx
Karl

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 3 weeks ago #3

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi Karl,

thanks for testing.

Karl Faller wrote: * increment only, if there was any change between compiles (useful)

Is already on my list.

Karl Faller wrote: * showing version info e.g. in XIDE's shell caption (sugar candy ;))

This may interfere with internal caption setting of Xide. But I will look into this.

Regards,
Stefan

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 2 days ago #4

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi all,

I have a new version of XIDE_BuildCount ready:
- The version from AssemblyInfo.prg of current app/lib will be inserted in caption.
- If a native recource file AssemblyInfo.rc is available the VERSIONINFO will be changed like in AssemblyInfo.prg.
- Version will be change only if files have changed after last compile.
- In AssemblyInfo.prg one can add defines and resources for each reseller. These values are inserted in AssemblyInfo.rc when reseller is changed.

A sample of AssemblyInfo.prg and AssemblyInfo.rc is included in zip file (hopefully self explaining).

Regards,
Stefan
Attachments:

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 2 days ago #5

Hi Stefan,
got it, copied over old dll.
Added a new AssemblyInfo.prg to a sample prog, containing only:
#using System.Reflection
#using System.Runtime.InteropServices

/*[assembly: AssemblyTitleAttribute( "BuildCount" )]
[assembly: AssemblyDescriptionAttribute( "BuildCount PlugIn für XIDE" )]
[assembly: AssemblyConfigurationAttribute( "" )]
[assembly: AssemblyCompanyAttribute( "Kölndata Software GmbH" )]
[assembly: AssemblyProductAttribute( "BuildCount" )]
[assembly: AssemblyCopyrightAttribute( "Copyright © Kölndata Software GmbH 2018" )]
[assembly: AssemblyTrademarkAttribute( "" )]
[assembly: AssemblyCultureAttribute( "" )]

[assembly: AssemblyVersionAttribute( "1.2.279.0" )]
[assembly: AssemblyFileVersionAttribute( "1.2.279.0" )]
[assembly: AssemblyInformationalVersionAttribute( "1.2.279.0" )]

*/
[assembly: AssemblyTitleAttribute( "Test für neue Version" )]              
[assembly: AssemblyVersionAttribute( "0.1.4.0" )]
[assembly: AssemblyFileVersionAttribute( "0.1.4.0" )]        
[assembly: AssemblyInformationalVersionAttribute( "0.1.4.0" )]

The not commented attributes get incremented as they should (i added one attribute after the other to provoke "change" ;)-
But one strange thing: the commented lines with "1.2.279" increment as well - and this info is the one shown in Xides' caption...
Attachments:

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #6

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi Karl,

quick and dirty. :)I do not parse complete content. I just search for [assembly: AssemblyVersion. With incrementing the same. Just check if line starts with searched value. So if you comment each line ('//') then it should work as expected.

Regards,
Stefan

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #7

Hi Stefan,
sorry, no.
First tried with all lines "//" - no change.
Renamed file and set it to "Text", made a new AssemblyInfo.prg:
// Application : arraybase
// AssemblyInfo.prg , Created : 17.04.2018 16:34
// User : Karl2

#using System.Reflection
#using System.Runtime.InteropServices


[assembly: AssemblyTitleAttribute( "Test für neue Version" )]
[assembly: AssemblyVersionAttribute( "0.1.5.0" )]
[assembly: AssemblyFileVersionAttribute( "0.1.5.0" )]
[assembly: AssemblyInformationalVersionAttribute( "0.1.5.0" )]


//%LASTCOMPILE%17.04.2018 18:24:18Start1.prg

Increments, but Xide-Caption still increments to 1.2.281.0
Delete the old version of the file, now i see the 0.1.5.0 in the caption - but no more increment ;(

Karl

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #8

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi Karl,

Comments with '//' should work now. '/*' still does not work.
Caption should also update from correct file.

Thank you for testing and feedback

Regards,
Stefan
Attachments:

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #9

Good morning, Stefan!
Got it, overwrote old files.
Made a new project, new app, new assemblyinfo.prg,
// Application : Application1
// AssemblyInfo.prg , Created : 18.04.2018   09:22
// User : Karl2
#using System.Reflection
#using System.Runtime.InteropServices
[assembly: AssemblyTitleAttribute( "Test für neue Version" )]              
[assembly: AssemblyVersionAttribute( "0.0.0.0" )]
[assembly: AssemblyFileVersionAttribute( "0.0.0.0" )]
[assembly: AssemblyInformationalVersionAttribute( "0.0.0.0" )]
//%LASTCOMPILE%17.04.2018 18:24:18Start1.prg

caption shows correct data - but somehow increment won't work now...
Plus: switching back to prior project, Xide throws this error:

@Chris: BTW, could you make this dialog sizable? Scrolls are a PITA ;)- and/or Errormessage copyable would be nice...

Regards
Karl
Attachments:

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #10

  • SHirsch
  • SHirsch's Avatar Topic Author
  • Offline
  • Posts: 84
Hi Karl,

next try.
At the end of your last line 'Start1.prg' caused the problem.
Exception is now caught inside plugin.

Regards,
Stefan
Attachments:

Please Log in or Create an account to join the conversation.

Xide Plugin - AssemblyInfo manipulator (BuildCount) 11 months 1 day ago #11

No more crash <g>, works.
One (last) niggle: after a F9, the caption removes the version info and refreshs only after a focus switch, either between code-tabs or into project line.

Thx for improving
Karl

Please Log in or Create an account to join the conversation.

  • Page:
  • 1