Hi,
I am using dotnet publish to publish my dotnet core 2.2 web application. I notice that the published folder has several unrequired files, specifically .pdbs, .appsettings.Development, .runtimeconfig.dev etc.
Qn: Is there a way dotnet publish command can be made to exclude these files or would I have to delete these manually?
Thanks
@livarcocc @jeffschwMSFT
Hi @scalablecory @livarcocc @jeffschwMSFT,
please let me know if there is a way to remove these unnecessary files during publish.
Same question with dotnet core 3.1 web application. Any way to remove those unrequired files using command line parameters or .csproj PropertyGroup properties? DebugType=None and DebugSymbols=false seem to be ignored.
Using Property group in .csproj with <DebugType>None</DebugType> and <DebugSymbols>false</DebugSymbols> must be done on each referenced .csproj to apply on each referenced assemblies.
Using dotnet publish parameters /p:DebugType=None /p:DebugSymbols=false apply on each referenced assemblies.
@saxenark did the answer given by @ducalai solve your problem?
Most helpful comment
Using Property group in .csproj with
<DebugType>None</DebugType>and<DebugSymbols>false</DebugSymbols>must be done on each referenced .csproj to apply on each referenced assemblies.Using dotnet publish parameters
/p:DebugType=None /p:DebugSymbols=falseapply on each referenced assemblies.