Class Library in CF vs Windows Class Library

T

TechGladiator

I have a bunch of code in classes that I am trying to convert into a
class Library. What I would like to do it use the same code in my CF
Class library as well as my WindowsCF class library.

My problem is that most of my classes have an Import for
System.Data.SqlClient since I use the SQLConnection method/property.
It works fine if I compile it as a Windows Class library but when I do
it for CF it tells me that SQLConnection is not defined.. I dont
really want to go to every file in my project and change the imports or
keep two different copies of the code since it will be a pain to
maintain.

Isnt there a way to share the same code for a Windows Class library as
well as a CD class library and maybe just have to have a different
imports file depending on which project you are compiling?

Thanks
Mike
 
T

tamberg

If the library (i.e. your assembly) depends on a ".NET only" assembly
it is not portable.
 

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