(Apologies for cross post from smartphone newsgroup)

I have an application I've built that consists of 4 .Net CF Dll's and a
single .Net executable. The application uses a single configuration
file to drive the functionality. The configuration file is located
relative to the Assembly's installation location. I would like to be
able to install multiple instances of this code that are only
distinguished by their installation location. This does not appear to
work, as a TypeLoadException is thrown when one of the instances is
running and an attempt to start another instance occurs. Is this not
possible? If it is possible, what needs to be done to make it work
correctly? Changing the executable name does not appear to be enough.
What other options do I have?

Thanks,
Craig

Re: Two instances of the same .NetCF code? - TypeLoadException by ctacke/>

ctacke/>
Fri May 18 06:21:48 CDT 2007

I think we need more info on your deployment. There's no reason this
shouldn't work.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Craig Setera" <csete@nospam.mfoundry.com> wrote in message
news:O%23kIhtTmHHA.4552@TK2MSFTNGP05.phx.gbl...
> (Apologies for cross post from smartphone newsgroup)
>
> I have an application I've built that consists of 4 .Net CF Dll's and a
> single .Net executable. The application uses a single configuration file
> to drive the functionality. The configuration file is located relative to
> the Assembly's installation location. I would like to be able to install
> multiple instances of this code that are only distinguished by their
> installation location. This does not appear to work, as a
> TypeLoadException is thrown when one of the instances is running and an
> attempt to start another instance occurs. Is this not possible? If it is
> possible, what needs to be done to make it work correctly? Changing the
> executable name does not appear to be enough. What other options do I
> have?
>
> Thanks,
> Craig



Re: Two instances of the same .NetCF code? - TypeLoadException by Craig

Craig
Fri May 18 10:00:28 CDT 2007

What kind of information would be helpful? I'm fairly new to .Net CF
(and .Net) development, so I apologize if this is something that should
be obvious.

Thanks,
Craig

<ctacke/> wrote:
> I think we need more info on your deployment. There's no reason this
> shouldn't work.
>
>

Re: Two instances of the same .NetCF code? - TypeLoadException by ctacke/>

ctacke/>
Fri May 18 10:31:02 CDT 2007

What files are getting deployed to what folders? Are there version
differences between the instances of the primary assembly or any of its
references (yours or the CF)? Are you installing anything in the GAC?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Craig Setera" <csete@nospam.mfoundry.com> wrote in message
news:eSfyG1VmHHA.3704@TK2MSFTNGP02.phx.gbl...
> What kind of information would be helpful? I'm fairly new to .Net CF (and
> .Net) development, so I apologize if this is something that should be
> obvious.
>
> Thanks,
> Craig
>
> <ctacke/> wrote:
>> I think we need more info on your deployment. There's no reason this
>> shouldn't work.
>>


Re: Two instances of the same .NetCF code? - TypeLoadException by Craig

Craig
Fri May 18 10:59:28 CDT 2007

Chris,

Things are pretty simple. This is a .Net CF 1.0 application to target
the largest base of devices. Let's say that we are packaging up
"myapp1". If so, we build an installable cab file that does the following:

- Creates \Program Files\myapp1 folder
- Adds MIDPBridge.dll to that folder
- Adds MJXCore.dll to that folder
- Adds mojax.exe to that folder
- Adds SmartDeviceFramework14.dll (a heavily trimmed version of SDF 1.4)
to that folder.
- Adds a launch shortcut for mojax.exe
- Adds a configuration file to that folder

When the process starts up, it uses the location of the Assembly to
locate the configuration file and uses that file to drive the
application. A different installation (for instance, myapp2) would be
installed in \Program Files\myapp2 directory but all of the executable
files would be the same with the same names, etc. I am not
(intentionally) installing anything into the GAC.

Thanks,
Craig

<ctacke/> wrote:
> What files are getting deployed to what folders? Are there version
> differences between the instances of the primary assembly or any of its
> references (yours or the CF)? Are you installing anything in the GAC?
>
>

Re: Two instances of the same .NetCF code? - TypeLoadException by Craig

Craig
Mon May 21 12:59:33 CDT 2007

Chris,

Any further thoughts on this?

Thanks,
Craig

Craig Setera wrote:
> Chris,
>
> Things are pretty simple. This is a .Net CF 1.0 application to target
> the largest base of devices. Let's say that we are packaging up
> "myapp1". If so, we build an installable cab file that does the following:
>
> - Creates \Program Files\myapp1 folder
> - Adds MIDPBridge.dll to that folder
> - Adds MJXCore.dll to that folder
> - Adds mojax.exe to that folder
> - Adds SmartDeviceFramework14.dll (a heavily trimmed version of SDF 1.4)
> to that folder.
> - Adds a launch shortcut for mojax.exe
> - Adds a configuration file to that folder
>
> When the process starts up, it uses the location of the Assembly to
> locate the configuration file and uses that file to drive the
> application. A different installation (for instance, myapp2) would be
> installed in \Program Files\myapp2 directory but all of the executable
> files would be the same with the same names, etc. I am not
> (intentionally) installing anything into the GAC.
>
> Thanks,
> Craig
>
> <ctacke/> wrote:
>> What files are getting deployed to what folders? Are there version
>> differences between the instances of the primary assembly or any of
>> its references (yours or the CF)? Are you installing anything in the
>> GAC?
>>
>>

Re: Two instances of the same .NetCF code? - TypeLoadException by ctacke/>

ctacke/>
Mon May 21 13:10:31 CDT 2007

What type is failing to load?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Craig Setera" <csete@nospam.mfoundry.com> wrote in message
news:OzGYNH9mHHA.960@TK2MSFTNGP03.phx.gbl...
> Chris,
>
> Any further thoughts on this?
>
> Thanks,
> Craig
>
> Craig Setera wrote:
>> Chris,
>>
>> Things are pretty simple. This is a .Net CF 1.0 application to target
>> the largest base of devices. Let's say that we are packaging up
>> "myapp1". If so, we build an installable cab file that does the
>> following:
>>
>> - Creates \Program Files\myapp1 folder
>> - Adds MIDPBridge.dll to that folder
>> - Adds MJXCore.dll to that folder
>> - Adds mojax.exe to that folder
>> - Adds SmartDeviceFramework14.dll (a heavily trimmed version of SDF 1.4)
>> to that folder.
>> - Adds a launch shortcut for mojax.exe
>> - Adds a configuration file to that folder
>>
>> When the process starts up, it uses the location of the Assembly to
>> locate the configuration file and uses that file to drive the
>> application. A different installation (for instance, myapp2) would be
>> installed in \Program Files\myapp2 directory but all of the executable
>> files would be the same with the same names, etc. I am not
>> (intentionally) installing anything into the GAC.
>>
>> Thanks,
>> Craig
>>
>> <ctacke/> wrote:
>>> What files are getting deployed to what folders? Are there version
>>> differences between the instances of the primary assembly or any of its
>>> references (yours or the CF)? Are you installing anything in the GAC?
>>>
>>>



Re: Two instances of the same .NetCF code? - TypeLoadException by Craig

Craig
Mon May 21 15:38:02 CDT 2007

OK. I'm an idiot. I'm still finding my way around this stuff.

Your question prompted me to realize that I should set a breakpoint on
TypeException to see what was going on. It turns out that one of my
classes is attempting to share a file on the file system and dying when
that doesn't work since the first instance is holding the lock.
Completely in my code, which at least makes it relatively easy to fix.

I have a couple of other questions that have come up, but I will put
them into separate threads with valid subjects.

Thanks so much for your help. Sorry to bother with such a idiotic
mistake on my part.

Thanks,
Craig

<ctacke/> wrote:
> What type is failing to load?
>
>

Re: Two instances of the same .NetCF code? - TypeLoadException by ctacke/>

ctacke/>
Mon May 21 15:42:05 CDT 2007

We were all newbies once.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


"Craig Setera" <csete@nospam.mfoundry.com> wrote in message
news:%239TOyf%23mHHA.4188@TK2MSFTNGP02.phx.gbl...
> OK. I'm an idiot. I'm still finding my way around this stuff.
>
> Your question prompted me to realize that I should set a breakpoint on
> TypeException to see what was going on. It turns out that one of my
> classes is attempting to share a file on the file system and dying when
> that doesn't work since the first instance is holding the lock. Completely
> in my code, which at least makes it relatively easy to fix.
>
> I have a couple of other questions that have come up, but I will put them
> into separate threads with valid subjects.
>
> Thanks so much for your help. Sorry to bother with such a idiotic mistake
> on my part.
>
> Thanks,
> Craig
>
> <ctacke/> wrote:
>> What type is failing to load?
>>