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.

5,399 thoughts on “VB.NET and project imports

  1. Покупка шаблона Аспро Оптимус — это готовое решение для запуска современного интернет-магазина на 1С-Битрикс. Переходите по запросу интернет-магазин Aspro Оптимус. Адаптивный дизайн, удобный каталог, интеграция с CRM, высокая скорость работы и широкие возможности настройки позволяют быстро создать эффективную онлайн-площадку для продаж. Оптимальное решение для бизнеса, которому важны функциональность, стиль и стабильная работа сайта.

  2. Хороший разбор текущих реалий SEO и важности долгосрочного подхода. Автор подробно рассказывает, почему поисковые системы всё больше внимания уделяют стабильности и качеству, а не временным всплескам активности. В статье затронуты эволюция алгоритмов, роль качественного контента и UX, а также эффективные методы для «SEO-марафона» — регулярный аудит, оптимизация, качественные ссылки и авторский контент. Рекомендую: https://gobelensalon.ru/tekushhie-realii-seo-i-vazhnost-dolgosrochnogo-podhoda/

  3. Hello everyone!

    Been looking for a new casino to try!

    Stumbled upon Rioace Casino and it’s been great: Rioace reviews

    Tons of slots available. Strong Trustpilot score.

    Have you played there?

  4. Good info. Lucky me I discovered your site by chance (stumbleupon).
    I’ve saved it for later!

  5. Hi there! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa?

    My site addresses a lot of the same subjects as yours and I believe we could greatly benefit from each other.
    If you happen to be interested feel free to shoot me an e-mail.
    I look forward to hearing from you! Fantastic blog by the way!

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>