views:

307

answers:

1

I'm trying to add a .settings file in a windows form application by adding a (whatever) file in the project and have it named smthng.settings. Right after it is created, it crashes (if I look into the project's directory the file is there, but it's not "in" the project). Am I doing it wrong or could it be that the problem lies elsewhere?

Edit: It seems that it's the settings designer that crashes.

Partially Solved:If I add a (whatever).config file, then rename it to .settings and change it's file type to C/C++ Code (don't ask how I figured this out..) then I can add to it settings, but if I do add something that has any connection to the form then automatically a (whatever).config with thew same name spawns (which is identical to the (whatever).setting even if change one of them) and at the stdafx.cpp a #include '(whatever).h' appears, which is a problem, because there is not such a header. (if I erase it or just create a blank (whatever).h it doesn't work. Apparently I have to somehow connect all the data in the (w/e).settings to (w/e).h as well or maybe something else) Anyone had this problem before? Anyone has any ideas?

A: 

If it crashes, then regarding of what else you may be doing wrong, it's a bug - software shouldn't crash on invalid user input. That said, the causes could be anything from bug in VS itself, to bug in some third-party extension you're using, to system problems.

Make sure you have all the latest OS updates and service packs for VS2005. If it still repros then, report it as a bug to Microsoft Connect, and people responsible for this product area will take it from there.

Pavel Minaev
It's not that I don't agree with you, it's just that it's Microsoft, it is supposed to crash under mysterious circumstances and not due to a bug:P Anyway, yes, I have all the updates and from what I found "Googling" around there seems to be a bug indeed.Still is there no way to add a .settings file some other way?
Ant
You can try to manually edit the `.csproj` file in any text editor and see if it works then. Oh, and check my profile ;)
Pavel Minaev
Check my last edit... I'm starting to believe that MS programming is more about magic and less about programming (maybe I should change my major from applied math to applied sorcery or something :P)
Ant
Pavel Minaev
Well now it's too late to change, also I'm supposed to use C++ for this program, so I can't change it now... Still though any work around?
Ant
None that I know of. I'd still recommend you to go through the bug reporting process (in addition to asking it here and elsewhere on forums etc) - the team responsible for the component might be in the best position to figure out the workaround, if there's any.
Pavel Minaev