The Fluid.OpenVINO.GenAI NuGet package includes both managed assemblies and native OpenVINO libraries. This guide helps troubleshoot common issues with the package.
When installed, the package contains:
- Managed Assembly:
lib/net8.0/OpenVINO.NET.GenAI.dll - Native Libraries:
runtimes/[win-x64|linux-x64]/native/*.dllor*.so - MSBuild Targets:
build/Fluid.OpenVINO.GenAI.targets
Symptoms:
- Build warnings about missing OpenVINO GenAI native libraries
- Runtime errors when trying to use LLMPipeline or WhisperPipeline
DllNotFoundExceptionor similar errors
Solutions:
-
Verify Package Installation
dotnet list package
Ensure
Fluid.OpenVINO.GenAIis listed with the correct version. -
Check NuGet Cache The package should be in:
- Windows:
%USERPROFILE%\.nuget\packages\fluid.openvino.genai\[version]\ - Linux:
~/.nuget/packages/fluid.openvino.genai/[version]/
- Windows:
-
Verify Native Libraries Exist Check for native libraries in the package:
# Windows dir "%USERPROFILE%\.nuget\packages\fluid.openvino.genai\2025.3.0-dev20250801\runtimes\win-x64\native" # Linux ls ~/.nuget/packages/fluid.openvino.genai/2025.3.0-dev20250801/runtimes/linux-x64/native
-
Force Package Reinstallation
dotnet nuget locals all --clear dotnet restore --force
Symptoms:
- Build succeeds but native DLLs are not in the output directory
- Application fails at runtime with missing DLL errors
Solutions:
-
Check MSBuild Targets Execution Build with diagnostic verbosity:
dotnet build -v d | Select-String "OpenVINO"
-
Set Environment Variable If automatic discovery fails, set the
OPENVINO_RUNTIME_PATH:# Windows $env:OPENVINO_RUNTIME_PATH = "C:\path\to\openvino\runtime" # Linux export OPENVINO_RUNTIME_PATH="/path/to/openvino/runtime"
-
Manual Copy as Workaround Add to your
.csproj:<Target Name="CopyOpenVINOLibraries" AfterTargets="Build"> <Copy SourceFiles="$(NuGetPackageRoot)fluid.openvino.genai\2025.3.0-dev20250801\runtimes\win-x64\native\*.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" /> </Target>
Symptoms:
BadImageFormatExceptionerrors- "Wrong format" or architecture mismatch errors
Solutions:
-
Ensure x64 Platform Your project must target x64:
<PropertyGroup> <PlatformTarget>x64</PlatformTarget> <Platforms>x64</Platforms> </PropertyGroup>
-
Verify Runtime Identifier For self-contained deployments:
<RuntimeIdentifier>win-x64</RuntimeIdentifier> <!-- or --> <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
Symptoms:
- Libraries found but fail to load on Linux
- Missing dependency errors
Solutions:
-
Set LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH dotnet run
-
Check Dependencies
ldd libopenvino_genai_c.so
-
Install System Dependencies
# Ubuntu/Debian sudo apt-get install libtbb2 # RHEL/CentOS sudo yum install tbb
Create a simple test project to validate the package:
using System;
using System.IO;
using Fluid.OpenVINO.GenAI;
class Program
{
static void Main()
{
Console.WriteLine("Testing Fluid.OpenVINO.GenAI...");
// Test managed assembly
var config = GenerationConfig.Default;
Console.WriteLine($"✓ GenerationConfig created: MaxTokens={config.MaxTokens}");
// Check native libraries
var dlls = new[] { "openvino_genai_c.dll", "openvino_c.dll" };
foreach (var dll in dlls)
{
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, dll);
Console.WriteLine($"{dll}: {(File.Exists(path) ? "✓" : "✗")}");
}
}
}To verify what's included in the NuGet package:
# Extract and inspect package
Copy-Item "package.nupkg" -Destination "package.zip"
Expand-Archive -Path "package.zip" -DestinationPath "package_contents"
Get-ChildItem -Path "package_contents" -RecurseWhen everything is working correctly, you should see:
- No warnings during build
- Native libraries copied to output directory
- Message: "OpenVINO GenAI: Copied native libraries from ... to ..."
If issues persist:
- Check the GitHub Issues
- Enable MSBuild diagnostic logging:
dotnet build -v diag > build.log - Report issues with:
- .NET version (
dotnet --version) - Operating system and architecture
- Package version
- Build log excerpt
- .NET version (
OPENVINO_RUNTIME_PATH: Override automatic library discoveryCI: Set totrueto suppress warnings in CI/CD environmentsSuppressOpenVINOWarnings: Set totrueto disable all warnings