title: Type Is not defined - C# class to VB.NET
body: <p>I am sitting with a rather strange error - which I believe I followed the correct steps to solve.</p>
  
  <p>Basically, My compiler complains about the following:</p>
  
  <p><code>Type 'InteractionsEntities' is not defined</code></p>
  
  <p>Here is an explanation of all I have done. My goal is to use a class compiled in C# within my vb.net project.</p>
  
  <p><strong>Step 1</strong>: Right clicked my VB.NET project - Add > Reference</p>
  
  <p><strong>Step 2</strong>: Out of the project list, I selected my C# project containing the <code>InteractionsEntities</code> class and pressed Ok.</p>
  
  <p><strong>Step 3</strong>: I added the line of code in my vb.net module: <code>Imports CsharpProject.CsharpNamespace</code></p>
  
  <p><strong>Step 4</strong>: Within my module, I added a variable: <code>Private context = new InteractionsEntities</code> -- note on this point, Intellisense was able to find the class I required.</p>
  
  <p><strong>Step 5</strong>: To ensure my Project can use entity framework, I used the nuget package manager to install entity framework.</p>
  
  <p>So following the steps I listed above, I have the following code:</p>
  
  <pre><code>Imports CsharpProject.CsharpNamespace
  
  Module Module1
      Dim context = New InteractionsEntities()
      Sub Main(properties As String())
              Dim documents = context.Documents.Select(Function(x) x)
              For Each document In documents
                  Console.WriteLine(document.Name)
              Next
      End Sub
  </code></pre>
  
  <p>What is strange is that Intellisense was able to detect that InteractionsEntities existed in my C# namespace. Upon Installing the entityframework nuget package, the error would disappear - and I was able to access properties within the context variable. The moment I hit "rebuild all" - the error <code>Type 'InteractionsEntities' is not defined</code> returns. Hovering over the namespace (which also gets marked as erroneous now) and clicking the <code>Error Corrections Options</code> yields no Correction Suggestions.</p>
  
  <p>Have I missed a step inbetween? Why is my VB.NET project complaining that the class does not exist when it does? I have tested with other classes under the c# namespace too (which has nothing to do with the entity framework) and the same effect occurs.</p>