locked
Namespace could not be found RRS feed

  • Question

  • Hi, 

    I am quite new to c# and Infer.Net and haven't had much luck getting the tutorials to run. I have created a new console application and have added the .ddl files under the downloaded Bin folder to my References folder in Visual Studio. I have added "using MicrosoftResearch.Infer;" however, when I attempt to declare a variable (e.g. Variable<bool>), I get a red underline and an error "The type of namespace name 'Variable' could not be found"

    I have been through the tutorials and am not sure what I am missing? Any help would be greatly appreciated. 

    Kind Regards,

    Stirling 

    Wednesday, August 16, 2017 11:07 PM

All replies

  • If the red underline is coming from Visual Studio, you can put the cursor on the line and press Ctrl+. (or click the light bulb) to automatically add the appropriate "using" statement.  The one you want is 

    using MicrosoftResearch.Infer.Models;

    Thursday, August 17, 2017 6:51 AM
    Owner
  • In Visual Studio (2017 at least) it is very easy to install Infer.NET in your project. Install it from IDE using NuGet package manager and you're good to go. Very handy. No need to go and add those references manually.

    Also, I would suggest you doing C# refresh before and then diving into Infer.NET. For a new user like me some time ago, sometimes it is difficult to see where is C# code and where is Infer.NET specifics. For Infer.NET, I strongly suggest to go through the Infer.NET 101 document. It is loaded with information and will answer many questions you might have in the beginning.

    Thursday, August 17, 2017 4:31 PM