Home › Forums › Software Development › The type or namespace name 'Tobii' could not be found
- This topic has 15 replies, 5 voices, and was last updated 4 years, 2 months ago by Grant [Tobii].
- AuthorPosts
- 19/12/2018 at 13:26 #9161YannickParticipant
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 addingusing 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?
19/12/2018 at 15:23 #9162Grant [Tobii]KeymasterHi @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.
19/12/2018 at 16:37 #9164YannickParticipantHi, 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,
Yannick20/12/2018 at 09:40 #9167Grant [Tobii]KeymasterHi @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.
22/12/2018 at 10:14 #9175CarrilloParticipantI 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:
- The .NET desktop development workload
- 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…
26/12/2018 at 10:22 #9179Grant [Tobii]KeymasterHi @akulafoulke, awesome! Thanks so much for your useful additional information.. much appreciated 🙂
@nurderfsv, 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?25/04/2019 at 02:37 #10897Vesti BidyaParticipantWhat worked for me was switching from VS2019 to VS2017
25/04/2019 at 14:07 #10899Grant [Tobii]KeymasterThanks for the additional feedback @vestigialdev! Although the setup works fine on my VS2019 environment. Never the less, I will report your findings.
02/06/2020 at 11:10 #18110Benjamin KußParticipantHi 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?02/06/2020 at 11:47 #18115Benjamin KußParticipantThe 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
02/06/2020 at 13:10 #18119Benjamin KußParticipantOk, I found out that it works when create a .NET application.
With .NET Core it does not seem to work.02/06/2020 at 15:26 #18121Grant [Tobii]KeymasterHi @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.
04/06/2020 at 08:41 #18134Benjamin KußParticipantHi 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?05/06/2020 at 16:46 #18143Grant [Tobii]KeymasterHi @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.
15/06/2020 at 08:57 #18190Benjamin KußParticipantHi Grant,
thanks for the info.
Since we will be developing a new project from scratch, we will take a look at the interaction engine. - AuthorPosts
- You must be logged in to reply to this topic.