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.

3,625 thoughts on “VB.NET and project imports

  1. It’s amazing to visit this site and reading the views of all colleagues regarding this article, while I am also eager of
    getting knowledge.

  2. Эта познавательная публикация погружает вас в море интересного контента который быстро захватит ваше внимание. Мы рассмотрим важные аспекты темы и предоставим вам уникальныеInsights и полезные сведения для дальнейшего изучения. Разобраться лучше – https://vivod-iz-zapoya-1.ru/

  3. Ищете надежные лицензии для 1С-Битрикс? Мы предлагаем легальные решения для всех типов проектов: интернет-магазинов, корпоративных сайтов и порталов. Переходите по запросу cms Bitrix 1С. Быстрая активация, официальная поддержка и выгодные условия – обеспечьте своему веб-проекту стабильную работу и защиту с надежным ПО уже сегодня!

  4. Старый паркет? шлифовка паркета в спб профессиональное восстановление деревянного пола без пыли и лишних затрат. Удаляем царапины потемнения и старое покрытие возвращаем гладкость и естественный цвет. Используем современное оборудование выполняем циклевку шлифовку и лакировку паркета под ключ с гарантией качества и точным соблюдением сроков.

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>