DLL Files with Build Action Content not deployed


Michael Lang

Hi guys...

I'm using Visual Studio 2003 with the Smartphone 2003 SDK installed. In
both a Pocket PC and Smartphone solutions I have a DLL (native assembly)
which I'd like to deploy with my application. I've included the DLL in the
project and changed the build action to "content". Going by the build log it
appears to copy the native DLL when the application is deployed, however
when I inspect the device (or emulator) the DLL content files are missing.
Also attempts to call native methods from these assemblies gives missing
method exceptions. If I manually copy the dll files it works fine...

I've tried including other types of files (other than DLL's) and it seems to
copy fine.

Has anyone else experienced this problem ?

Is there a fix or work around for it ?

Thanks in advance

Michael Lang



Peter Foot [MVP]

How are you checking that the file is present? By default File Explorer on
Pocket PC won't show dll files (Tap and hold and select show all files).
Also be aware that with VS2003 the emulator is X86 based and therefore
requires a different build of your native dll from a real device (which will
be ARM based). MissingMethodException is a common symptom of calling a dll
built for the wrong CPU architecture.




Michael Lang

Hey Peter...

Thanks for the feedback, you were actually correct, I didn't actually know
how to get the explorer in the Pocket PC to view all files. It turns out it
was copying the DLL, I was receiving the missing method exceptions as I was
compiling the EVC withour the Pocket PC SDK being installed.

For my smartphone solution however it's a different story. I've determined
that it is only copying content files in the Startup Project, content files
in any other project in my solution are not being copied to the device. So
the workaround is to only put content in the Startup Project.



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