Run the .NET sample applications

Once code sample files are copied, do the following to compile and run the .NET sample applications.

Running the .NET sample application requires the Microsoft .NET 5.0 or .NET 6.0 SDK installed. Refer to the MSDN website for details.

  1. Run the following command to set the LD_LIBRARY_PATH environment variable:
    export LD_LIBRARY_PATH=/usr/local/lib/omnipage-csdk-lib64-22.0
  2. Change to the working directory.
    cd ~/sample/csharp
  3. If you have .NET 6.0 SDK installed, edit the Samples.csproj file and update the TargetFramework version as follows:
    <TargetFramework>net6.0</TargetFramework>
  4. Compile the application.
    dotnet build -c Release /p:Platform=x64
  5. Run the required samples. To run all the samples, use this command:
    ./bin/x64/Release/Samples -all -input ~/sample/input