Debugging Issue

Feb 14, 2008 at 2:57 AM
Hey Guys...Great Tool. WOW!

I have a couple of issues though that I am having...

1. I cant seem to debug the asseblies I build. I added the pdb file to the assembly file in the gac but it still wont work...do you have any suggestions?
2. I am getting the following error....Cannot generate serialization assembly xxx.XmlSerializers.dll because it already exists. Use /force to force an overwrite of the existing assembly. >> the project is putting this file in the root of my project and not into the bin\debug folder where it should be. Am I alone on this or is anyone else having this issue?

Thanks,

Calvin
Developer
Feb 20, 2008 at 4:59 PM
calvinx,

I hit this same issue and found that the only "build" that actually include debug code is the DebugBuild. To resolve the issue you can go to your project properties -> build tab -> advanced and set all the debugging options you would like. Be aware that you have to do this for ALL Debugxxx targets.

~David
Apr 9, 2008 at 7:11 PM
Hi,

What setting do I need to enable in advanced settings for debugging to work? I tried enabling almost everything but i still cant debug my code. Any help will be appreciated.

Thanks.
Apr 10, 2008 at 2:22 AM
As dmcwee said, go the build tab. Then select 'All Configurations' from the drop down menu, select advanced and then set the Debug Info box to 'full'.
That worked fine for me.
Jul 10, 2008 at 10:53 AM
Just wanted to post a reply to the second issue "Cannot generate serialization assembly ... Use /force .."
I didn't to any resource as why the solution is copying the ...XmlSerializers.dll file to the root directory of the solution but I added a Pre-Build event that deletes my ...XmlSerializers.dll file so my problem went away.

  1. Create a batch file (.bat) "PreBuildEvents.bat" in your solution root directory and add the following:
    @echo off
    del %1XXX.XmlSerializers.dll

    (Remember to replace XXX to your XmlSerializers.dll filename)
  2. Right-click your project choose Properties
  3. Click the Build-Events tab and in the Pre-Build event command input box put:
    $(ProjectDir)PreBuildEvents.bat "$(ProjectDir)"
  4. Save and that's it
Best regards,
Sigurbjorn
Sep 9, 2008 at 4:26 AM
Edited Sep 9, 2008 at 4:42 AM
i have made changes in project properties but not debugging.
my .ddl file folder is default bin\debug
debugBuild command is also generating .pdb file and assembly is also deployed in GAC folder but it shows "No debug symbols have been loaded"
Nov 9, 2009 at 2:02 PM

Possibly your assemblies are registered in the GAC.
Remove them from the GAC before starting the build process.

Jun 24, 2010 at 9:44 PM
Sigurbjorn wrote:
Just wanted to post a reply to the second issue "Cannot generate serialization assembly ... Use /force .."
I didn't to any resource as why the solution is copying the ...XmlSerializers.dll file to the root directory of the solution but I added a Pre-Build event that deletes my ...XmlSerializers.dll file so my problem went away.

  1. Create a batch file (.bat) "PreBuildEvents.bat" in your solution root directory and add the following:
    @echo off
    del %1XXX.XmlSerializers.dll

    (Remember to replace XXX to your XmlSerializers.dll filename)
  2. Right-click your project choose Properties
  3. Click the Build-Events tab and in the Pre-Build event command input box put:
    $(ProjectDir)PreBuildEvents.bat "$(ProjectDir)"
  4. Save and that's it
Best regards,
Sigurbjorn

 Hi Sigurbjorn,

I was able to compile my solution with Debug mode successfully, but while compiling in Release mode, I was getting this error. Your tip above worked for me and resolved my issue. Thanks for the solution.

Thanks!

Nov 17, 2011 at 4:06 PM

As for 2:

This is shorter:

del $(ProjectDir)$(TargetName).XmlSerializers.dll

Checkout this nice post, too: http://hashtagfail.com/post/5255977780/sgen-loaderexceptions-error