Home Forums Software Development Problem building C# WPF

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20472
    Gishan
    Participant

    I’m in the same boat and the solution Roman posted doesn’t work for me.

    What I have tried so far

    • Downloaded the InteractionLib SDK Win64 dynamic 1.0.2.1
    • Created a new C# WPF App project (.NET 4.7.2, Visual Studio Community 2019)
    • Changed Build property “Plattform Target” to x64 (from AnyCPU)
    • Changed Build Configuration to x64 (from AnyCPU)
    • Added the whole “lib” folder to the project (with its original structure lib/x64/)
    • Added both dlls to References (tobii_interaction_lib_cs.dll, tobii_interaction_lib_wpf.dll)
    • Took over the code from the sample – code not the whole files of course (App.xaml.cs, MainWindow.xaml, MainWindow.xaml.cs

    At this point the project should work in my opinion. But instead this is where to fun starts…

    Exception in App.xaml.cs OnStartup
    System.DllNotFoundException: ‘Die DLL “tobii_interaction_lib_c”: Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.’

    This is where I scoured the web and found Romans post.
    Since these options can’t be changed in Visual Studios UI I had to open them with Notepad++.
    I compared my csproj file with the included sample and copied over the difference Roman pointed out.

    After this I reloaded the project and tried to build.

    Only to be greeted by a build error…
    Could not copy the file “lib/x64/tobii_stream_engine.dl” because it was not found.
    Could not copy the file “lib/x64/tobii_interaction_lib.dl” because it was not found.
    Could not copy the file “lib/x64/tobii_interaction_lib_c.dl” because it was not found.
    Remark: The actual path is relative and has 3 dots (just can’t post it here for some reason)

    Now I compared the folder structure of my and the sample project.
    Since the sample project doesn’t have a folder “lib” inside I drew the conclusion that VS is looking for these dlls outside of my project. So the relative paths are getting resolved from the root project folder and not from bin/x64/Debug as I imagined.
    I then copied the lib folder once again 3 folders above my project.

    And we are back to the Exception in App.xaml.cs OnStartup
    System.DllNotFoundException: ‘Die DLL “tobii_interaction_lib_c”: Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.

    So now what? Can anyone help me getting an empty WPF project to work?

    I have to say that until now trying to build a project for my Tobii 5 is a nightmare!
    Dozens of dead links, confusing documentation and now this. I already regret my buying decision and have not even begun development.

    #20501
    Grant [Tobii]
    Keymaster

    Hi @gishan, sorry to hear about your troubles in getting setup on a WPF project from scratch.

    You are very close! The only remaining step is to copy across manually the remaining DLL (tobii_stream_engine.dll, tobii_interaction_lib.dll, tobii_interaction_lib_c.dll) from the interaction library ‘lib’ folder to your project debug output folder (bin\x64\Debug)

    Please try it out and let us know how you get on. Best Wishes.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.