keenlabs / keen-sdk-net

A .NET SDK for the Keen IO API
MIT License
37 stars 24 forks source link

Include XML Doc Comments in .nupkg #138

Closed masojus closed 6 years ago

masojus commented 6 years ago

One thing we seem to have lost in the new multi-targetted .nupkg is the XML file with doc comments. We used to include it via the <DocumentationFile> option, but we'll need to see how to define that path such that it makes sense for all target frameworks:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DocumentationFile>bin\Release\Keen.XML</DocumentationFile>
  </PropertyGroup>

https://stackoverflow.com/questions/41862019/how-to-properly-specify-documentationfile-in-msbuild-15-csproj-with-multitarget?rq=1

Maybe we need to include that property in the conditional property groups based on framework:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <DocumentationFile></DocumentationFile>
  </PropertyGroup>

Or should it be <GenerateDocumentationFile>true</GenerateDocumentationFile> instead?

masojus commented 6 years ago

This could also be an option:

    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>

But this seems to indicate maybe that's not even necessary anymore: https://github.com/dotnet/sdk/pull/349

masojus commented 6 years ago

Fixed in PR #139 with commit d0b7b8d