In Visual Studio, right-click on the project, choose "Properties", then in the Build -> Output section of the Properties page, select the checkbox next to "Documentation file". Leave the file path empty so that it generates the file in the default location, which is where NuGet will expect it to be located.
Alternately, you can add the following to the .csproj file.
<PropertyGroup> <GenerateDocumentationFile>true</GenerateDocumentationFile> </PropertyGroup>
Personally, I always put the above in a Directory.Build.props file in the root of the solution so that it's applied to all projects (I also put other common settings there like <TargetFramework> etc.).
In previous versions of .NET Core/VisualStudio, a bug caused the checkbox to store an absolute path to the documentation file which was obviously not ideal for teams. The bug is now be fixed as of version 16.9.