|
-
Jan 28th, 2004, 08:30 PM
#1
Object type cannot be converted to target type.
I used VS 2003 for a while before but I never had a copy to run on my home copy. Edneeis was nice enough to send me an evaluation copy of VS 2002. For some reason, 1 of my C# projects compiles fine, however, the task list gets filled up with " Object type cannot be converted to target type." about 20 different instances of it, all pointing to line 0, which is just
It still will compile, but it is annoying to have all of those in my task list, especially since I don't understand why they're there anyway.
So, um, is there a way to turn off that warning or something? It's annoying.
-
Jan 29th, 2004, 02:16 PM
#2
Frenzied Member
try removing all your refreances and readding them to clear a version conflict... other then that you got me....
Magiaus
If I helped give me some points.
-
Jan 31st, 2004, 05:26 PM
#3
Didn't do anything. Also, I can combine the project fine but the forms I made to be used as a dialog box don't work as a dialog box, and if I try to open any of them in design view, all properties on the form and objects become lost.
I guess I'm gonna have to wait until I get VS 2003 to do this, I don't feel like re-doing all those forms.
-
Feb 4th, 2004, 05:20 AM
#4
Sleep mode
VS.NET2002 is just f-ucking buggy .
-
Feb 16th, 2004, 08:28 AM
#5
Member
Originally posted by Pirate
VS.NET2002 is just f-ucking buggy .
I just started writing C# in it, but I haven't had a problems with it (except for minor bug in the XML Designer, but it still wasn't doing anything wrong).
Originally posted by kasracer especially since I don't understand why they're there anyway.
Its so you don't have to qualify the namespace the object is in. Like in C++. I don't think they are required.
Originally posted by kasracer if I try to open any of them in design view, all properties on the form and objects become lost.
I think you need to define a "region" within the source file that the Designer can write stuff to. Then your existing code wouldn't get overridden. I think. I just remember starting up a default Windows Application project and seeing #region/#endregion compiler directives.
-
Feb 16th, 2004, 08:49 AM
#6
Sleep mode
Originally posted by amac
I just started writing C# in it, but I haven't had a problems with it (except for minor bug in the XML Designer, but it still wasn't doing anything wrong).
After sometime , you'll realize how buggy it's .
I think you need to define a "region" within the source file that the Designer can write stuff to. Then your existing code wouldn't get overridden. I think. I just remember starting up a default Windows Application project and seeing #region/#endregion compiler directives.
#code region directives are only for code management in the MS IDE . It has nothing to do with code compilation or anything .
-
Feb 16th, 2004, 09:11 AM
#7
Member
After sometime , you'll realize how buggy it's .
I just started using it for C#. I've used it for a while for doing C++ development.
#code region directives are only for code management in the MS IDE . It has nothing to do with code compilation or anything .
Sorry... used the wrong term. Not a compiler directive... still a directive... of some sort. Either way, what I was referring to may solve kasracer's problem.
-
Feb 16th, 2004, 02:10 PM
#8
Frenzied Member
if vs.net is going to put it's code in a region it creates the region and the code. You may be right about a region protecting his code but I wouldn't bet on it.
I think maybe making a complete new project and moving the existing code in, in stages through the clipboard would be the best way to find and eliminate the problem. I can remember in vb6 at times the @#$&ing thing would just decide not to work anymore and even though the code was correct you would have to recreate the entire project and paste in your code from the old project used to tick me off.
Magiaus
If I helped give me some points.
-
Feb 16th, 2004, 02:27 PM
#9
Member
Yah, I'm not sure. It was just a thought.
Is it possible to have one source file with code generated from the Form designer and have your custom code in a different source file? Maybe eliminating the possibility for it to overwrite your code.
-
Feb 16th, 2004, 02:30 PM
#10
Frenzied Member
as far as I know the only sure way to keep vs.net from touching your code is to not use it and keep your code out of the regions it uses
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|