VB.NET and project imports

Much to my displeasure, I’ve recently inherited an ASP.NET 1.1 website. After a bit of a wrestle they eventually handed over the source code (Why are .NET developers so precious over their code?). Unfortunately they didn’t hand over the Visual Studio project or solution files as well.

Fair enough, I can easily create a new solution and import all the code…no problem. Except there were problems, 104 of them. If you’ve used Visual Studio before you’re likely to know what that means. It means: a shit load of errors, except I’m only going to show you 104 of them.

The kind of stuff I was getting was:

Type 'Control' is not defined.

…and there were no error messages for missing imports. I scratched my head for ages until I thought of the notion of “automatic imports”. What if, these guys have somehow specified a set of imports that get appended automatically to each file…which I haven’t defined?

Turns out, you friggin can do exactly that. In Visual Studio 2003 it is: Right click on project > properties > project properties > imports.

Who the hell thought of that? Surely it is a completely ludicrous idea! It means that if the code gets separated from the project (which is exactly what happened) it won’t work correctly. Not only that, but how the hell am I supposed to know if MyClassName belongs to com.companyX.package or com.companyY.package???

So I’m just totally guessing at the moment, and I’m down to 18 errors. Man I hope it eventually runs.

2,404 thoughts on “VB.NET and project imports

  1. скачать букмекерскую контору мелбет скачать букмекерскую контору мелбет .

  2. An impressive share! I have just forwarded this onto a colleague who was doing
    a little homework on this. And he in fact ordered me lunch
    because I stumbled upon it for him… lol. So let me reword this….
    Thank YOU for the meal!! But yeah, thanks for
    spending time to talk about this subject here on your
    website.

  3. мелбет зеркало рабочее на сегодня мелбет зеркало рабочее на сегодня .

  4. скачать мелбет на андроид с официального сайта скачать мелбет на андроид с официального сайта .

  5. I believe this is among the most important info for
    me. And i am glad reading your article. But should statement on few basic issues, The
    website taste is wonderful, the articles is truly great : D.
    Just right process, cheers

  6. I’m truly enjoying the design and layout of your
    site. It’s a very easy on the eyes which makes it much
    more pleasant for me to come here and visit more often. Did you
    hire out a developer to create your theme?
    Great work!

  7. Spot on with this write-up, I seriously believe this site needs
    a lot more attention. I’ll probably be back again to see more, thanks for the
    info!

  8. Whoa! This blog looks exactly like my old one! It’s on a
    entirely different subject but it has pretty much the
    same page layout and design. Wonderful choice of colors!

  9. After checking out a few of the articles on your site, I honestly
    appreciate your technique of blogging. I book marked it to my bookmark site list and will be checking
    back in the near future. Please check out
    my website too and tell me your opinion.

  10. You need to be a part of a contest for one of the most useful blogs
    on the net. I’m going to highly recommend this blog!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>