Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual C++ 2010 Fatal Error C1083; Permission Denied

For a class at the university, the professor has provided us with some skeleton code that we are to modify. When I attempt to compile the code in Visual C++ 2010 Express (x86), I receive the following error:

C:\Users\[username]\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp : fatal error C1083: Cannot open compiler generated file: 'Release\.NETFramework,Version=v4.0.AssemblyAttributes.obj': Permission denied

The account I am logged into has full read-write-modify permissions for the file in question, and I am using Windows 7 (x64). To make matters more confusing, the project compiles in Debug mode, but not in Release mode, which the professor instructed us to use.

Thank you in advance for any help.

like image 915
Aliden Avatar asked Jan 23 '14 19:01

Aliden


2 Answers

So it turns out that the solution to this was simply to delete the .suo file in the project folder and rebuild the project. Why that worked, I don't know, but it seemed to do so.

like image 121
Aliden Avatar answered Sep 18 '22 12:09

Aliden


This may not be a permission issue at all but may be a file lock issue. I believe this can happen, if you are:

  1. Building the entire solution
  2. Building in parallel
  3. Not properly defining project dependencies

What happens is one project is writing to the object while another project is attempting to read that object and cannot because the write lock prevents it.

Please correct me if I am wrong.

like image 27
GrumpiestCat Avatar answered Sep 16 '22 12:09

GrumpiestCat