<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Justin,<BR>
<BR>
what was the problem with moving plug-in dll's to a separate directory?<BR>
<BR>
Or, doesn't mono plugins support loading named plugins from an xml file, for example?<BR>
<BR>
Wouldn't either of these solve the problem?<BR>
<BR>
Best,<BR>
Stefan<BR><BR><BR><BR><BR>
<HR id=stopSpelling>
<BR>
> Date: Fri, 18 Apr 2008 20:00:38 +0100<BR>> From: jjustincc@googlemail.com<BR>> To: opensim-dev@lists.berlios.de; opensim-users@lists.berlios.de<BR>> Subject: [Opensim-dev] Proposal for removing "ERROR: There was an error while scanning assembly:" messages<BR>> <BR>> Hello,<BR>> <BR>> This is a technical post but I'm copying it to users for information. <BR>> You may (or may not) want to stop reading quickly :-)<BR>> <BR>> So, some of you may have noticed that the latest OpenSim revisions now <BR>> have many more of the subject error messages on the console. The cause <BR>> is the Mono Addins manager we're using, which writes these errors to the <BR>> console if the dll doesn't contain the configuration data it's expecting.<BR>> <BR>> So today I looked at removing these errors. I had to follow several <BR>> lines of investigation.<BR>> <BR>> 1. My initial thought was to move all the external libraries which are <BR>> causing the problem to a separate $OPENSIM_ROOT/lib/ext directory. <BR>> However, this means changes to make sure that the dlls can be found in <BR>> the new directory. For a cross platform application, it's hard. On <BR>> Microsoft's CLR we can simply use <Probing> in config files. However, <BR>> Mono does appear to support this, at least according to<BR>> <BR>> http://www.mono-project.com/Assemblies_and_the_GAC<BR>> <BR>> I tried it anyway, without success. Instead, the only option on Mono is <BR>> to either set the MONO_PATH or put the assemblies in the Global Assembly <BR>> Cache.<BR>> <BR>> 2. This makes things awkward, so instead I looked at moving the plugin <BR>> dlls. Same problem.<BR>> <BR>> 3. So instead I looked at simply suppressing the messages. <BR>> Unfortunately, the Mono addins code writes these messages out to the <BR>> console. Although in theory you could give it an IProgressMonitor and <BR>> stop this, all the classes for this (and the interface) are internal and <BR>> hence not accessible. Later versions of mono-addins than the one we are <BR>> using would appear to have the same problem.<BR>> <BR>> So although we could hack the code in 3. to remove the message (or even <BR>> replace or code our own plugin solution), the fact is that we really <BR>> need to have dlls in different directories eventually anyway - bin/ is <BR>> already overloaded. This means I'm forced to come back to suggestion <BR>> 1. Putting things in the GAC is unrealistic at this stage I think, so <BR>> I'm proposing that we move all the external libraries to <BR>> $OPENSIM_ROOT/lib/ext and set the MONO_PATH environmental variable to <BR>> point to this directory. Under Windows, we would instead put <Probing> <BR>> entries in the executable's config files.<BR>> <BR>> I tried setting MONO_PATH programatically in OpenSimMain.cs, but the set <BR>> doesn't look like it is exported so the load fails. The same path works <BR>> fine when exported from the command line.<BR>> <BR>> If we go the MONO_PATH route, then I think we could provide shell <BR>> scripts for all the executables to set the path and then launch the <BR>> program, even though this is a little messy. The executable itself <BR>> would complain loudly if it is not on Windows and MONO_PATH is unset <BR>> (which would be inconvenient for Windows mono users, though there may <BR>> not be that many of them).<BR>> <BR>> I'm open to constructive suggestions on this, particularly from core <BR>> developers.<BR>> <BR>> -- <BR>> justincc<BR>> Justin Clark-Casey<BR>> http://justincc.wordpress.com<BR>> <BR>> _______________________________________________<BR>> Opensim-dev mailing list<BR>> Opensim-dev@lists.berlios.de<BR>> https://lists.berlios.de/mailman/listinfo/opensim-dev<BR><BR></body>
</html>