You are here: Start » AVL.NET » Getting Started with Aurora Vision Library .NET

Getting Started with Aurora Vision Library .NET

Requirements

Aurora Vision Library is designed to be a part of applications working under control of the Microsoft Windows operating system. Supported versions are: 7, 8/8.1 and 10 as well as corresponding embedded editions. To build an application using Aurora Vision Library under Microsoft Windows, Microsoft Visual Studio environment is required. Supported versions are: 2015, 2017 and 2019.

SDK Installation

The installation process is required to copy the files to the proper folders, set necessary environment variables and facilitate license loading with License Manager tool, available in the Start Menu. It also helps creating Microsoft Visual Studio applications referencing AvlNet.dll assembly.

Directories

Aurora Vision Library .NET is distributed as a managed assemblies (*.dll), available in two versions: for 32-bit and 64-bit systems. Assemblies are located in following directories:

32-bit %AVL_PATH1_0%\bin\Win32\AvlNet.dll
%AVL_PATH1_0%\bin\Win32\AvlNet.TS.dll
%AVL_PATH1_0%\bin\Win32\AvlNet.Designers.dll
%AVL_PATH1_0%\bin\Win32\AvlNet.Amr.dll
64-bit %AVL_PATH1_0%\bin\x64\AvlNet.dll
%AVL_PATH1_0%\bin\x64\AvlNet.Ts.dll
%AVL_PATH1_0%\bin\x64\AvlNet.Designers.dll
%AVL_PATH1_0%\bin\x64\AvlNet.Amr.dll

where %AVL_PATH1_0% is an environment variable set during Aurora Vision Library installation.

Creating New AVL.NET Project With Project Template

Once the Aurora Vision Library is installed, a new Microsoft Visual Studio project template - AVL.NET Project - appears in the Microsoft Visual Studio New Project and Add New Item dialog boxes (Visual C# » AVL » AVL.NET Project). It is a recommended way of creating a new .NET project that will reference AvlNet.dll assembly since all required configurations are set automatically and the application is ready to be compiled targeting both x64 (64bit) and x86 (32bit) platforms.

Creating New AVL.NET Project Manually

It is most important thing when referencing AvlNet.dll assembly to choose appropriate library bitness. There are two versions of the AvlNet.dll assembly: one for x64 platform and one for x86 platform. Taking that, application must know which assembly to take in all of its configurations. Unfortunately Microsoft Visual Studio in its IDE does not provide conditional referencing of the assemblies and it must be defined manually in application configuration file (*.csproj), e.g. using Condition attribute of the Reference element:

    <Reference Include="Avl.Net" Condition="'$(PlatformName)'=='x64'">
      <HintPath>$(AVL_PATH1_0)\bin\x64\Avl.Net.dll</HintPath>
    </Reference>
	<Reference Include="Avl.Net.TS" Condition="'$(PlatformName)'=='x64'">
      <HintPath>$(AVL_PATH1_0)\bin\x64\Avl.Net.TS.dll</HintPath>
    </Reference>
	<Reference Include="Avl.Net.Designers" Condition="'$(PlatformName)'=='x64'">
      <HintPath>$(AVL_PATH1_0)\bin\x64\Avl.Net.Designers.dll</HintPath>
    </Reference>
    <Reference Include="Avl.Net.Amr" Condition="'$(PlatformName)'=='x64'">
      <HintPath>$(AVL_PATH1_0)\bin\x64\Avl.Net.Amr.dll</HintPath>
    </Reference>
	
    <Reference Include="Avl.Net" Condition="'$(PlatformName)'=='x86'">
      <HintPath>$(AVL_PATH1_0)\bin\Win32\Avl.Net.dll</HintPath>
    </Reference>
    <Reference Include="Avl.Net.TS" Condition="'$(PlatformName)'=='x86'">
      <HintPath>$(AVL_PATH1_0)\bin\Win32\Avl.Net.TS.dll</HintPath>
    </Reference>
    <Reference Include="Avl.Net.Designers" Condition="'$(PlatformName)'=='x86'">
      <HintPath>$(AVL_PATH1_0)\bin\Win32\Avl.Net.Designers.dll</HintPath>
    </Reference>
    <Reference Include="Avl.Net.Amr" Condition="'$(PlatformName)'=='x86'">
      <HintPath>$(AVL_PATH1_0)\bin\Win32\Avl.Net.Amr.dll</HintPath>
    </Reference>

To have the built application work properly, besides AvlNet.dll assembly there must be also native AVL.dll library present in the application directory. This can be achieved with PostBuildEvent which will copy appropriate version of the AVL.dll library:

    <PostBuildEvent Condition="'$(PlatformName)'=='x86'">
        xcopy /D /Y "$(AVL_PATH1_0)\bin\Win32\avl.dll" "$(TargetDir)"
    </PostBuildEvent>
    <PostBuildEvent Condition="'$(PlatformName)'=='x64'">
        xcopy /D /Y "$(AVL_PATH1_0)\bin\x64\avl.dll" "$(TargetDir)"
    </PostBuildEvent>
Next: Relation between AVL.NET and AVL/C++