This is what should happen and does happen when you run a .NET exe (outside Visual Studio):
- if your DoWork handler has a try-catch it catches the exception and continues, just like all code would.
- if your DoWork handler does not have an approrpiate try-catch, it gets terminaed, and the RunWorkerCompleted handler gets executed; it has a RunWorkerCompletedEventArgs parameter, containing both a Cancel and an Error property, both of which you really should look at if you want to know what has happened.
And if you run the same code from inside Visual Studio, things may be slightly different as Visual knows how to intercept some of the exceptions, if you let it.
Conclusion: with correct code, no regular exception will go unnoticed.
Since upgrading to vs.net 2010, I've noticed after doing a search (find in files and search in current project or entire solution) and then clicking on the found result item or right-click -> Go to Definition always opens the code file (window) in the same tab area as the Find Results window.
Does anyone have any idea how to have it open the code file (window) above with the other code windows I currently have one? It used to do this in every version prior to 2010.
Does anyone know if it is possible to have, for example, a reference to an assembly in a debug build that is not present in the release build in Visual Studio 2010? In other words, to have assembly references set which are specific to a build configuration?
On a closely-related issue, does anyone know if it is possible to have a file included in the project tree only for a specific configuration? If this isn't possible, is it at least possible to specify a different build rule for one configuration (e.g. have copy-to-output-directory only for the debug build and not the release)?
I am struggling to find information on this, so any help or pointers-to-info would be very much appreciated.
On a closely-related issue, does anyone know if it is possible to have a file included in the project tree only for a specific configuration?
As far as I am aware this is possible. Just use the project properties and change the settings for either the Release or Debug build as appropriate. I have definitely done something similar in the past with the Express Edition of VC++. The same should hold true for the copy you mentioned.
The only problem I see here is that it is easy to get things messed up when you want to change any settings. An easier way is to create a second project within the solution that references only those source files necessary, and has all its settings totally independent of the original project.
Just say 'NO' to evaluated arguments for diadic functions! Ash
Last Visit: 31-Dec-99 19:00 Last Update: 31-Mar-15 14:43