Hola.
Tengo el siguiente código:
-
Dim Ficheros() As String
Dim Fichero As String
Dim FS As Directory
Dim i As Integer
Dim oAss As Reflection.Assembly
Dim oType As Type
Dim oObj As Object
If Not FS.Exists(Application.StartupPath & "\covers") Then
FS.CreateDirectory(Application.StartupPath & "\covers\")
End If
Ficheros = FS.GetFiles(Application.StartupPath & "\covers\",
"ccov*.dll")
For i = 0 To Ficheros.GetUpperBound(0)
Fichero = Path.GetFileName(Ficheros(i))
oAss = Reflection.Assembly.LoadFrom(Ficheros(i))
oType = oAss.GetType(Fichero.Substring(0, Fichero.Length - 4)
& "." & Fichero.Substring(0, Fichero.Length - 4), True, True)
oObj = Activator.CreateInstance(oType)
Next
-
Cuando hago el GetType, me devuelve el siguiente error:
Información adicional: No se puede cargar el tipo cCovers01.cCovers01
del ensamblado cCovers01, Version=1.0.2221.28975, Culture=neutral,
PublicKeyToken=null.
El fichero dll se llama: cCovers01.dll
La Clase se llama igual: cCover01
En que estoy fallando?
Gracias
Leer las respuestas