Shared DLL

G

Guest

I am trying to create a .NET DLL that is shared between the Cf and the desktop .net application. It contains code to persist/read data via stream reader/writer. I have created the new project with the code formerly duplicated between the two apps and the code builds fine. However, when I add a reference to the CF project, I get the following error:

Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=969db8053d3322ac' in project 'Mscan' cannot be copied to the run directory because it would conflict with dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

???? Is there a way to do a DLL shared between the desktop and the CF?
 
T

Tim Wilson

If you build the assembly against the Compact Framework then it will be
marked as "retargetable" so that you may reference it from the desktop as
well.

--
Tim Wilson
..Net Compact Framework MVP

garrick said:
I am trying to create a .NET DLL that is shared between the Cf and the
desktop .net application. It contains code to persist/read data via stream
reader/writer. I have created the new project with the code formerly
duplicated between the two apps and the code builds fine. However, when I
add a reference to the CF project, I get the following error:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' in project 'Mscan' cannot be copied to the
run directory because it would conflict with dependency 'mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
 
G

Guest

How do I build against the CF? I see only .NET as a build platform. I am using .net 1.1 and I am able to build smart device apps. Is there something else that I need to do have a CF fully installed?
 
C

Chris Tacke, eMVP

Use a Smart Device Class Library project (use change the command-line
compile to use the CF).

-Chris


garrick said:
How do I build against the CF? I see only .NET as a build platform. I am
using .net 1.1 and I am able to build smart device apps. Is there something
else that I need to do have a CF fully installed?
 
E

Ed Kaim [MSFT]

In Visual Studio it's at File | New | Project. Choose "Smart Device
Application", which will run a wizard. This wizard provides the option of
"Class Library", which can be built to run on the device and desktop in
binary form, assuming you only use stuff each can access at runtime. An
example of something they don't share is the SQl CE libraries.

garrick said:
How do I build against the CF? I see only .NET as a build platform. I am
using .net 1.1 and I am able to build smart device apps. Is there something
else that I need to do have a CF fully installed?
 

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

Similar Threads


Top