SHMD

Hi everyone,

Today I came across this weird problem in a smart client applicatoin project. There is a function which saves information to the database using datasets (not the best solution! but in process of refactoring). Well, the problem is that the function works in debug mode and it saves the info but in release mode one of the values changes therefore wrong information is saved to the database. I've already checked the execution path for processor directives such as #if DEBUG #endif and... nothing's wrong. As far as I know the only thing which may change the application's behaviour in runtime can be processor directives. any idea your help is appreciated.

Thanks



Re: Visual C# General Works in Debug but not Release.

ShellShock

I suggest you debug the release build - switch on the generation debug info (pdbs) in the project properties for the release config. If the process is not running on your dev machine then you can use remote debugging to attach to it over the network.



Re: Visual C# General Works in Debug but not Release.

Mark Dawson

Hi,

can you give a bit more information about what kind of value changes and some sample code, that may help figure out what your issue is.

Mark.






Re: Visual C# General Works in Debug but not Release.

Friendly Dog

 

Are you using SQL Server Express or some file-based databases If so, be aware that a new copy of database is copied from your source folder to your bin folder when you compile. Depends on how your folder / project is set up, your database may have been overwritten.