all groups > dotnet compact framework > december 2006 >
You're in the

dotnet compact framework

group:

No structures with enumeration allowed in assemblies ???


No structures with enumeration allowed in assemblies ??? logit
12/7/2006 2:03:48 AM
dotnet compact framework:
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?
Re: No structures with enumeration allowed in assemblies ??? ctacke/
12/7/2006 8:59:48 AM
I do that a lot, so it's not the problem. More likely you have a reference
problem in the solution somewhere.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--


[quoted text, click to view]

AddThis Social Bookmark Button