none
CSC : error CS2001: Source file 'C:\WINDOWS\TEMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs' could not be found RRS feed

  • Question

  • I am getting this error when I attempt to compile my solution:

    CSC : error CS2001: Source file 'C:\WINDOWS\TEMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs' could not be found

    That's for v4.0 projects, as the error implies.  v4.5 projects fail similarly:

    CSC : error CS2001: Source file 'C:\WINDOWS\TEMP\.NETFramework,Version=v4.5.AssemblyAttributes.cs' could not be found

    A look at the CoreCompile output shows that the command being run is:

    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1762,0612,1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva-  [/reference=...] [source files]  "C:\WINDOWS\TEMP\.NETFramework,Version=v4.0.AssemblyAttributes.cs"

    More Details:

    • It doesn't happen all the time - I can successfully build the solution plenty of times and then at a certain point (not sure when/why/how) it starts happening.
    • Once it starts happening, it never goes away, until...
    • Rebooting the machine fixes the issue... temporarily.  The problem eventually comes back.
    • Once it starts happening, it has nothing to do with the project/solution - all builds fail with the same error.
    • Once it starts happening, it happens in both Visual Studio and attempting to build from the command line w/ MSBuild directly.
    • I am running both VS2012 and VS2010 on the same machine, switching between .NET v4 and .NET v4.5 projects.
    • There are no zombie MSBuild.exe processes


    Wednesday, September 12, 2012 7:35 PM

Answers

  • Hi Jess,

    Do you still need help on this query? I hope this reply is not too late.

    The error CS2001 indicates it could not generate temporary class. This is because the building account lost permission to the temp folder: C:\Windows\Temp\.  My suggestion is:

    Grant all permission to your account, including read/write/full control.

    Hope this helps.


    Forrest Guo | MSDN Community Support | Feedback to manager

    • Marked as answer by Jess Chadwick Monday, September 17, 2012 2:37 PM
    Monday, September 17, 2012 2:54 AM
    Moderator

All replies

  • I'm looking into this query, will update soon.

    regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

    Monday, September 17, 2012 1:31 AM
    Moderator
  • Hi Jess,

    Do you still need help on this query? I hope this reply is not too late.

    The error CS2001 indicates it could not generate temporary class. This is because the building account lost permission to the temp folder: C:\Windows\Temp\.  My suggestion is:

    Grant all permission to your account, including read/write/full control.

    Hope this helps.


    Forrest Guo | MSDN Community Support | Feedback to manager

    • Marked as answer by Jess Chadwick Monday, September 17, 2012 2:37 PM
    Monday, September 17, 2012 2:54 AM
    Moderator
  • Thanks, Forrest - I'll try that tomorrow.

    But, why would this happen intermittently?

    Monday, September 17, 2012 4:46 AM
  • The folder is a shared folder, other process may overwrite the folder ACL while program runs.

    regards.


    Forrest Guo | MSDN Community Support | Feedback to manager

    Monday, September 17, 2012 11:26 AM
    Moderator
  • Yup, that did the trick!  

    Still confused as to why processes are changing permissions on this folder, though...

    Monday, September 17, 2012 2:38 PM
  • Thanks for the solution Forrest Guo...

    It worked for me too...

    Wednesday, October 17, 2012 2:37 AM
  • HI Forrest,

    Which account should be given permission to Team Folder ?

    Also, its on windows machine folder why would someone give permission to individual account on the Server folders ?

    Please explain bit more

    Thanks


    Anky

    Thursday, December 22, 2016 4:45 AM