Today I wanted to add Object Data Source(located in another DLL) to User Control in VB WAP project.
“Configure Data Source”Wizard showed me “Choose your Business Object” drop-down list with some objects from my DLL, but not the newest, that I’ve created recently. I’ve rebuild my projects a few times,cleaned solution,closed and re-opened Visua Studio -it didn’t help. My new data classes were not included in the combo-box. When I added class typemanually in the markup view, Wizard reported, that class couldn’t be found- maybe it is not in the BIN direcory.
I searched my hard drive for all versions of my business objects DLL and deleted old files from all directories. There was a change-all classes from my DLL disappeared from the drop-down list. Finally I’ve noticed, that my WAP project has DLLs in BIN, BINDEBUG and BINRELEASE directories.
Some time ago I decided to set Build Output Path as binDEBUG and BINRELEASE for different configurations.
(I did it to use consistent batch file for VB and C# Library projects.Note that new library projects in VS 2005 are created with separate targets for debug and release. But WAP VB project has one BIN as target for both configurations)
I haven’t cleaneed BIN folder itself and it had old versions of referenced DLLs. Now I deleted them from BIN folder and “Choose your Business Object” drop-down list became completely empty.
VB WAP “Configure Data Source”Wizard reads assemblies from BIN directory regardless of specified Build Output Path.
I’ve raised MS Connect Bug report “Configure Data Source Wizard doesn’t find classes if Build Output Path is changed in VB WAP” .
A few lessons for myself:
1. Don’t modify Build Output Path for VB WAP project.
2. Don’t use VB if possible-(“Configure Data Source”Wizard in C# WAP is smart enough to search correct Build Output Path for available DLLs )