Compile VB into DLL

Last post 01-16-2004 8:01 AM by Shaji. 4 replies.

Sort Posts:

  • Compile VB into DLL

    01-08-2004, 7:12 AM
    • Member
      315 point Member
    • Ferox
    • Member since 03-06-2003, 6:29 AM
    • Posts 63
    Hi I've search through the forums and online, and I've found a lot of useful info. But I'm still have errors/ problems trying to compile VB files into a DLL.

    So far I have done this:

    1. made a txt file with:

    vbc /t:library /out:bin\main.dll /r:System.dll /r:System.Web.dll main.vb, main2.vb
    copy con

    2. saved the file as 'compile.bat' and stored it in the same directory as my VB files
    3. Click on the BAT to run and I get this error:

    C:\Inetpub\wwwroot\myProg\codebehind>vbc /t:library /out:bin\main.dll /r:System.dll /r:System.Web.dll main.vb
    'vbc' is not recognized as an internal or external com operable program or batch file.
    C:\Inetpub\wwwroot\myProg\codebehind>copy con

    What am I doing wrong? Any help would be great!

    I have about 5 VB files to compile into 1 DLL.
  • Re: Compile VB into DLL

    01-08-2004, 8:24 AM
    This is telling youy that the VB compiler (VBC.exe) can not be found in your path.

    Search for it on your machine and use the full path to it.

    If you are using the SDK and asp.net 1.1 - then the batch file sdkvars.bat can be run to set the path details

    regards

    John Timney (ASP.NET MVP)
  • Re: Compile VB into DLL

    01-09-2004, 6:34 AM
    • Member
      315 point Member
    • Ferox
    • Member since 03-06-2003, 6:29 AM
    • Posts 63
    Ok I have this now and I'm just getting nothing now (not even an error)

    C:\WINNT\Microsoft.NET\Framework\v1.1.4322\vbc /t:library /out:C:\Inetpub\wwwroot\myProg\bin\main.dll /r:system.dll, system.web.dll main.vb

    Saved as a .bat in the same folder as the VB file. When I run the bat file the command window pops up very quickly and I don't get a chance to read it. Then I go check the bin folder...and nothing. Also searched the whole PC for the DLL and coulcn't find it.

    Still completely confused here. I'm doing exactly what the books/ websites have said to do, and nothing is happening.

    Can anyone give me a detailed list of instructions based on what I have mentioned?

    Any help would be great.
  • Re: Compile VB into DLL

    01-16-2004, 7:17 AM
    • Member
      315 point Member
    • Ferox
    • Member since 03-06-2003, 6:29 AM
    • Posts 63
    Does no-one know what I'm doing wrong?

    I am still searching for the correct method/ syntax, but everything I try either comes back with an error (i'm using the correct paths etc) or else the command dialog flicks up so fast I never get to read what it has done.
  • Re: Compile VB into DLL

    01-16-2004, 8:01 AM
    • Contributor
      7,081 point Contributor
    • Shaji
    • Member since 06-18-2002, 5:48 AM
    • DUBAI, United Arab Emirates
    • Posts 1,412
    Hi,
    Change you batch file as below and try :

    C:\WINNT\Microsoft.NET\Framework\v1.1.4322\vbc /t:library /out:C:\Inetpub\wwwroot\myProg\bin\main.dll /r:C:\WINNT\Microsoft.NET\Framework\v1.1.4322\system.dll, C:\WINNT\Microsoft.NET\Framework\v1.1.4322\system.web.dll main.vb
    PAUSE


    HTH
    K B Shajudeen
    AreYaar.com
    Dubai, United Arab Emirates.
Page 1 of 1 (5 items)