MSBUILD Generate xml documentation file for all projects in solution (without touching the projects)












7















I'm trying to create the XML documentation for all the projects in the solution even when the option its not checked in the project properties (and this is the key point).



I'm using TFS 2010 SP1 and tried with this "/p:TreatWarningsAsErrors=true /p:GenerateDocumentation=true" in the "MSBuild Arguments" field of my build definition. It doesn't generate anything.



I also tried with /p:DocumentationFile=foo.xml, which it does work but I assuming the file gets overridden by the last compiled project, so I tried using a variable instead but with no luck, I tried with



/p:DocumentationFile=$(Project).xml,
/p:DocumentationFile=$(localProject).xml
/p:DocumentationFile=$(localBuildProjectItem).xml


Is there a way to create the XML documentation for all the projects from within MSBUILD even though the option is not checked in the project?



PS: And yes I already see another thread similar to this but I don't want to modify the projects, that's the whole point of doing it with MSBUILD.



Thanks for your time










share|improve this question























  • did you ever find a solution for this? the one below does not solve the issue

    – artfulhacker
    Jul 3 '13 at 22:46











  • Nop, as far as I know, this is the best we can get

    – Juan Zamudio
    Jul 5 '13 at 17:23











  • I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

    – artfulhacker
    Jul 5 '13 at 18:32


















7















I'm trying to create the XML documentation for all the projects in the solution even when the option its not checked in the project properties (and this is the key point).



I'm using TFS 2010 SP1 and tried with this "/p:TreatWarningsAsErrors=true /p:GenerateDocumentation=true" in the "MSBuild Arguments" field of my build definition. It doesn't generate anything.



I also tried with /p:DocumentationFile=foo.xml, which it does work but I assuming the file gets overridden by the last compiled project, so I tried using a variable instead but with no luck, I tried with



/p:DocumentationFile=$(Project).xml,
/p:DocumentationFile=$(localProject).xml
/p:DocumentationFile=$(localBuildProjectItem).xml


Is there a way to create the XML documentation for all the projects from within MSBUILD even though the option is not checked in the project?



PS: And yes I already see another thread similar to this but I don't want to modify the projects, that's the whole point of doing it with MSBUILD.



Thanks for your time










share|improve this question























  • did you ever find a solution for this? the one below does not solve the issue

    – artfulhacker
    Jul 3 '13 at 22:46











  • Nop, as far as I know, this is the best we can get

    – Juan Zamudio
    Jul 5 '13 at 17:23











  • I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

    – artfulhacker
    Jul 5 '13 at 18:32
















7












7








7


3






I'm trying to create the XML documentation for all the projects in the solution even when the option its not checked in the project properties (and this is the key point).



I'm using TFS 2010 SP1 and tried with this "/p:TreatWarningsAsErrors=true /p:GenerateDocumentation=true" in the "MSBuild Arguments" field of my build definition. It doesn't generate anything.



I also tried with /p:DocumentationFile=foo.xml, which it does work but I assuming the file gets overridden by the last compiled project, so I tried using a variable instead but with no luck, I tried with



/p:DocumentationFile=$(Project).xml,
/p:DocumentationFile=$(localProject).xml
/p:DocumentationFile=$(localBuildProjectItem).xml


Is there a way to create the XML documentation for all the projects from within MSBUILD even though the option is not checked in the project?



PS: And yes I already see another thread similar to this but I don't want to modify the projects, that's the whole point of doing it with MSBUILD.



Thanks for your time










share|improve this question














I'm trying to create the XML documentation for all the projects in the solution even when the option its not checked in the project properties (and this is the key point).



I'm using TFS 2010 SP1 and tried with this "/p:TreatWarningsAsErrors=true /p:GenerateDocumentation=true" in the "MSBuild Arguments" field of my build definition. It doesn't generate anything.



I also tried with /p:DocumentationFile=foo.xml, which it does work but I assuming the file gets overridden by the last compiled project, so I tried using a variable instead but with no luck, I tried with



/p:DocumentationFile=$(Project).xml,
/p:DocumentationFile=$(localProject).xml
/p:DocumentationFile=$(localBuildProjectItem).xml


Is there a way to create the XML documentation for all the projects from within MSBUILD even though the option is not checked in the project?



PS: And yes I already see another thread similar to this but I don't want to modify the projects, that's the whole point of doing it with MSBUILD.



Thanks for your time







msbuild tfs2010






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 1 '12 at 0:04









Juan ZamudioJuan Zamudio

130629




130629













  • did you ever find a solution for this? the one below does not solve the issue

    – artfulhacker
    Jul 3 '13 at 22:46











  • Nop, as far as I know, this is the best we can get

    – Juan Zamudio
    Jul 5 '13 at 17:23











  • I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

    – artfulhacker
    Jul 5 '13 at 18:32





















  • did you ever find a solution for this? the one below does not solve the issue

    – artfulhacker
    Jul 3 '13 at 22:46











  • Nop, as far as I know, this is the best we can get

    – Juan Zamudio
    Jul 5 '13 at 17:23











  • I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

    – artfulhacker
    Jul 5 '13 at 18:32



















did you ever find a solution for this? the one below does not solve the issue

– artfulhacker
Jul 3 '13 at 22:46





did you ever find a solution for this? the one below does not solve the issue

– artfulhacker
Jul 3 '13 at 22:46













Nop, as far as I know, this is the best we can get

– Juan Zamudio
Jul 5 '13 at 17:23





Nop, as far as I know, this is the best we can get

– Juan Zamudio
Jul 5 '13 at 17:23













I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

– artfulhacker
Jul 5 '13 at 18:32







I was thinking a possible solution, would be iterating through the sln and building the csproj separately, then DocumentationFile=.. would work, i saw this but i have never seen this type of syntax before in a build script social.msdn.microsoft.com/Forums/vstudio/en-US/…

– artfulhacker
Jul 5 '13 at 18:32














2 Answers
2






active

oldest

votes


















2















  1. Open your process template (i.e.: $/yourproject/BuildProcessTemplates/DefaultTemplate.xaml)


  2. Scroll down to find the Compile the Project activity.


  3. Add a new variable named DocumentationFile, type=String, scope=Compile the Project


  4. Set its default value to:



    String.Format("{0}.XML", System.IO.Path.GetFileNameWithoutExtension(serverBuildProjectItem))
    Compile the Project



  5. Save changes and scroll down to Run MSBuild for Project activity.


  6. In CommandLineArguments, set the following value:
    String.Format("/p:SkipInvalidConfigurations=true {0};DocumentationFile={1}", MSBuildArguments, DocumentationFile)
    Run MSBuild for Project


  7. Check-in the changes and build. This should generate the documentation even if it was not set by the project.







share|improve this answer


























  • I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

    – Juan Zamudio
    Feb 2 '12 at 6:05











  • this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

    – artfulhacker
    Jul 3 '13 at 23:03



















0














I also wanted to achieve this and finally I came up with a solution following these steps:




  • Create a Directory.Build.props file in the solution root folder.

  • Set GenerateDocumentationFile property to true.

  • Set DocumentationFile property.


By default you would use $(OutputPath) and $(AssemblyName) properties to set the documentation file name, like this:



<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>


But unfortunately this does not work as Directory.Build.props file is processed first hence properties set in .csproj files are unavailable at this point.



Fortunately there is another property that gets the current project name: $(MSBuildProjectName)



The output path by default is the following:




  • for Web projects: bin

  • for other projects: bin$(Configuration), e.g. binDebug


To decide whether a project is a web project or not I used the name of the project which ends either with .Web or .WebApi



So the complete Directory.Build.props file looks like this in my case:



<Project>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- The rest is omitted for clarity. -->
</PropertyGroup>

<PropertyGroup>
<!-- warning CS1591: Missing XML comment for publicly visible type or member -->
<NoWarn>1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Web')) Or $(MSBuildProjectName.EndsWith('.WebApi'))">
<DocumentationFile>bin$(MSBuildProjectName).xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Web')) And !$(MSBuildProjectName.EndsWith('.WebApi'))">
<DocumentationFile>bin$(Configuration)$(MSBuildProjectName).xml</DocumentationFile>
</PropertyGroup>
</Project>


As you can see there is also a <NoWarn>1591</NoWarn> property set which tells the compiler not to produce warning messages for publicly visible types where XML document is missing.



Hope it helps.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9088928%2fmsbuild-generate-xml-documentation-file-for-all-projects-in-solution-without-to%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2















    1. Open your process template (i.e.: $/yourproject/BuildProcessTemplates/DefaultTemplate.xaml)


    2. Scroll down to find the Compile the Project activity.


    3. Add a new variable named DocumentationFile, type=String, scope=Compile the Project


    4. Set its default value to:



      String.Format("{0}.XML", System.IO.Path.GetFileNameWithoutExtension(serverBuildProjectItem))
      Compile the Project



    5. Save changes and scroll down to Run MSBuild for Project activity.


    6. In CommandLineArguments, set the following value:
      String.Format("/p:SkipInvalidConfigurations=true {0};DocumentationFile={1}", MSBuildArguments, DocumentationFile)
      Run MSBuild for Project


    7. Check-in the changes and build. This should generate the documentation even if it was not set by the project.







    share|improve this answer


























    • I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

      – Juan Zamudio
      Feb 2 '12 at 6:05











    • this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

      – artfulhacker
      Jul 3 '13 at 23:03
















    2















    1. Open your process template (i.e.: $/yourproject/BuildProcessTemplates/DefaultTemplate.xaml)


    2. Scroll down to find the Compile the Project activity.


    3. Add a new variable named DocumentationFile, type=String, scope=Compile the Project


    4. Set its default value to:



      String.Format("{0}.XML", System.IO.Path.GetFileNameWithoutExtension(serverBuildProjectItem))
      Compile the Project



    5. Save changes and scroll down to Run MSBuild for Project activity.


    6. In CommandLineArguments, set the following value:
      String.Format("/p:SkipInvalidConfigurations=true {0};DocumentationFile={1}", MSBuildArguments, DocumentationFile)
      Run MSBuild for Project


    7. Check-in the changes and build. This should generate the documentation even if it was not set by the project.







    share|improve this answer


























    • I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

      – Juan Zamudio
      Feb 2 '12 at 6:05











    • this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

      – artfulhacker
      Jul 3 '13 at 23:03














    2












    2








    2








    1. Open your process template (i.e.: $/yourproject/BuildProcessTemplates/DefaultTemplate.xaml)


    2. Scroll down to find the Compile the Project activity.


    3. Add a new variable named DocumentationFile, type=String, scope=Compile the Project


    4. Set its default value to:



      String.Format("{0}.XML", System.IO.Path.GetFileNameWithoutExtension(serverBuildProjectItem))
      Compile the Project



    5. Save changes and scroll down to Run MSBuild for Project activity.


    6. In CommandLineArguments, set the following value:
      String.Format("/p:SkipInvalidConfigurations=true {0};DocumentationFile={1}", MSBuildArguments, DocumentationFile)
      Run MSBuild for Project


    7. Check-in the changes and build. This should generate the documentation even if it was not set by the project.







    share|improve this answer
















    1. Open your process template (i.e.: $/yourproject/BuildProcessTemplates/DefaultTemplate.xaml)


    2. Scroll down to find the Compile the Project activity.


    3. Add a new variable named DocumentationFile, type=String, scope=Compile the Project


    4. Set its default value to:



      String.Format("{0}.XML", System.IO.Path.GetFileNameWithoutExtension(serverBuildProjectItem))
      Compile the Project



    5. Save changes and scroll down to Run MSBuild for Project activity.


    6. In CommandLineArguments, set the following value:
      String.Format("/p:SkipInvalidConfigurations=true {0};DocumentationFile={1}", MSBuildArguments, DocumentationFile)
      Run MSBuild for Project


    7. Check-in the changes and build. This should generate the documentation even if it was not set by the project.








    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 1 '12 at 19:38

























    answered Feb 1 '12 at 19:22









    KMorazKMoraz

    12.9k34176




    12.9k34176













    • I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

      – Juan Zamudio
      Feb 2 '12 at 6:05











    • this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

      – artfulhacker
      Jul 3 '13 at 23:03



















    • I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

      – Juan Zamudio
      Feb 2 '12 at 6:05











    • this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

      – artfulhacker
      Jul 3 '13 at 23:03

















    I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

    – Juan Zamudio
    Feb 2 '12 at 6:05





    I will mark this answer because i think its the best we can get without modifying the task, it seems that in the msbuild task the project collection really is the solutions selected in the build definition and not the individual projects of each solution

    – Juan Zamudio
    Feb 2 '12 at 6:05













    this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

    – artfulhacker
    Jul 3 '13 at 23:03





    this creates the xml file but it does not prevent the file from being replaced when building an sln with multiple projects

    – artfulhacker
    Jul 3 '13 at 23:03













    0














    I also wanted to achieve this and finally I came up with a solution following these steps:




    • Create a Directory.Build.props file in the solution root folder.

    • Set GenerateDocumentationFile property to true.

    • Set DocumentationFile property.


    By default you would use $(OutputPath) and $(AssemblyName) properties to set the documentation file name, like this:



    <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>


    But unfortunately this does not work as Directory.Build.props file is processed first hence properties set in .csproj files are unavailable at this point.



    Fortunately there is another property that gets the current project name: $(MSBuildProjectName)



    The output path by default is the following:




    • for Web projects: bin

    • for other projects: bin$(Configuration), e.g. binDebug


    To decide whether a project is a web project or not I used the name of the project which ends either with .Web or .WebApi



    So the complete Directory.Build.props file looks like this in my case:



    <Project>
    <PropertyGroup>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <!-- The rest is omitted for clarity. -->
    </PropertyGroup>

    <PropertyGroup>
    <!-- warning CS1591: Missing XML comment for publicly visible type or member -->
    <NoWarn>1591</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Web')) Or $(MSBuildProjectName.EndsWith('.WebApi'))">
    <DocumentationFile>bin$(MSBuildProjectName).xml</DocumentationFile>
    </PropertyGroup>

    <PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Web')) And !$(MSBuildProjectName.EndsWith('.WebApi'))">
    <DocumentationFile>bin$(Configuration)$(MSBuildProjectName).xml</DocumentationFile>
    </PropertyGroup>
    </Project>


    As you can see there is also a <NoWarn>1591</NoWarn> property set which tells the compiler not to produce warning messages for publicly visible types where XML document is missing.



    Hope it helps.






    share|improve this answer




























      0














      I also wanted to achieve this and finally I came up with a solution following these steps:




      • Create a Directory.Build.props file in the solution root folder.

      • Set GenerateDocumentationFile property to true.

      • Set DocumentationFile property.


      By default you would use $(OutputPath) and $(AssemblyName) properties to set the documentation file name, like this:



      <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>


      But unfortunately this does not work as Directory.Build.props file is processed first hence properties set in .csproj files are unavailable at this point.



      Fortunately there is another property that gets the current project name: $(MSBuildProjectName)



      The output path by default is the following:




      • for Web projects: bin

      • for other projects: bin$(Configuration), e.g. binDebug


      To decide whether a project is a web project or not I used the name of the project which ends either with .Web or .WebApi



      So the complete Directory.Build.props file looks like this in my case:



      <Project>
      <PropertyGroup>
      <GenerateDocumentationFile>true</GenerateDocumentationFile>
      <!-- The rest is omitted for clarity. -->
      </PropertyGroup>

      <PropertyGroup>
      <!-- warning CS1591: Missing XML comment for publicly visible type or member -->
      <NoWarn>1591</NoWarn>
      </PropertyGroup>

      <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Web')) Or $(MSBuildProjectName.EndsWith('.WebApi'))">
      <DocumentationFile>bin$(MSBuildProjectName).xml</DocumentationFile>
      </PropertyGroup>

      <PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Web')) And !$(MSBuildProjectName.EndsWith('.WebApi'))">
      <DocumentationFile>bin$(Configuration)$(MSBuildProjectName).xml</DocumentationFile>
      </PropertyGroup>
      </Project>


      As you can see there is also a <NoWarn>1591</NoWarn> property set which tells the compiler not to produce warning messages for publicly visible types where XML document is missing.



      Hope it helps.






      share|improve this answer


























        0












        0








        0







        I also wanted to achieve this and finally I came up with a solution following these steps:




        • Create a Directory.Build.props file in the solution root folder.

        • Set GenerateDocumentationFile property to true.

        • Set DocumentationFile property.


        By default you would use $(OutputPath) and $(AssemblyName) properties to set the documentation file name, like this:



        <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>


        But unfortunately this does not work as Directory.Build.props file is processed first hence properties set in .csproj files are unavailable at this point.



        Fortunately there is another property that gets the current project name: $(MSBuildProjectName)



        The output path by default is the following:




        • for Web projects: bin

        • for other projects: bin$(Configuration), e.g. binDebug


        To decide whether a project is a web project or not I used the name of the project which ends either with .Web or .WebApi



        So the complete Directory.Build.props file looks like this in my case:



        <Project>
        <PropertyGroup>
        <GenerateDocumentationFile>true</GenerateDocumentationFile>
        <!-- The rest is omitted for clarity. -->
        </PropertyGroup>

        <PropertyGroup>
        <!-- warning CS1591: Missing XML comment for publicly visible type or member -->
        <NoWarn>1591</NoWarn>
        </PropertyGroup>

        <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Web')) Or $(MSBuildProjectName.EndsWith('.WebApi'))">
        <DocumentationFile>bin$(MSBuildProjectName).xml</DocumentationFile>
        </PropertyGroup>

        <PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Web')) And !$(MSBuildProjectName.EndsWith('.WebApi'))">
        <DocumentationFile>bin$(Configuration)$(MSBuildProjectName).xml</DocumentationFile>
        </PropertyGroup>
        </Project>


        As you can see there is also a <NoWarn>1591</NoWarn> property set which tells the compiler not to produce warning messages for publicly visible types where XML document is missing.



        Hope it helps.






        share|improve this answer













        I also wanted to achieve this and finally I came up with a solution following these steps:




        • Create a Directory.Build.props file in the solution root folder.

        • Set GenerateDocumentationFile property to true.

        • Set DocumentationFile property.


        By default you would use $(OutputPath) and $(AssemblyName) properties to set the documentation file name, like this:



        <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>


        But unfortunately this does not work as Directory.Build.props file is processed first hence properties set in .csproj files are unavailable at this point.



        Fortunately there is another property that gets the current project name: $(MSBuildProjectName)



        The output path by default is the following:




        • for Web projects: bin

        • for other projects: bin$(Configuration), e.g. binDebug


        To decide whether a project is a web project or not I used the name of the project which ends either with .Web or .WebApi



        So the complete Directory.Build.props file looks like this in my case:



        <Project>
        <PropertyGroup>
        <GenerateDocumentationFile>true</GenerateDocumentationFile>
        <!-- The rest is omitted for clarity. -->
        </PropertyGroup>

        <PropertyGroup>
        <!-- warning CS1591: Missing XML comment for publicly visible type or member -->
        <NoWarn>1591</NoWarn>
        </PropertyGroup>

        <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Web')) Or $(MSBuildProjectName.EndsWith('.WebApi'))">
        <DocumentationFile>bin$(MSBuildProjectName).xml</DocumentationFile>
        </PropertyGroup>

        <PropertyGroup Condition="!$(MSBuildProjectName.EndsWith('.Web')) And !$(MSBuildProjectName.EndsWith('.WebApi'))">
        <DocumentationFile>bin$(Configuration)$(MSBuildProjectName).xml</DocumentationFile>
        </PropertyGroup>
        </Project>


        As you can see there is also a <NoWarn>1591</NoWarn> property set which tells the compiler not to produce warning messages for publicly visible types where XML document is missing.



        Hope it helps.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 15:21









        GaborGabor

        1,768414




        1,768414






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9088928%2fmsbuild-generate-xml-documentation-file-for-all-projects-in-solution-without-to%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python