Sure, Miguel, you can do that without either.
Just open a command window ( cmd.exe );
make sure that the .Net Framework directory is in your path
( the .Net dir is where the compilers are located (vbc.exe, csc.exe));
navigate to the directory where you have your .vb files,
and run the compile command :
vbc /t:library /out:common.dll common.vb
If you need to import .Net classes, include them in your command line:
vbc /t:library /r:system.dll /r:system.web.dll /out:common.dll common.vb
common.dll will be created/compiled in the current directory.
Move it to the /bin directory of your application and fire away.
If you want to have VS.NET use it, reference it in your project.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:u$**************@TK2MSFTNGP09.phx.gbl...
Hello Juan,
I use Web Matrix because I feel it's simpler and faster to develop.
I also have Visual Studio 2003. Is it possible to use the command-line compiler without
needing to install Visual Studio?
Thanks,
Miguel
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:no***********@nowhere.com:
Shapper,
what you need to do is compile common.vb to common.dll using the
command-line compiler (vbc.exe) and reference *that* in your VS.NET project.
vbc /t:library /out:common.dll common.vb
If you need to import .Net classes, include them in your command line:
vbc /t:library /r:system.dll /r:system.web.dll /out:common.dll common.vb
Once your assembly ( common.dll ) is compiled,
place it in the /bin directory of your application
and you will be able to call any of its functions.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I am working in a web site where all the code is placed in aspx.vb files.
> After a while I realized that many functions included in my aspx.vb files where
> common
> to all pages.
>
> I created a new file named common.vb where I created a class named common and where I
> place all common functions:
>
> Imports System
>
> Public Class Common
> Public Shared Sub MyFunction01()
> ...
> End Sub
> ... End Class
>
> In my aspx.vb file I have:
>
> Imports Common
>
> Public Class myPage
>
> Inherits System.Web.UI.Page
> Private Sub Page_Load(
> MyFunction01()
> End Sub
>
> This is all I have. I get the error:
> Namespace or Type 'common' for the Imports 'common' cannot be found.
>
> Basically all I need is to use Common functions in my aspx pages class.
>
> Can someone tell me specifically what am I doing wrong?
>
> Thanks,
> Miguel
>
>