Conversion from .Net 2003 to .Net 2005 using VB.Net

We've just received .Net 2005 upgrade and are in the process of converting two projects. Both Projects have User Controls and we are having some issues with them.

1st, one of the user controls has 2 classes in it and the conversion moved the declarations from the class into another file, but not the code. Is there a way to convert a user control that has two classes without it doing this?

2nd, We are getting errors on all the user control names. This error comes up: "Type uc_mc_btn_footer is not defined." Can anyone please tell me why we are getting this error when it seems all the user controls (except the one with 2 classes) seemed to convert correctly? - adn how to fix it?

3rd, where did the bin directory get moved to? I know it still exists, but we can't find it...

TIA, Coleen

[835 byte] By [Coleenh] at [2007-12-24]
# 1

Are these projects independant of one another or are they related?

Not sure what you mean in #1... the usercontrol can only be one class file (in 03 - partial class files are new to 05).

Is "uc_mc_btn_footer" the name of a UserControl? Have you verifed that this is indeed the control's class name? Does the control reside in the same project that is giving the errors?

On #3, you probably just need to save the project. VS05 creates new projects in a temp location until they are saved. After saving, you should find the bin folder in the project folder where you'd expect it to be.

rkimble at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

Thanks very much for responding.

No, they are two separate projects, but they both use the same user control. It happens to be a user control that will be used throughout all our applications, once we get them all converted to .Net.

On #1, The User control has two classes - the fist is Public Class uc_payments and the second is Friend Class Number_to_Text.

Yes "uc_mc_btn_footer is the name of the UserControl, and yes it resides in the same project. We have many UserControls and all of them reside in the project in a separate directory called Controls...all the controls are giving us this error. Is there something special we need to do to convert them?

On #3, I did save the project, but still can't find the bin directory...it normally has it's own directory. None exist for it since the conversion. - ETA Found the Bin Directory. It doesn't appear until you compile the app. Although we compiled, we can't run the app yet it has too many errors.

ANY help would be greatly appreciated.

Thanks,

Coleen

Coleenh at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

I'm not sure if I can help you here...

Where does the error about the type not being defined show up? Is it in the form that tries to instantiate the usercontrol? This error is appearing either because the type is not listed in an available namespace, or becuase the controls themselves have internal problems that prevent them from showing up as valid controls... I'd check for any errors within the controls themselves.

Sorry that's not much help... dont' really know what went wrong here.

rkimble at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

Thanks for responding. The errors are in all web forms that use the USerControls. Every one of the UserControls (that worked perfectly in .Net 2003) now give an error where they are used in the VB code such as:

uc_epay1.locationId = ""

The uc_epay1 (Usercontrol) is no longer declared - but the form and aspx <uc1:uc_epay id="Uc_epay1" runat server"></uc1:uc_epay> are still there - although I am getting an error in the aspx: "Element 'Uc_epay' is not a known element. This can occur if there is a compilation error int the Web site."

Ummm - yeah! So what on earth happened to all our UserControls?

Thanks for any/all help :-)

Coleen

Coleenh at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5

oh-ho! This is a web application! No wonder some of that didn't make sense.

If you look in the code of the user controls - both the HTML code and the VB Code-behind, are there any errors in the controls themselves? Anything that would prevent the controls from compiling?

Just for shts and giggles, you might want to try moving the user controls (just one to start with) into their own project and see if they will compile as a DLL. If that works then create a new, blank web app, reference the dll and see if the usercontrol can be accessed.

I have no idea what happened during the conversion, but breaking this down into individual pieces may help. You might also want to post your questions in the ASP forums as readers there will have more experience with web app migration (this forum is for Windows applications).

GL

rkimble at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 6

Thanks GL, I will post on the ASP forum. I'm sorry, I didn't realize that the VB forum was specifically for the Window environment - we develop our web pages in ASP.Net and VB.Net. Since the errors are in the code-behind (well there are some errors in the ASP too) I just thought I should post in the VB forum.

Thanks for your suggestion, if re-doing the conversion doesn't work. I got a response yesterday in a different forum to have me download:

Microsoft Visual Studio 2005 – Update to Support Web Application Projects

Which I have done. I deleted the directory for the failed conversion and am going to try re-converting after the download. If that doesn't work, I'll try your suggestion.

Thanks very much.

Coleen

Coleenh at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...