Shared DLL

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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'.
 
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?
 
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?
 
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?
 
Back
Top