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,395 thoughts on “VB.NET and project imports

  1. hi!,I really like your writing very much! percentage we communicate extra
    about your post on AOL? I require an expert in this area to resolve
    my problem. May be that is you! Taking a look ahead to
    look you.

  2. I am sure this article has touched all the internet viewers, its really really pleasant paragraph on building up new webpage.

  3. Thanks for ones marvelous posting! I seriously enjoyed reading it,
    you may be a great author.I will be sure to bookmark your blog and may come back at some point.
    I want to encourage you to ultimately continue your great posts, have a nice morning!

  4. Hey there I am so thrilled I found your site, I
    really found you by mistake, while I was searching on Digg for
    something else, Anyways I am here now and would just like to say many thanks for a fantastic
    post and a all round entertaining blog (I also love
    the theme/design), I don’t have time to browse it all at the moment but I have
    saved it and also included your RSS feeds, so when I have time
    I will be back to read much more, Please do keep up
    the great work.

  5. Сертификация товаров http://center-sertifikaciya.ru это важный этап для подтверждения качества и безопасности продукции который позволяет производителям и поставщикам выходить на рынок с уверенностью в соответствии нормам. Процесс получения сертификата включает несколько ключевых шагов начиная от подготовки документов и заканчивая выдачей официального документа. Это не только обязательное требование для многих видов товаров но и способ повысить доверие потребителей. В этой статье мы разберем основные этапы сертификации чтобы вы могли лучше понять как получить сертификат на товар и избежать распространенных ошибок.

  6. SEO-продвижение https://outreachseo.ru сайта для роста посещаемости и увеличения продаж. Проводим аудит оптимизацию структуры работу с контентом и техническими параметрами сайта чтобы улучшить позиции в поисковых системах и привлечь целевой трафик.

  7. Amazing! Its really remarkable post, I have got much clear
    idea about from this paragraph.

  8. Good day! Would you mind if I share your blog with my myspace group?
    There’s a lot of folks that I think would really enjoy
    your content. Please let me know. Cheers

  9. Good day! I just want to offer you a huge thumbs up for your excellent info
    you have right here on this post. I’ll be returning to your site for
    more soon.

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>