Search code examples
c#visual-studiodocfx

How to switch off DocFX in visual studio in debug mode while active in release mode?


I added DocFX to visual studio to generate web documents for my C# code. However, for every compilation it creates new documents which takes long time. Is there a way to switch it off in visual studio when I don't need it?

I know it is possible to uninstall/install it but this is the last resort.


Solution

  • You can edit the .csproj and add this line

    <BuildDocFx Condition=" '$(Configuration)'=='Debug' ">false</BuildDocFx>
    

    to the first <PropertyGroup> to disable docfx during debug builds