views:

497

answers:

2

Hello,

I am using Subonic in a VB.net application for the first time (I have used it succesfully in a WebSite project plenty of times). I followed the 2nd part of the 'Getting Started' video to actually generate the DAL source files as opposed to the build provider method and everything APPEARS to have gone like expected. However, nothing I do will get my generated namespace to appear. I feel that it has to with the fact that I am running my Web Application in VB.Net and Subsonic generates in C#.

Here is the process I followed:

1) I created a blank Web Application Project in Visual Studio 2) I configured the web.config to have the necessary parts, connection strings, etc. 3) I ran subcommander and it generated all the classes I needed into a folder called DAL. 4) I built the Web Application Project 5) I opened up a code behind, typed 'Imports' and I do not see the namespace that was generated.

I have even opened the actual Subsonic Source files and seen that there is a namespace statement for the generated namespace I configured. I tried briefly to move the subsonic files to a separate class library project, compile the .dll and use that in my project, but it still did not work.

Does anyone have any thoughts on what I might be doing wrong?

Thanks,

Mike

+5  A: 

Of course,

The instant I post a question I am able to find the answer. The trick is when you are generating your DAL in SubCommander and you must specify a /lang vb argument. My final arguments list looked like this:

generate /out DAL /lang vb

Then it gives me my DAL code in VB.net and that works just fine with everything I've got.

Mike

I was writing that very thing and got interrupted. Glad you figured it out!
ranomore
+1  A: 

I've done it many times. My command line is:

generate /out Classes\DAL /lang vb
Rick Ratayczak