Unable to build DocSiteProject after source control add

Topics: Bugs, Features, General Discussion
Jun 27, 2007 at 5:24 AM
I just added the completed DocSiteProject I've been working on into source control (using perforce). I then recursively checked out every file, since i knew that building the project would try to rewrite a lot of them. But the build, rebuild or clean all fail with:

Access to the path 'project.xml' is denied.

As far as I can tell there is only Presentation>Style>project.xml and it's definitely checked-out and writable. Any suggestions?

thanks,
arne
Coordinator
Jun 27, 2007 at 5:35 AM
Hi Arne,

I'm not really sure. I work with my DocProjects controlled by Visual Source Safe and just check the entire project out before building. That's always worked for me.

After restarting Visual Studio does the same issue occur again? It could be that the project.xml file is actually still marked as read-only even though it's checked out. Try editing it manually. Does that work?

- Dave
Jun 27, 2007 at 2:47 PM
Ok,

Here's what happened. It was user error, but one that's not obvious, so I figured it might be useful for someone else. At least with perforce, it physically locks files that are not checked out. If you try to do a build before you check out the entire project, it will successfully create buildhelp. Unfortunately it does so by copying read-only files which will stay that way. If you then check out the project, those files will continue to stay read-only and build will always fail, because it's not failing on source controlled files.

I.e. the project.xml that it was complaining about is not the one in the project itself but the one in buildhelp. Recursively marking buildhelp read/write fixes this.
Coordinator
Jun 27, 2007 at 6:54 PM
Hi Arne,

Ah, good find. Thanks for posting this.

FYI, I'm going to work on a feature that gives users the option to check out build output before each build or to have DocProject do it automatically, but at this point I still don't know if it's going to be possible using VS automation.

Apparently DocProject is going to have to also automatically remove the read-only attribute on files in the buildhelp directory so that they can be deleted before each build.

Thanks,
Dave
Sep 2, 2008 at 1:07 PM
Hi, Dave.

I have the same problem using a version downloaded in jun/2008. When Will you deploy this version that removes the read-only attribute on files in the buildhelp directory?

Thanks in advance.

[]'s,

Sérgio Ciglione
Coordinator
Sep 2, 2008 at 2:28 PM
Hi Sergio,

DocProject 1.11.0 automatically checks out and removes read-only flags before writing to project files, and I thought that at one point DocProject did remove the read-only flag on the project.xml file before copying it to the buildhelp folder, but either I'm mistaken or that feature was lost during refactoring for a subsequent release.  In any case I'll add this as a work item and try to get it in for the 1.12 Production release.

Just to be sure, is it only project.xml that's giving you trouble?

- Dave
Coordinator
Sep 2, 2008 at 2:35 PM
Work item: 
http://www.codeplex.com/DocProject/WorkItem/View.aspx?WorkItemId=18285
Sep 2, 2008 at 2:54 PM
Hi Dave,

Ok, thank you. I'm having trouble with the all the files in the buildhelp\Assembler\dDueXML. They are all marked as read-only.

[]'s,

Sérgio Ciglione
Coordinator
Sep 2, 2008 at 4:04 PM
Hi Sergio,

Ok, thanks for the feedback.  I'll make sure to have the read-only flag removed on all conceptual topics in the working directory.

For now you may be able to work-around the problem by checking out the Help\Topics folder before building.  Or at least by deleting the buildhelp folder manually before building.

- Dave