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.

22,928 thoughts on “VB.NET and project imports

  1. Но он не заканчивался — день за днём неделя за неделей. Мы боялись заходить к нему боялись что он уже не дышит. Но трубку сняли выслушали и сказали: «Выезжаем прямо сейчас». Вывод из запоя на дому — это было единственное что сработало. Врач приехал быстро осмотрел отца. Это был момент когда я понял что всё будет хорошо. Теперь я знаю что делать если это повторится. капельница на дому от запоя капельница на дому от запоя По ссылке — подробная информация для МСК. Если ваш близкий в запое — не ждите. Вывод из запоя на дому — это реальность и она работает

  2. Мы долго не хотели признавать что мой брат болен. Он не ел не спал не говорил. Позвонил объяснил ситуацию. Вывод из запоя на дому — это было единственное что сработало. Убрал интоксикацию восстановил давление. Цена оказалась разумной никаких скрытых платежей. вывод из запоя круглосуточно цены https://alkogolizm.vyvod-iz-zapoya-na-domu-moskva-hst.ru Пригодится если случится беда для Москвы. Если ваш близкий в запое — не ждите. Вывод из запоя на дому — это реальность и она работает