Skip to content

Silk.NET.WebGPU can't load native library on linux-x64 #2465

Open
@ScottKane

Description

@ScottKane
    <ItemGroup>
      <PackageReference Include="Silk.NET.WebGPU" Version="2.22.0" />
      <PackageReference Include="Silk.NET.WebGPU.Native.WGPU" Version="2.22.0" />
      <PackageReference Include="Silk.NET.Windowing.Glfw" Version="2.22.0" />
      <PackageReference Include="SixLabors.ImageSharp" Version="3.1.10" />
    </ItemGroup>
Unhandled exception. System.IO.FileNotFoundException: Could not load from any of the possible library names! Please make sure that the library is installed and in the right place!
   at Silk.NET.WebGPU.WebGPU.CreateDefaultContext(String[] n)
   at Silk.NET.WebGPU.WebGPU.GetApi()

libglfw.so.3 and libwgpu_native.so are in the output under runtimes/linux-x64/native

If I manually copy those libraries to the root it works:

<Target Name="CopyNativeLibraries" AfterTargets="Build">
        <ItemGroup>
            <NativeLibs Include="@(RuntimeTargetsCopyLocalItems)" Condition="'%(RuntimeTargetsCopyLocalItems.AssetType)' == 'native'" />
        </ItemGroup>
        <Copy SourceFiles="@(NativeLibs)" DestinationFolder="$(OutputPath)" />
    </Target>

Why is Silk trying to load the native library from the root executable path instead of the relative runtimes directory it sets up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions