Visual C ++ 2010 Fatal Error C1083; Access is denied

For the class at the university, the professor provided us with some skeletal code, which we need to change. When I try to compile code in Visual C ++ 2010 Express (x86), I get 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 registered with has full read and write permissions for this file, and I use Windows 7 (x64). To make the situation more confusing, the project is compiled in debug mode, but not in the release mode that the professor instructed us to use.

Thanks in advance for any help.

+7
c ++ visual-c ++ - 2010
source share
7 answers

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

+6
source share

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

  • Creating the whole solution
  • Construction in parallel
  • Incorrect definition of project dependencies

What happens when one project writes an object and another project tries to read this object and cannot, because write lock prevents it.

Please correct me if I am wrong.

+2
source share

I never had this specific error, but as a general rule, I found that Visual Studio has a lot of security issues. I cannot register COM assemblies in my version, for example ... For this reason, I always start Visual Studio as an administrator (it is not enough to have an administrator account, you want the shortcut to start as an administrator). This solves my problem with COM and others that I have encountered over the years. A long shot, but I hope this helps.

0
source share

Visual Studio is a little torn when it comes to generated file permissions in Windows 7 and Vista.

  • First, try starting Visual Studio Express as an administrator by right-clicking on its shortcut and selecting the yellow-blue screen option.

  • If this does not help, completely disable user access control (you should be able to do this with an administrator account).

0
source share

I have a solution with several projects that I have inherited from previous developers. I also have this problem, and I finally found out where it came from, so maybe this also happens with posters.

In my project setup, there are many source files referenced in the project. When Visual Studio determines the build order, it creates projects in parallel that are independent of each other. So it can happen that a file that is compiled in two separate projects is created at the same time, which can lead to blocking.

In my opinion, the links to the files in the project are evil. :) The correct way would be to put the shared files into the library and then install the dependencies accordingly. Theoretically, you can solve this problem by installing build dependencies for projects sharing files, but this is IMO, because projects may not have a significant dependency (as in my case), they just repeat using the same code.

In my case, I can sometimes create an entire solution without problems, and sometimes I have to restart it several times.

Another reason this can happen is that when the settings are such that some (intermediate) files are generated in the same folder, you must also check the settings.

0
source share

If your project compiles in one mode and not in another (for example, Win32 vs x64, Debug vs Release), you should carefully compare the build settings, especially Include directories .

VS will mislead the "access denied" error instead of "file not found" if your build path contains, for example, a link to drive D: which is a DVD-RW drive without a drive inside.

Go to Project Properties> VC ++ Directories> Turn on directories , select "Configuration: all configurations" and / or "Platform: all platforms" if you then see <different options> , then carefully check what differences are. Or just copy the Include directories from the working configuration to the broken one.

Then repeat with Project Properties> C / C ++> Additional Include Directories .

0
source share

I ran into the same " Fatal Error: Permission Denied " issue with Visual Studio C ++ 2017 under Windows 10.

The solution was mentioned above: Starting Visual Studio as an administrator .

0
source share

All Articles