views:

439

answers:

1

Does anyone know why when I compile my web deployment project it creates a vs.net project file and a bunch of other unwanted/unneed files in the release and debug folders. The debug files are also being included even though I have the "Generate debug information" option unchecked when in release mode.

I'm also getting some obj folder that contains another set of debug and release folders that seem out of place.

In short its creating a lot of non-release files. I am using a asp.net mvc project but I don't think that should make a difference.

+6  A: 

By default Visual Studio generates PDB files in both debug and release mode. The difference is that in debug mode the entire symbol table is loaded while in release mode only the key symbols are loaded.

You can completely disable PDB generation in release mode by setting generate debug info in advanced compile options to none.

If you want to have a clean output folder you can add the following ItemGroup to your web deployment project's file (.wdproj):

<ItemGroup>
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\obj\**\*.*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.csproj" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.scc" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.user" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.vspscc" />
</ItemGroup>
Darin Dimitrov