title: Compilation error CS0016: Could not write to output file
body: <p><strong>In Brief</strong></p>
  
  <p>When I attempt to browse my website, I get the following error message:</p>
  
  <blockquote>
    <p>CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\www\xxx\yyy\zzz\a.b.dll' - 'The directory name is invalid'</p>
  </blockquote>
  
  <p><strong>In Detail</strong></p>
  
  <p>I have two web-sites on my Development PC (fictitious names):</p>
  
  <ul>
  <li><strong>Web2</strong> - this is written in ASP.NET using .NET 3.5 and runs in an AppPool that addresses the v2.0 .NET framework and runs in an Integrated mode.  This is developed using Visual Studio 2010</li>
  <li><strong>Web4</strong> - this is written in ASP.NET using .NET 4.5 and runs in an AppPool that addresses the v4.0 .NET framework and runs in an Integrated mode.  This is developed using Visual Studio 2012.</li>
  </ul>
  
  <p>Recently, I've been working in VS2012 on Web4 almost constantly and it works fine, however the other day I tried to run Web2 and got the exception displayed above.</p>
  
  <p>Bizarrely, part of the path (which I replaced above with letters "zzz") appear to point to a German language path, since it's "\de-DE\" - I'm not operating in German, so I've no idea where it got this idea from.</p>
  
  <p>One thing that is almost certainly un-related, but for some unknown reason I feel it's important to mention: I was using the Performance Analysis tool in Visual Studio 2012 the day before this problem first appeared and I don't know if this might have made some changes to my computer...??</p>
  
  <p><em>Attempted fixes</em></p>
  
  <p>There are quite a few threads regarding this on the internet; some threads end in success where file access permissions have been altered whilst others finish on a somewhat desperate sounding note...  I have gone through the process of comparing the NTFS permissions on all relevant sounding directories on my PC with that of a colleagues on whose machine this is still working.  Unfortunately, no joy to be had there.</p>
  
  <p>I have also un-installed asp.net 2.0 and re-installed it using:</p>
  
  <pre><code>C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -u
  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -ir
  </code></pre>
  
  <p>and again, no joy to be had there either.</p>
  
  <p>My Web4 continues to run unaffected.</p>
  
  <p>Also FYI: using IIS 7.5 on Win7 x64.</p>
  
  <p>I'm now turning to the this wider audience in the hope of turning my current state of despair into one of success.</p>
  
  <p>Thanks everyone</p>
  
  <p>Griff</p>