Author Topic: VB.NET2005 vs VB.NET2008  (Read 3324 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
VB.NET2005 vs VB.NET2008
« on: July 03, 2009, 01:55:25 PM »
Anyone have any suggestions why some forms in a project will give the error in the attached pic when opened in 2008 after converting a 2005 project? In VB.NET2005Express this project does not give any errors at any time. I installed VB.NET2008Express and opened the project which updated it. Now, whenever I select one of 9 forms to edit (more forms are present, it's only these 9 that exhibit this problem) I get the error. The warnings shown do not point to anything in particular, nor do the items pointed to seem like they'd be causing any problems at all...user created form controls. The GUID pointer error indicates it is a missing file, but browsing to the file pointed to shows me that it does exist where it should.

This has been a problem for a month now, and it's really driving me nuts! Oh, I CAN build the project, and it runs ok AFAICT, but having these errors/warnings in the source is troubling.

I should note that I've tried a repair on C3D2009 (where this project originated from and references). I've even gone so far as to install a new OS on a new HDD and install the software again. 

Spike Wilbury

  • Guest
Re: VB.NET2005 vs VB.NET2008
« Reply #1 on: July 03, 2009, 02:11:56 PM »
Hi Jeff,

and if you turn down the warning level? (well, no idea if that's available on the express versions or if this is a great idea) :)

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: VB.NET2005 vs VB.NET2008
« Reply #2 on: July 03, 2009, 02:40:33 PM »
Thanks Luis. Where might I look for that warning level? I can only find things to suppress at compile, but this is when trying to edit that I get the error.

sinc

  • Guest
Re: VB.NET2005 vs VB.NET2008
« Reply #3 on: July 03, 2009, 03:07:09 PM »
What's going on in your Report.ReportUtilities class?  Is there a static constructor on that class?  Or do you have items on your form that call something in Report.ReportUtilities?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: VB.NET2005 vs VB.NET2008
« Reply #4 on: July 03, 2009, 03:22:00 PM »
I have issues with some projects that compiled fine in previous versions, but when upgraded to the new version have issues. Most always it is with forms rendering.

If you review the code as identified by the line numbers in the warning, you may be able to tell exactly what part of the code is issuing the error.
As recently as last week, I had an error where simply overriding the "HandleDestroyed" event on a control caused the control to not be instantiated. It took me hours to resolve the problem and I had to eventually do it by abandoning a perfectly normal method, opting instead for something that was completely off the wall.

Examine lines 100, 101, and 105 in ReportForm_AlignSta.Designer.vb and see if that tells you anything.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Spike Wilbury

  • Guest
Re: VB.NET2005 vs VB.NET2008
« Reply #5 on: July 03, 2009, 03:39:37 PM »
Thanks Luis. Where might I look for that warning level? I can only find things to suppress at compile, but this is when trying to edit that I get the error.

I use the pro edition and can be accessed from the properties, by right-click on the solution name - (but no idea if it is the same on the express)

Jeff_M

  • King Gator
  • Posts: 4099
  • C3D user & customizer
Re: VB.NET2005 vs VB.NET2008
« Reply #6 on: July 03, 2009, 03:43:55 PM »
What's going on in your Report.ReportUtilities class?
It gets the C3DApp, Doc, Alignments, etc.
Quote
Is there a static constructor on that class?  
I don't know, will have to investigate.....this is just the code that ships with C3d, no mods have yet been made so I'm not super familiar with what is going on.
Quote
Or do you have items on your form that call something in Report.ReportUtilities?
I believe there are these, too. I know there are user controls on the form that make calls to the ReportUtilities.

Keith, I've looked at those lines and I've not gotten anywhere with them.
Code: [Select]
        Me.Controls.Add(Me.CtlAlignListView1)  '''Line 100
        Me.Controls.Add(Me.CtlReportDescription1) '''line 101
        Me.Name = "ReportForm_AlignSta"
        Me.ShowIcon = False
        Me.ShowInTaskbar = False
        Me.TableLayoutPanel1.ResumeLayout(False) '''line 105
The user control CtlAlignListView loads without error. As does the CtlReportDescriotion control.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: VB.NET2005 vs VB.NET2008
« Reply #7 on: July 03, 2009, 04:06:05 PM »
I would suggest looking at the 2 controls then for some indication of the problem. I suspect that it has something to do with them, and not the report form.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

sinc

  • Guest
Re: VB.NET2005 vs VB.NET2008
« Reply #8 on: July 04, 2009, 09:46:41 AM »
I've also had things where I have a Property on a control which should only be called at runtime, and Designer is trying to call it at Design time, leading to errors like this.  I'm not entirely sure what the correct way of dealing with this problem is.  It seemed like there should be an Attribute or something that told Designer not to call this property at Design time, but I wasn't able to find anything like that.  As I recall, when I hit this issue, I tried several things that didn't work, then I simply avoided the issue by turning the Properties into Methods.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: VB.NET2005 vs VB.NET2008
« Reply #9 on: July 04, 2009, 10:04:49 AM »
I've also had things where I have a Property on a control which should only be called at runtime, and Designer is trying to call it at Design time, leading to errors like this.  I'm not entirely sure what the correct way of dealing with this problem is.  It seemed like there should be an Attribute or something that told Designer not to call this property at Design time, but I wasn't able to find anything like that.  As I recall, when I hit this issue, I tried several things that didn't work, then I simply avoided the issue by turning the Properties into Methods.

I've had the same kind of issues, for those I simply set the value in the New sub. Of course it means that the designer won't display the control properly, but then, I don't care if the designer is correct, only that the end result is correct.

To say the least, there are some issues with VB.NET2005 and VB.NET2008 that you have to work around .. but what do you expect for free? I hear the pay version is much better, but I can't justify purchasing it just yet.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Ken Alexander

  • Newt
  • Posts: 61
Re: VB.NET2005 vs VB.NET2008
« Reply #10 on: July 13, 2009, 06:54:33 PM »
It seemed like there should be an Attribute or something that told Designer not to call this property at Design time


<BrowsableAttribute(False)> _
Ken Alexander

sinc

  • Guest
Re: VB.NET2005 vs VB.NET2008
« Reply #11 on: July 14, 2009, 03:31:55 PM »
Tried it - didn't work.

Ken Alexander

  • Newt
  • Posts: 61
Re: VB.NET2005 vs VB.NET2008
« Reply #12 on: July 14, 2009, 11:13:19 PM »
Tried it - didn't work.

Strange.......seems to work just fine for me.
Ken Alexander