title: Conflicting versions of same type
body: <p>I have the following <code>F#</code> script files:</p>
  
  <p><strong>common.fsx</strong></p>
  
  <pre><code>type CommonRecord = { Name : string }
  </code></pre>
  
  <p><strong>intMapper.fsx</strong></p>
  
  <pre><code>#load "common.fsx"
  open Common
  
  let toInt payload = payload.Name.Length
  </code></pre>
  
  <p><strong>stringMapper.fsx</strong></p>
  
  <pre><code>#load "common.fsx"
  open Common
  
  let toString payload = payload.Name
  </code></pre>
  
  <p><strong>caller.fsx</strong></p>
  
  <pre><code>#load "stringMapper.fsx"
  #load "intMapper.fsx"
  open Common
  
  let a = { Name = "Hello " }
  let str : string = StringMapper.toString a
  let i : int = IntMapper.toInt a
  </code></pre>
  
  <p>When I try to run caller.fsx in F# Interactive I get the following compiler error:</p>
  
  <pre><code>caller.fsx(8,42): error FS0001: This expression was expected to have type
  FSI_0037.Common.CommonRecord    
  but here has type
  FSI_0038.Common.CommonRecord 
  </code></pre>
  
  <p>I'm guessing this is because when I load each of stringMapper.fsx and intMapper.fsx I load distinct instances of common.fsx, which the compiler then gets confused by.</p>
  
  <p>Is there a recommended way to achieve what I am trying to do? i.e. Dependency tree in my script files that isn't "totally ordered"?</p>
  
  <p><strong>WORKAROUND</strong></p>
  
  <p>As mentioned by Chad - this can't be done.  The work around I used was to compile my common script as a dll:</p>
  
  <pre><code>fsc.exe --target:library Common.fsx
  </code></pre>
  
  <p>and then reference this in the scripts using <code>#r Common.dll</code>.</p>