3

Using this answer I installed PrettyBin to my VS2013 C# project. It really is a easy one click solution if you want to copy all referenced DLLs to a lib subfolder in the bin folder.

Recently I noticed that thrown Exceptions do not show line numbers anymore. Searching trough Q&As here I think it is because PrettyBin moves the MyApp.pdb file to the \lib subfolder along with all DLLs. And now I don't know how to undo that. Uninstalling PrettyBin from NuGet does not help. Seems that its changes are permanent and I don't know where to look to configure this behaviour. My Project's post build events list is empty.

If anyone has experience with PrettyBin, how can I configure it to skip pdb files?

Otherwise where, should I look to make a change in the Project properties so I can get my pdb back to the bin folder?

Community
  • 1
  • 1
mandarin
  • 1,316
  • 1
  • 15
  • 27

1 Answers1

2

I found the solution. I had to manually change the MyApp.csproj file with Notepad++. The part at the very end where it says:

<Target Name="AfterBuild">
  <ItemGroup>
    <MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
  </ItemGroup>
  <Move SourceFiles="@(MoveToLibFolder)" DestinationFolder="$(OutputPath)lib" OverwriteReadOnlyFiles="true" />
</Target>

I just had to remove $(OutputPath)*.pdb ; AND remove PrettyBin from the NuGet Package Manager, so it doesn't change it back again. Now all DLLs and XMLs go to \lib subfolder, but the .pdb stays put and I again get the line number when catching Exceptions.

Eliahu Aaron
  • 4,103
  • 5
  • 27
  • 37
mandarin
  • 1,316
  • 1
  • 15
  • 27
  • Actually I cannot find any pdb's for the dll's. Neither in the top level folder, nor the `\lib` subfolder. – mandarin Aug 10 '15 at 07:55