DLL Problems w/ Compact Framework

  • Thread starter SkyRender via DotNetMonster.com
  • Start date
S

SkyRender via DotNetMonster.com

I have some C# code which I would like to be able to call from a Visual
Basic appication. Both the C# and VB applications are written for the .NET
Compact Framework. I compiled the C# stuff as a DLL by creating a new C#
project as a "Class Library", and then copied the code over. Everything
compiles just fine.


However, when I include the DLL in my VB application, I get the error:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' in project 'VBReceiveSMS' cannot be copied
to the run directory because it would conflict with dependency 'mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I read in another thread that this means that I'm using code for both the
regular .NET Framework and the .NET Compact Framework (see
http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-compact-
framework/10974/mscorlib-Error). Is this true? Is there any way in which I
can compile my C# stuff as a DLL and run in VB using the .NET CF? Thanks!
 
I

Ilya Tumanov [MS]

You sure can. Just choose "Smart device application" and pick "Class
Library" to create project for your C# DLL.

Using just "Class Library" would create a desktop DLL causing this conflict
on attempt to use it.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.
 

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