OT: Question on Assemblies

Started by stanl, July 30, 2014, 09:37:38 AM

Previous topic - Next topic

stanl

I'm posting here rather than the COM section as it relates to a post Tony just made on a screen scraping thread. The code
Code (WINBATCH) Select

ObjectClrOption("use","UIAutomationClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")


specifically the Version. If you have .NET 4+ installed (which I assume means 3+ works) is there any benefit to using that version. Or, might that assembly be specific to 3+ so Version=2.0.0.0, would fail.

There have been posts to check for the version of .NET installed, and I have used that check in several scripts where the default is Version=4.0.0.0 but it changes to 3.0.0.0 if 4 not installed. Be nice if you could reference the assembly and get the highest version available.  [nit-picky]

Deana

Quote from: stanl on July 30, 2014, 09:37:38 AM
I'm posting here rather than the COM section as it relates to a post Tony just made on a screen scraping thread. The code
Code (WINBATCH) Select

ObjectClrOption("use","UIAutomationClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")


specifically the Version. If you have .NET 4+ installed (which I assume means 3+ works) is there any benefit to using that version. Or, might that assembly be specific to 3+ so Version=2.0.0.0, would fail.

There have been posts to check for the version of .NET installed, and I have used that check in several scripts where the default is Version=4.0.0.0 but it changes to 3.0.0.0 if 4 not installed. Be nice if you could reference the assembly and get the highest version available.  [nit-picky]

You probably should to use the lowest numbered version of assembly, so that it is supported on more systems. That is unless you need functionality that only became available in a certain newer version of the assembly.
Deana F.
Technical Support
Wilson WindowWare Inc.

td

FCL assemblies are not necessarily backwards or forward compatible so a script hosting the CLR should only use the assembly versions that it has been tested with.  In other words, WinBatch cannot dynamically pick assemblies for you.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade