VS2010: Autogenerated XML documentation file does not update
Asked Answered
S

3

11

I have a C# project in vs2010 that generates a XML documentation file, where I have set the output path of the generated file to the project output path.

My problem is that the file does not update when the path to the document file is the same as project output path, and the file names are the same (except for the file extensions).

Does not update XML file:

  • C:\MyProjectFolder\MyProject.dll
  • C:\MyProjectFolder\MyProject.xml (documentation file)

But when I change either to another folder or change the documentation file name, the file is generated correctly.

Does update XML file:

  • C:\MyProjectFolder\MyProject.dll
  • C:\AnotherFolder\MyProject.xml

does also update XML file

  • C:\MyProjectFolder\MyProject.dll
  • C:\MyProjectFolder\AnotherFileName.xml

Or more correctly; when the path and file name is the same as in the first example, the file is regenerated, but with old info and old modified time stamp.

It worked before in VS 2008, and I don't want to change the file name or path because others depend on it.

Any suggestions on what might be wrong? Could it be a temporary file that is copied? Maybe some cache could be cleared in VS 2010 folder?

ADDITIONAL INFORMATION: I have noticed that if the original XML Documentation file is deleted, and then a new name specified in the project properties, the new XML Documentation is generated and is correct and up to date, but the old XML file with the old name is recreated too - still in its previous state. This must be cached somewhere...

Subrogate answered 12/5, 2011 at 13:5 Comment(3)
I have the same issue in VS2012 but the path to the XML doc file is \bin\Debug\CompanyName.ProjectName.DAL.XML. If I change the XML file name to Test, it will update on build so I have to do that, then rename the file to what I would prefer it to be to get it to update.Intercollegiate
Hi, can you please tell me how did you change the documentation file name? I can understand that you did it quite a long time ago..but by any chance do you remember?Thee
I have the same problem with VS 2013 C# - thanks for this assistance, it helps to at least get an updated file with a different nameBijou
S
3

I also experienced this issue in Visual Studio 2015 Update 3.

I enabled Diagnostic MSBuild project build output verbosity in Visual Studio's Tools > Options and discovered that it was copying a version of the XML documentation file from another project's output directory.

Only after I did a Clean on all the solution's build configurations and then re-built my project, did the XML documentation file get regenerated and reflect the latest XML comments in my code.

Stan answered 11/5, 2017 at 22:50 Comment(1)
In Visual Studio 2017, this can be found at Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosityFragile
S
1

I faced this exact problem and I couldn't figure it out for the life of me.

It turned out that I had a old version of the .xml file in a folder where I saved dlls used in the project. So visual studio was just copying that xml file instead of generating a new one. (This was on Visual Studio Communtiy 2017)

So check if you have a old version of the .xml file in any of the same directories as any of your referenced dlls.

Sufism answered 6/10, 2019 at 3:58 Comment(0)
C
0

I use VS 2010 and my XML documentation is regenerated correctly on each build.

Even a simple rebuild will force the file to update. If you modify the class description and rebuild, you should also get XML with the updated description.

Casebound answered 16/5, 2011 at 17:31 Comment(1)
I think your case is 'normal', the OP is querying an unusual case - that I also share when using VS 2013 - when the XML file reverts to its OLD state, even if you delete it and recompileBijou

© 2022 - 2024 — McMap. All rights reserved.