Home Forums Software Development The type or namespace name 'Tobii' could not be found

Tagged: ,

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
  • #9161

    Hi all,

    I’m new to Tobii and I’d like to use the Core SDK for c#. Now I tried to follow the getting started guide – using VS Code. I did install Tobii.Interaction and my csproj file contains
    <PackageReference Include="Tobii.Interaction" Version="0.7.3" />
    However, having the standard Hello World Program.cs with only adding

    using Tobii.Interaction;

    I get a the error:
    Program.cs(2,7): error CS0246: The type or namespace name 'Tobii' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\...]

    Any suggestions on what I’m doing wrong here?

    Grant [Tobii]

    Hi @nurderfsv, sorry to hear about your difficulties. Have you tried ensuring via Nuget that the Tobii Interaction Libraries are installed? This needs to be done for each new project for the Core SDK DLL’s to be correctly loaded.

    It may also be helpful for you to check out the ready to run sample applications for the Core SDK which you can download @ https://github.com/Tobii/CoreSDK

    Please let us know how you get on and if we can be of any further assistance.


    Hi, thanks for the hint, how do I do that?

    The samples don’t work either… Is there a specific .NET SDK Version that I need?

    Thank you,

    Grant [Tobii]

    Hi @nurderfsv, you will need to be using Visual Studio minimum version 2015.

    So, to begin, first download the sample applications at the link above, then once loaded into Visual Studio, goto Project -> Manage Nuget Packages, then search for “Tobii Interaction”. Install, and then the samples should run as expected.

    Let us know if you hit any further problems.


    I want to add some info to the instructions Grant has given you, but beforehand, I apologise if my english it’s somewhat broken (It’s not my mother tongue)

    You must install Visual Studio to get this working, of course, but it’s very important that you also have two workloads installed with it:

    1. The .NET desktop development workload
    2. The Universal Windows Platform workload

    In order to explain it simply, these are “configurations and presets” packages that are going to enable some functionalities you will need in order to have propperly working the Tobii Core SDK. If you don’t install the first one, the NuGet package manager will not import the Tobii libraries in your project/solution, ergo, you won’t be able to use the SDK. Also, VS won’t display the C# Console App (Located on the “desktop windows” submenu) project preset that you are trying to create.

    If you don’t install the second Workload, the NuGet Package Manager will not appear at all in VS.

    I had spent almost 20 hours on figuring this out on Visual Studio 2017. I hope my recomendation can help you a little more 🙂

    P.S.: There’s a video about how to install the Workflows. I will leave it right here…

    Grant [Tobii]

    Hi @akulafoulke, awesome! Thanks so much for your useful additional information.. much appreciated 🙂

    , It would be great if you could kindly let us know how you got on since last communication.. can we consider this thread as solved?

    Vesti Bidya

    What worked for me was switching from VS2019 to VS2017

    Grant [Tobii]

    Thanks for the additional feedback @vestigialdev! Although the setup works fine on my VS2019 environment. Never the less, I will report your findings.

    Benjamin Kuß

    Hi everybody.
    I am having exactly the same problem as Yannick. Using VS 2019 Community.
    I installed both the “.NET desktop development” and the “universal windows platform” workload.
    Following the getting started guide at https://developer.tobii.com/consumer-eye-trackers/core-sdk/getting-started/.
    Added Tobii.Interaction via NuGet Package manager.
    Program cannot be compiled with error “The type or namespace name ‘Tobii’ could not be found”.
    Any ideas what I could do?

    Benjamin Kuß

    The guide states the following:
    Browse for the Tobii.Interaction package and click install. The project shall now be referencing Tobii.Interaction.Model.dll and Tobii.Interaction.Net.dll. Also, notice that project.json has been added/updated in the project folder.

    When I add Tobii.Interaction via NuGet package manager I can only see a reference to Tobii.EyeX.Client.dll

    Benjamin Kuß

    Ok, I found out that it works when create a .NET application.
    With .NET Core it does not seem to work.

    Grant [Tobii]

    Hi @bkuss, sorry to hear about your issues. Could you kindly confirm if that is indeed related just to VS2019 and if it works with 2017? Of course, we will try to get you up and running on 2019, but it would be useful to know this information for the investigation.

    I also assume you tried to follow the advise of the user above demonstrating the workflow that worked for them?

    Thanks for your patience whilst we try to resolve the situation.

    Benjamin Kuß

    Hi Grant,

    thank you for your support. Unfortunately I do not have access to VS 2017.

    As I said, it works as expected when I use the .NET console application template. When I use the .NET core console application template I get the behavior described above.
    Maybe this is expected behavior? Is the usage of the library generally not supported in .NET core applications?

    Grant [Tobii]

    Hi @bkuss, thanks for your patience whilst I tried to reproduce the issue. I think perhaps this may be an issue with Core SDK now being 3 years old and that a recent update to VS2019 .Net Core libraries has caused now an incompatibility throwing this namespace error.

    Unfortunately, the Core SDK is no longer maintained and we have diverted resources into its replacement the Tobii Interaction Engine which you can check out @ https://developer.tobii.com/consumer-eye-trackers-interaction-library-getting-started/

    We also have the Tobii Stream Engine API which offers a reduced footprint low-level access to eye-tracking data available @ https://developer.tobii.com/consumer-eye-trackers/stream-engine/getting-started/

    You had not mentioned if you were developing from scratch or porting an existing project. Hopefully it is the former, in which case we would advise that you migrate to our newer and maintained SDK platforms.

    If you would care to describe in more detail your circumstance, I would be happy to try and suggest the most appropriate course of action. Thanks for your understanding.

    Benjamin Kuß

    Hi Grant,

    thanks for the info.
    Since we will be developing a new project from scratch, we will take a look at the interaction engine.

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