Cool calm and collective BUG!!!!

N

Nak

Hi there,

I am literally about 2 days away (if that) from releasing my first
commercial product and have come across some stupid *bug* in VB.NET 2002
standard and wondered if anyone knew of a workaround.

When devloping class libraries I have always had troubles with the
toolbox as well as design time crashes, which is expected. But at the
moment I have a very annoying problem, I have recently *removed*
LicFileLicensing on my class library and implemented my own license
provider. This works fine, but unfortunately during the process my toolbox
in the project which is consuming the class library has lost its little
icons for the user controls. When I attempt to add them to the toolbox
again I am informed that,

"File or assembly name npLicenseManagerCL, or one of its dependencies,
was not found."

This is absurd as it is contained in the project consuming the class
library as well as the class library project. It's in my references as well
as my binary paths, WHY CAN'T IT FIND IT?!?!?!?!

This is doing my head in, just when I thought I was almost finished I
encounter another problem that doesnt seem like my own doing. Any ideas on
this one, I need the controls back in the toolbox ASAP! :-( :-(

Nick.
 
N

Nak

damn damn damn, it is something I am doing. I just managed to get a control
to copy and paste on one of the project forms by removing it's licensing
code, oh dear! :-(((

It's all character building isn't it?

Nick.
 
N

Nak

Right, I've found the problem, for some reason or another the controls
context usagemode is *not* design time when I copy and paste within the IDE,
is there any reason for this? Surely it should be design time until I
actually *run* the application???

Nick.
 
N

Nak

Hi there,

This appears to be a bug with VB.NET 2002, apparently the designer is not
setting the context of the correctly, that is why it returns the value for
runtime even when it is in designtime. This prevents me from being able to
copy and paste controls on my form unless I put exception handling into the
controls constructor to ignore the invalid license or remove the licensing
altogether.

I presume that this is why I cannot add the objects to the toolbox either?
Are there any work arounds for this? Does it happen in VB.NET 2003
Standard?? I have read 1 work around on the net which involvs moving the
validation routine out of the constructor,

http://www.dotnet247.com/247reference/msgs/53/268999.aspx

I would rather keep the validation code where it is, thanks loads for your
time (who ever has read this garbage) and many thanks for any replies in
advance! I gotta release my program!

Nick.
 
P

Peter Huang

Hi Nick,

If this is cause why your control did not work in the design time(I assume
the control will work in runtime). Did you have any other concern that why
you do not want to adopt the workaround? Perhaps there is other way to do
the job.

I look forward to hearring from you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,

Well as stated at the page in question, you can override the OnLoad
event and prevent calling of the base class, effectively getting a free
control. The only thing I can think off from the top of my head is making
the class notinheritable so that no-one can do this, but is there a way to
override this?

I have 5 objects that I need to do this with, and I am hoping that there
is nothing I'm missing? I'm getting a little paranoid as I want to sell the
program asap.

Nick.
 
N

Nak

Hi Peter,

I have also noticed that as some of my controls are inherited from other
controls they seem to emit an OnLoad. This kind of puts a damper on things.
Any ideas? Thanks loads for your time, it's most appreciated!

Nick.
 
N

Nak

Nice, now I'm getting compilation issues, the IDE is refusing to compile a
new version of my DLL, instead it keeps on reverting to a previous version
somehow?!?! I can literally change code, save, compile and the version
number does not shift! I have deleted the Obj and Bin folders and tried
again, still with no luck.

Closing the IDE several times seems to shift it but it keeps coming back,
this is getting mighty confusing!!!

Nick.
 
N

Nak

Finally sorted, I'm not bothered about the copy and paste not working, but
I have found otu my problem. My user controls were instatiating other
objects that required licenses, but because they were just classes and not
usercontrols I hadn't given them free design time licensing!

I've also managed to get around the IDE compilation isses, I now only use 1
IDE!

PHEW!

Nick.
 
P

Peter Huang

Hi Nick,

I did not understand your meaning very well, if you write an
usercontrol(MyUsercontrol) which will inherit from usercontrol class, and
override its onload method, but you can declare MyUsercontrol as
noninherited so that other can not inherited the control.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,

Yup, you are right, but some of my user controls inherit from other
controls which do not allow me to override the OnLoad event. So I've just
settled for the inability to copy and paste my controls, getting them in the
toolbox is fine now, but just not copy and pasting. Probably something
that's fixed in 2003 right? Cheers for your help :)

Nick.
 
P

Peter Huang

Hi Nick,

So far did you have any other concern on this issue, if so please feel free
to let me know.
Also I would appreciate you if you can provide a simple reproduce sample
and detailed reproduce steps, so that we can identity the problem, from
your description, I assume that the workaround will work for you(for the
usercontrols whose onload can be overrided), if I have any mistaken please
feel free to let me know. From the phenomena, we can guess that the problem
may be cause by the same problem that you refer to.

Only with the exact reproduce of your problem can we know if that has been
fixed in VS.NET 2003(Of course, this may be tested by simple run under the
VS.NET 2003), also can we report the problem to the product group to see if
there is any new information for this issue.

Cheers!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

Nak

Hi Peter,

I shall post an example in here for you the second I get a spare moment
or two. I would like to just copy and paste my current code just for these
ease but I'm going to be selling it, so I had better be careful with it.
I'll just knock up another example the second I get a chance, I just hate
using the LicFileLicenseProvider because VB.NET 2002 is full of bugs, and
sometimes it doesnt even compile the licenses file into the application
resources, needing to restart the PC to fix this. I've experienced allot of
bugs with my version, but that's not to say that I don't enjoy using it... I
think anyway :)

Cheers for your help again, much appreciated.

Nick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top