No structures with enumeration allowed in assemblies ???


L

logit

Hello.

I'm just developing an application for mobile devices (Windows CE 5.0)
in Visual Studio 2005 (VB.NET) with the .NET Compact Framework 2.0 SP1
and I'm getting big problems by using assemblies (dll).

When I try to instantiate an assembly, which contains a structure with
an enumeration inside, I'm getting exceptions.

For example:
In an assembly (A) I've declared a structure, which contains an
enumeration:

Public Class CMyClass
Public Structure myStruct
Dim eElementType As eElementType
....
End Structure

Public Enum eElementType
eUIControl
eData
End Enum
....
End Class

In my project is a reference on this assembly. Namespaces and imports
are correct.

When I instantiate this assembly (A)
(
Public Class Form1

Dim m_oMyClass As New CMyClass(Me)
...
CApp.Init(True) 'is in Assembly (B)

End Class
)
following exception occurs:

"Could not load type 'Test.CApp' from assembly 'xxxxxxxxx,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' geladen werden.

When I remove the line (Dim m_oMyClass As New CMyClass(Me)) everything
works fine.

Does anybody have the same problem on structures with enumerations
inside?
 
Ad

Advertisements

G

Guest

I do that a lot, so it's not the problem. More likely you have a reference
problem in the solution somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top