PC Review


Reply
Thread Tools Rate Thread

DLL Files with Build Action Content not deployed

 
 
Michael Lang
Guest
Posts: n/a
 
      20th Dec 2005
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


 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      20th Dec 2005
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.

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

"Michael Lang" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Michael Lang
Guest
Posts: n/a
 
      23rd Dec 2005
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.

Thanks...

Michael

"Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.peterfoot.net | www.inthehand.com
>
> "Michael Lang" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy content files to build direcotry in VB.NET? Samuel R. Neff Microsoft VB .NET 1 14th Apr 2005 04:40 PM
How to reference "content" build action file? Brett Microsoft VB .NET 0 11th Feb 2005 04:41 PM
Build Action = None Peter B Microsoft Dot NET Compact Framework 1 12th Mar 2004 12:34 PM
How to rename of build/deployed application filename and extension Mullin Yu Microsoft C# .NET 3 2nd Mar 2004 10:05 AM
Howto copy content files to build directory dansan Microsoft Dot NET Framework 4 6th Oct 2003 03:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 PM.