Frage

I am trying to add a resource to my C++/CLI project. I am working with Visual Studio 2012. TFS 2013.

  • Right Click on the project => Add => Resource => I get the error.

Error:

The operation could not be completed. Access is denied.

I do not understand why I am getting this error. I don't know how to fix it. So far:

  • I checked-out the entire project (Project and all its files)
  • I removed the "Read-Only" mark of the folder and all the files inside it.

I can add other files and edit everything, but for some reason I can not add resources.

I can edit the resource file in Notepad, so I don't know what else to do. (I even rebooted just in case).

I can add resources to a C++ Native Library I have in the same project.

What else could be causing this error?

War es hilfreich?

Lösung 2

It seems the Resource file was somehow corrupted. After trying different approaches, I kept getting the same error, while I could easily add resources to other projects.

I deleted the resource file and everything related, and created everything from scratch and it worked.

Andere Tipps

This happened to me because I had still opened the resource (*.rc) file in the Resource Editor and/or Text Editor. As soon as I closed it, I was able to add resources again.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top