[Mono-dev] Customizing Mono for a specific app
robertj at gmx.net
Fri Jun 4 11:32:47 EDT 2010
On 04.06.2010 16:12, Thiago Padilha wrote:
> I want to distribute a portable ASP.NET application with its own
> managed web server - aspNETserve, however this server only seems to
> work when its assemblies are installed in the GAC, otherwise the '
> ApplicationManager.CreateObject' throws a FileNotFoundException for
> failing to find the core aspNETserve assembly. This method creates a
> new appdomain for hosting the server, but there seems to be no way of
> specifiying the base directory for it(where it should look for
> assemblies). I think this could be solved if I distributed a private
> runtime along with the app, and specified a subfolder on the App as
> the GAC for that private runtime.
This is by design of ASP.NET but you can overcome this limitation
by copying all assemblies of aspNETserve into the "bin" directory
of the web application. You should end up having this directory
structure (based on xsp, but it applies to any other ASP host like
Mono.WebServer2.dll (<- this is an xsp dependency)
> 3-Have this custom mono runtime use the private GAC for resolving assemblies
> My question is how to perform step 3 : Is that done at build time or
> at runtime when I start mono from my custom host?
See mono's man page (MONO_GAC_PREFIX), but I don't believe you'll
need it if you're going to deploy your own mono installation
because Mono is relocatable under Linux (it is able to detect its
GAC at runtime regardless of the prefix).
More information about the Mono-devel-list