[Mono-dev] CreateInstanceAndUnwrap crashing
Robert Jordan
robertj at gmx.net
Thu Dec 21 19:47:58 EST 2006
Robert Jordan wrote:
> Justin Tulloss wrote:
>> On 12/21/06, Robert Jordan <robertj at gmx.net> wrote:
>>> Justin Tulloss wrote:
>>>> I recompiled it
>>>> successfully and got further, but every example dies in
>>> "Die" is pretty vague, at least in this context.
>>> Please post the exception/error message you got.
>>>
>> It's an unhandled file-not-found exception. The error and the
>> backtrace are below:
>>
>> Unhandled Exception: System.IO.FileNotFoundException: Could not load
>> file or assembly 'SimpleHost, Version=1.0.2546.29423, Culture=neutral'
>> or one of its dependencies. The system cannot find the file specified.
>> File name: 'SimpleHost, Version=1.0.2546.29423, Culture=neutral'
>> at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap
>> (string,string)
>> at (wrapper remoting-invoke-with-check)
>> System.AppDomain:CreateInstanceAndUnwrap (string,string)
>> at System.Web.Hosting.ApplicationHost.CreateApplicationHost
>> (System.Type hostType, System.String virtualDir, System.String
>> physicalDir) [0x00000]
>> at SimpleHost.Program.Main (System.String[] args) [0x00000]
>
> That's what I actually expected. You have to create a "bin"
> directory relative to Directory.GetCurrentDirectory()
> and copy the assembly into this dir.
>
> I'm pretty sure that's explained in the article you mentioned
> in your post, because it's how ASP.NET hosting works.
Search for "bin" at
http://msdn.microsoft.com/msdnmag/issues/04/12/ServiceStation/#S4
If you already put the assembly into the GAC and it's still failing,
remove the AssemblyVersion wildcard, otherwise you can't easily
recompile the assembly w/out having to install it into the GAC
again.
Robert
More information about the Mono-devel-list
mailing list