Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When I package a Sharepoint 2010 project in Visual Studio 2010, I occasionally get the following error message:

Access to the path 'C:\path-to-my-project\pkgobj\Debug\Package_Manifest.xml' is denied.

I checked the file, and it seems to be read-only. Clearing the read-only flag helps, but eventually the problem reoccurs. What's causing it and how can I fix it for good?

share|improve this question
add comment

3 Answers 3

I am able to get around the problem by checking-out the AppManifest.xml file in the project, thereby removing the read-only. For some reason the publish process copies this file over and keeps the read-only flag, causing the error.

share|improve this answer
add comment

You need to run the visual studio as Administrator

share|improve this answer
    
It made no difference. I don't see what administrator privileges have to do with the file system read-only flag. –  Hirvox Jun 28 '12 at 5:48
add comment

The UAC requires that you run Visual Studio as a system administrator.

To develop SharePoint solutions, you must have sufficient permissions to run and debug SharePoint solutions. Before you can test a SharePoint solution, take the following steps to ensure that you have the necessary permissions:

  • Add your user account as an Administrator on the system.
  • Add your user account as a Farm Administrator for the SharePoint server.
  • In SharePoint Central Administration, click the Manage the farm administrators group link.

http://msdn.microsoft.com/en-us/library/vstudio/ee231582(v=vs.100).aspx

share|improve this answer
    
Did you even read the question? This is not a Sharepoint permissions issue, it's an issue with Visual Studio. You don't even need to have a functioning Sharepoint instance to create a .wsp package in Visual Studio. That said, I am running Visual Studio with elevated privileges, and my user account is both a local administrator as well as the Sharepoint farm administrator. –  Hirvox Apr 16 '13 at 10:16
    
I did read your question and I've experienced the problem myself. However, I delevop on a server with SharePoint. Regardless, VS need the rights. Another scenario where this might happen is if use a version controler and you your file is versioned and marked as read-only by default. Content of the folders bin, debug, release should not be versioned as they are automatically generated. –  miracules Apr 16 '13 at 12:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.