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

No Comments