How to redistribute OPENNETCF

S

SoftGal

Hi,
After a hard reset & re-installing .NET CF I got an error when I tried to
run my program setup:

TypeLoadException
Could not load type
OPENNETCF.Security.Cryptography.Rijndael from assembly OPENNETCF Version =
....

What is the best way to include this file in my setup application without
having to ask the user to install it themselves?

TIA
 
S

SoftGal

I will try to be more specific now:

I have found some instructions to create a setup app to install my CF app.
The setup runs fine, but when I click to run the app on the device I get the
error "Could not load type" and mentions one of the opennetcf classes.

The device is a Pocket PC Version 3.0 , cleared after a hard-reset, and only
loaded with the .NET CF.

If I copy the file OpenNETCF.dll into my application folder on the device
the application runs fine.

So how do I include OpenNETCF.dll in the setup app? I have it referenced in
my application, set it to "Copy Local" but the setup program does not copy
the dll to the application folder. Please help me, I know the solution is
probably easy, but I am having some trouble figuring out.

Thanks!
 
S

SoftGal

Now I'm going to download 1.4 because 1.3 that I'm using from what I've read
is buggy ???

Forgive my ignorance, but now just another question: If I have the
assemblies binaries, why would I need to download the cabs? Do I need to
include the cabs in the setup? What is the difference between the deployment
cabs and the compiled assemblies?

Thanks!
 
P

Peter Foot [MVP]

When you install the SDF it hooks into Visual Studio so that when you add a
reference to one of the OpenNETCF.* dlls it will mark the Opennetcf cab file
as a pre-requisite. Therefore you should install the appropriate OpenNETCF
cab for your device which will GAC register the dlls. You should definitely
use v1.4 as v1.3 had a number of deployment issues
You may also decide you don't want to deploy the entire SDF but just deploy
a single dll, in this case you can edit the .inf file generated for your cab
file to manually add the appropriate dll(s) to your program folder. If you
are not sure how to do this it would be easier to stick with using the ready
made cab alongside your own app cab file.

Peter
 
S

SoftGal

Peter,
I'm not sure if I'm doing this right. Documentation is very scarce on set
ups.
This is what I've done:
I've created a second ini file, opennetf.ini
This is the contents of opennetf.ini :
[CEAppManager]
Version = 1.0
Component = OpenNetCF

[OpenNetCF]
Description = OpenNetCF
CabFiles =
OpenNETCF.SDF.wce4.armv4.cab,OpenNETCF.SDF.ppc3.arm.cab,OpenNETCF.SDF.ppc3.armv4.cab,OpenNETCF.SDF.wce4.arm.cab

I've added the cabs and .opennetf.ini to the Setup Files (same folder as
the app cabs)

and I've changed the Pre-Install Code to add this INI file as parameter as
well.

I've turned on message reporting.
Messages report both INI files are found.
I'm getting an error message during installation:
"Could not find section "[OpenNetCF]", key "CabFiles"

But my opennetf.ini file looks right. Am I missing something?

The OpenNetCF cab is not installed, still getting the same old error.

Please help! I can't find any samples of setups with the OpenNetCF!
 
N

Norbert

I'm using VS2005 beta2
to install the Opennetcf, i simply add the needed DLL to the
dependecies

You don't normaly don't need the whole Framework.
If you only use the security namespace it is enough to include the
opennetcf.dll
(it helps making your application smaller :) )
 
S

SoftGal

I'm using VS 2003. I have 3 projects in my setup: CustomerInstaller, MyApp
(with a Reference to OPENETCF, and Setup project, which has list of
"Detected Dependencies" and has a file, "dotnetfxredist_x86.msm", but I
can't add anything to this list.
I'm really stuck right now.
Maybe if I upgrade to 2005 it would make things easier then. I will use this
as last resource.
 
S

SoftGal

Does anybody have a sample setup project that includes the OPENNETCF?
Pleaset let me know. That would really help.
Thank you.
 
S

SoftGal

I finally was able to get it to work. I am not sure what I did that solved
my problem because I've messed with my setup project so much now. Some
things I did: I removed the opennetcf.dll from the list of files, & added a
search path to the setup properties, also unchecked assembly "copy to
local".
If I find out what helped I will post to this thread.
Thanks!
 

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

Top