[Mono-list] mod_mono and dll references

Gonzalo Paniagua Javier gonzalo at ximian.com
Sat Dec 3 14:09:30 EST 2005


On Sat, 2005-12-03 at 02:49 +0100, Jurek Bartuszek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
> 
> > This has nothing to do with mod_mono. It's just that you need the
> > @Import for the namespace in which ReversiButton is defined (<%@
Import
> > namespace="blah" %>).
> 
> Hi! Thanks for answer, but ReversiButton is defined in the same
> namespace as the rest of application. The method you provided does not
> work in this case. How would mono know where to look for such dll
files?

Yes, but the code generated by asp.net does not know about that
namespace. That's why you have to use @Import, so that the generated
code contains a 'using yournamespace;'.

> 
> By the way: According to my knowledge, asp.net applications (with code
> behind pages) can be run by mono in two modes: First, with .aspx and
> .aspx.cs files and second with .aspx and bin/*.dll files. If this
> information is incorrect, please, explain this to me (or provide some
> URL). And one more: how does mono know if the aspx.cs file has been
> changed (when to rebuild it)?

The 'CodeBehind' attribute is a VS.NET only thing. VS.NET uses it when
building the project. So in this case, you have to copy the dlls
generated by VS.NET into the 'bin' directory.

If you use the attribute Src (<%@Page src="somepage.aspx.cs" %>) your
source C# file will be compiled the first time that page is hit. In this
case you don't need to have the dlls around, but everytime you restart
the server the source needs to be compiled.

-Gonzalo





More information about the Mono-list mailing list