Error using OpenNetCF

M

Michael Lahrkamp

I've added the reference and get the following:
Error: The dependency 'mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac' in project 'MyApp' cannot be copied to the
run directory because it would conflict with dependency 'mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I need ideas.

Thanks,
Mike
 
P

Paul G. Tobey [eMVP]

It sounds as though you have a reference to the *desktop* mscorelib in your
project. The smart device application support in VS.NET won't let you copy
that (it wouldn't make sense to copy the desktop stuff to your PPC device).
You need to change the reference so that it refers to the .NET CF mscorelib.
The one that you want is probably in a folder something like:

C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\MSCorLib.dll

If you select MSCorLib in your list of references in the project and display
the properties, this should show up in the Path property. If it's not a
reference to the CompactFrameworkSDK, delete the MSCorLib reference and add
a new one pointing to the CompactFrameworkSDK.

Most likely, this occurred when you generated MyApp because, perhaps, you
didn't select Smart Device Application as the project type.

Paul T.
 
M

Michael Lahrkamp

Thanks for the suggestion.

The problem only happens when I reference OpenNETCF in the app. Otherwise,
the application compiles, launches and runs on a Pocket PC just fine.

Any other thoughts?

Mike
 
P

Paul G. Tobey [eMVP]

This is with the SDF or some other build of it that you did from the source?
It's quite possible that a "Class Library" build was set up, which would
reference the desktop library, rather than a "Smart Device Application"
build with the "Class Library" configuration to reference the CF.

Paul T.
 
A

Art

1. delete the OpenNetCF and mscorlib reference in your project.
2. add the mscorlib reference in your project.
3. then add the OpenNetCF reference in your project.
that should be fine.
 
N

Neil Cowburn [MVP]

This is a known problem that only occurs with the VB .NET Smart Device
project template.

Remedy: make sure you reference mscorlib before you add any OpenNETCF
controls or references. Alternatively, use the OpenNETCF project template
and everything will be fine :)
 

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