I have asp.net website which when published using build > publish website option in VS2010 and even when checking omit debug information option in website publish window,published folder still contains pdb files is there a way to avoid this behavior?
PDB files help you and the debugger out, making post-mortem debugging significantly easier. You make the point that if your software is ready for release, you should have done all your debugging by then.
pdb file stores all debug information for the project's .exe file, and resides in the \debug subdirectory.
Another way is to edit the pubxml
file (under Properties
/ PublishProfiles
of your web project).
I have then add bin\**\*.pdb
(**
is there to mean any hierarchy even none between bin
and your pdb
files) to the node ExcludeFilesFromDeployment
.
The pubxml
thus look like this :
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- ... -->
<WebPublishMethod>FileSystem</WebPublishMethod>
<ExcludeFilesFromDeployment>bin\**\*.pdb</ExcludeFilesFromDeployment>
</PropertyGroup>
</Project>
The informational text on the Publish Web dialog, says:
Publish uses settings from "Package/Publish Web" and "Package/Publish SQL" tabs in Project Properties.
So to prevent PDB files being published, you can:
Now when you publish your project, the PDBs will be omitted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With