• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 920
  • Last Modified:

.net error CS0016: could not write to output file

In .net 4 (C#, VS 2010), I'm getting this exception for a Winforms app (not ASP).

Unable to generate a temporary class (result=1).
error CS0016: Could not write to output file 'c:\Users\user\AppData\Local\Temp\vker251c.dll' -- 'Access is denied. '

I've checked the folder in question; EVERYONE has full access rights. Any ideas? Most of what I've seen on the subject concerns ASP and doesn't seem to apply to me.
0
BlearyEye
Asked:
BlearyEye
  • 4
1 Solution
 
BlearyEyeAuthor Commented:
I can try it, but it's also IIS-related and doesn't seem quite relevant to my winform problem.
0
 
AndyAinscowCommented:
>>Could not write to output file 'c:\Users\user\AppData\Local\Temp\vker251c.dll'

You are attempting to write to a dll - is that correct?  (If yes then is code in the dll in use by your app ?)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BlearyEyeAuthor Commented:
Andy: I don't know the answer to that question since the name of the dll doesn't mean anything to me. It seems to be an artifact of the compiler.
0
 
BlearyEyeAuthor Commented:
I switched my TMP and TEMP environment variables to another folder and things started working. I suppose the problem is one of permissions, though I can't see any problem with what they were originally.
0
 
BlearyEyeAuthor Commented:
My solution worked, though I don't really know why.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now