title: using functions and classes in another vb.net project
body: <p>I'm refactoring my VB project into 2 projects, one being a utility library that I want to share with future projects.  My solution's layout is like this:</p>
  
  <pre><code>Solution
  |_ util
     |_ util.vb
  |_ main project
     |_ (main project files)
  </code></pre>
  
  <p>util is created as a class library, and the member files added into it.  I've then added util into the main project's references.  However, when I try to call functions in util.vb from my main project files, I get build errors like this: </p>
  
  <pre><code>error BC30451: Name 'LogException' is not declared.
  error BC30002: Type 'VarFile' is not defined.
  </code></pre>
  
  <p>These are defined in util.vb, and it compiled fine when it was part of the main project.  The declarations look like this: (I've trimmed out the details)</p>
  
  <pre><code>Imports System.IO
  
  Public Module utils
  
      Public Sub LogException(ByRef ex As Exception, Optional ByVal logFile As String = "", Optional ByVal logFolder As String = "")
  ' ...
      End Sub    
  
      Public Class VarFile
            ' ...
       End Class
  End Module
  </code></pre>
  
  <p>I can add util.vb "as link" into the main project and it will solve all the build errors, but that seems to defeat the purpose of refactoring out the class library - I would like to develop this library separately, and not always have to keep track of which file links I haven't added in my main project.  Is there a better way than this?</p>