1

When I use the "normal" "Publish-tool" built into Visual Studio for ASP.net, it seems like it does not include XML-comment-files that belongs to dependent projects/assemblies.

For instance, lets say we have two projects:

  1. Presentation = The Web-application
  2. Definitions = A project containing definitions of models

The presentation-project has a dependency to the Definition-project. The presentation-project has XML-comments enabled, and so does the Definition-project (for all configurations).

The presentation-project has a few comments added to the actions of its controller(s). The definition-project has a few comments added to the properties of the model(s).

The expected result would be that when I publish the Presentation-project, we should end up with two XML- files in the bin folder:

  • Presentation.xml
  • Definitions.xml

The names might of course alter if any other name has been specified in the build-properties of each project. The actual result is that only Presentation.xml is published to the bin-folder.

I have tried to link resulting Definitions.xml-file to the Presentation-project as setting it as "Content" and to always copy, that ended up in the file getting copied to the root-folder of the application during a publish and not the /bin-folder. I have tried the same thing but linked it into the bin-folder of the Presentation-project, but that ened up with the result of the Definitions.xml-file ending up at /bin/bin/Definitions.xml. I have tried linking and setting Always, but that did nothing.

Here is a simple sample that can be used to reconstruct the problem: https://github.com/Inx51/publishdemo

However.. one thing to notice is that the Definitions.xml-file is indeed copied to the /bin-folder during build, but its not copied once using publish.

Anyone that has a workaround for this strange behaviour?

2 Answers 2

1

Edit your project XML file, .csproj/.vbproj, and include this in the first PropertyGroup:

<ExcludeXmlAssemblyFiles>false</ExcludeXmlAssemblyFiles>

This will include all the .xml of all dependent assemblies.

Sign up to request clarification or add additional context in comments.

Comments

0

Edit dependent project .csproj and add true into PropertyGroup for Release configuration. Also, add this in Realise PropertyGroup of the project you are publishing.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.