Re: Using assembly.load to load system.data

From: Dan (daniel_at_hawkins1978.fsnet.co.uk)
Date: 03/03/05


Date: Thu, 3 Mar 2005 10:35:13 -0000

Hi Daniel

I will have to knock something up that can run the code as it is that
function is part of a large parsing library, a bit like xaml, So I will have
to create a little app.

I will also test your line now

Dan

"Daniel Moth" <dmoth74@hotmail.com> wrote in message
news:uj4uAn9HFHA.580@TK2MSFTNGP15.phx.gbl...
> Thank you for sharing some code. What we really need is something that
> runs (your snippet is not enough).
>
> You also ignored the one liner I gave you to test with. Did that change
> things?
>
> Cheers
> Daniel
> --
> http://www.danielmoth.com/Blog/
>
>
> "Dan" <daniel@hawkins1978.fsnet.co.uk> wrote in message
> news:Olb2RA9HFHA.3376@TK2MSFTNGP14.phx.gbl...
>> Hi Daniel
>> The code I use is this:
>>
>> Public Shared Sub loadAssembly(ByVal ns As String, ByVal assemblyName As
>> String)
>> Dim ass As [Assembly]
>> If Not assemblyMappings.ContainsKey(ns) Then
>> Try
>> ass = [Assembly].Load(ns)
>> assemblyMappings(ns) = ass
>> Catch ex As Exception
>> If ass Is Nothing Then
>> 'try load from fullname
>> ass = [Assembly].Load(assemblyName)
>> assemblyMappings(ns) = ass
>> End If
>> End Try
>> End If
>> End Sub
>>
>> So if I call this to load system.data, ns would be system.data and
>> assembly name is the full name, version, public key etc. But even when
>> trying to load it with the fullname fails.
>>
>> Thanks
>> Dan
>> "Daniel Moth" <dmoth74@hotmail.com> wrote in message
>> news:e4CLV$3HFHA.1172@TK2MSFTNGP12.phx.gbl...
>>> Can you show some code?
>>>
>>> Chances are that you are not passing the full name to Assembly.Load. If
>>> that is the case, the only reason winforms & drawing loaded was because
>>> they were loaded already. To test this theory insert this line just
>>> before your Assembly.load of system.data. If it works with and doesn't
>>> without, it is as I suspected so share some code. If it continues to
>>> throw then... ...still show us the code
>>>
>>> // c#
>>> System.Data.Column b = new System.Data.Column("test")
>>>
>>> ' vb
>>> Dim b As New System.Data.DataColumn("test")
>>>
>>> Cheers
>>> Daniel
>>> --
>>> http://www.danielmoth.com/Blog/
>>>
>>>
>>> "Dan" <daniel@hawkins1978.fsnet.co.uk> wrote in message
>>> news:ukjRj6qGFHA.2524@TK2MSFTNGP15.phx.gbl...
>>>> Hi everyone
>>>> I'm having trouble trying to load the system.data assembly.
>>>> If I do assembly.load() and pass in system.windows.forms or
>>>> system.drawing
>>>> it loads the assembly but if I use system.data it throws an
>>>> ioexception.
>>>>
>>>> has anyone else come across this
>>>> thanks
>>>> Dan
>>>>
>>>
>>
>>
>



Relevant Pages

  • Re: Using assembly.load to load system.data
    ... Dan wrote: ... > Public Shared Sub loadAssembly(ByVal ns As String, ByVal assemblyName As ... > So if I call this to load system.data, ns would be system.data and assembly ... > load it with the fullname fails. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Using assembly.load to load system.data
    ... The code in the catch block trys to load with the fullname, ... >> Public Shared Sub loadAssembly(ByVal ns As String, ByVal assemblyName ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: VBA macro stops executing on Word 2003 but works on Word XP
    ... The macro executes perfectly. ... Dim PatFullName() As String ... ' Load Provider Name into ProvPath var ...
    (microsoft.public.word.vba.general)
  • Re: VBA macro stops executing on Word 2003 but works on Word XP
    ... The macro executes perfectly. ... Dim PatFullName() As String ... ' Load Provider Name into ProvPath var ...
    (microsoft.public.word.vba.general)
  • Re: Problem when I boot...
    ... You have an invalid or remnant entry in a place used to load programs on ... What's likely is that a program neglected to enclose its load string ... enclose the string identifying the program within double quotes if it ... the spaces embedded in the paths to their executables. ...
    (microsoft.public.windowsxp.hardware)