Mathew Nolton Blog

Software dementia unleashed...

Be Careful Generating XML Documentation with .Net

If you are like me, you like to use the XML commenting feature that comes with .Net. Personally, I only turn this feature on when I am creating a release build. However, if you do this make sure that you turn-off the read-only property on the output xml file. Failure to do so can will cause your build to fail.

This happened to me recently with a rather large solution set and I could not for the life of me figure out why all of a sudden when I switched to release build my solution set failed to build properly. If it was just a single project solution or a small solution set, it might have appeared obvious. It was only after I did a 'clean' of my obj and dll files that I was able to see that it was unable to write the output xml file that the error became more pronounced in my output. I quickly turned off the read-only attribute and it finally built. I hit this problem a while ago...but my memory must be fleeting.

Note to self: When doing a release build make sure to turn off the read-only attributes on the generated xml file (I keep this file in source safe with the rest of my project files).

-Mathew C. Nolton

Posted: Jan 17 2005, 03:50 PM by MatiasN | with 2 comment(s)
Filed under:

Comments

Jerry Pisk said:

I personally use a simple rule - if it can be generated then it does not go under source control. And documentation (at least the one generated from source files) falls into that category.
# January 17, 2005 5:02 PM

Mathew Nolton said:

Not a bad rule and one that we also considered but we are looking to have others (besides Developers) to generate the documentation using DocumentX or NDoc without having to rebuild the application to get the generated documentation. I guess we could make it a part of the build process to move them to another location....after the build.
# January 17, 2005 5:23 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)