views:

112

answers:

5

I've recently switched from a Windows XP machine to Windows 7. I use Subversion and TortoiseSVN.

I cannot publish my .NET application in Visual Studio. I get over a thousand errors like this:

Unable to delete file "obj\Debug\Package\PackageTmp\Views\ViewName.svn\text-base\ActionName.aspx.svn-base". Access to the path 'C:\Code\SolutionName\ProjectName\obj\Debug\Package\PackageTmp\Views\ViewName.svn\text-base\ActionName.aspx.svn-base' is denied.

Visual Studio: "Publish failed"

Why is Subversion giving me trouble? How do I fix it?

+1  A: 

The most likely cause is a permissions issue. In all likely hood the path in question was created while you were running with elevated permissions and hence requires admin permissions to delete. Try running Visual Studio as an admin and seeing if the problem goes away.

If so then the best solution is to do the following

  1. Save the changes to that directory (check in if necessary)
  2. Delete the repository
  3. Re-check out the repository and ensure you are not running as an admin when doing so
JaredPar
Thanks. I tried running Visual Studio as an administrator. But, that didn't work.
Zack Peterson
Thanks. I recreaded the folder fresh from the Subversion server. But, that didn't work.
Zack Peterson
@Zack, then that suggests something has the filed opened with non-sharable permissions. Try using handle.exe to see who's holding it open.
JaredPar
+2  A: 

I believe your issue is related to the default permissions assigned the to C: drive in windows 7 (and Vista).

  1. Open explorer and find the c:\code folder
  2. Right click on the c:\code folder and select properties
  3. select the security tab
  4. select the user ID "Users"
  5. In the permissions box, tick the "modify" allow box
  6. Select OK, OK until permision dialog boxes close

That should resolve the permission issue

Dee
Thanks. I changed the folder settings. But, that didn't work.
Zack Peterson
+1  A: 

And since you're using Win7, also have a look at this article here.

Stefan
A: 

I disabled the file indexing of my bin and obj folders. But, that didn't work.

Allow files in this folder to have contents indexed in addition to file properties

Zack Peterson
+1  A: 

I noticed that my folders were read-only. I changed that.

It worked! Publish succeeded.

Folder Properties Read-only

Zack Peterson
AFAIK Just was a permission issues, Try to set elevated permissions on shared folders but targeting machines, cause otherwise when you use users it wouldn't work
Angel Escobedo