I am using Swashbuckle for Api documentation, which requires projectname.xml document from the output, but when i build my ASP.NET Core project I don't get that file.
https://learn.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger
Visual Studio has an option to generate the XML file but how can I do that from console?
Here is my ASP.NET Core version:
.NET Command Line Tools (1.0.0-preview2-1-003177)
For Visual Studio 2017 and the dotnet
CLI, setting the DocumentationFile
property in the .csproj file will generate XML documentation at the specified path, relative to the project file. For example, to generate the XML doc in the same directory as your built assembly, you can add the following property group to the project file:
<PropertyGroup>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\MyProject.xml</DocumentationFile>
</PropertyGroup>
If you only want it built for particular configurations or platforms, make sure to set an appropriate Condition
on the property group.