CF V2 Runtime

  • Thread starter Thread starter Joseph Byrns
  • Start date Start date
J

Joseph Byrns

I have installed Version 2 of the CF on a 2003 device. I am now trying to
run a V1 application on the device, and to this end I have added a config
file to the application folder as such:

<configuration>
<startup>
<supportedRuntime version="v2.0.5056"/>
</startup>
</configuration>

<runtime>
<compatibilityversion major="2" minor="0"/>
</runtime>

my application is called test-one.exe
and the config file I have named test-one.exe.config

How do I know the application is using the V2 CF? When I do a:
 
As I was saying, when I do a:

MessageBox.Show(System.Environment.Version.ToString)


I get a response telling me it is version 1.
 
First check that your CF 2.0 deployment worked. Browse to the Windows
directory on the PPC and run cgacutil.exe. Does it show both cf versions
[2.0.x.0, 1.0.x.0]? In addition, if you run on the device a CF 2.0 app, what
does the Version in the messagebox show for that?

Now, if the above has confirmed that cf 2.0 works fine, make sure your
config file is correct. At the top of the file you should have:
<?xml version="1.0" encoding="utf-8" ?>

Also if you are using the optional <runtime> element, you should also place
that under the <configuration> tag at the same level as the startup... and
not on its own.

Obviously, make sure you are deploying the config file to the target...
verify it exists at the same directory as your exe...

If you are still having problems, try a more sensible exe name without any
dashes in it (although I really doubt that is the problem).

Cheers
Daniel
 
Success, I had the runtime as a separate element (not within configuration),
obvious when you know how.

Thanks.


Daniel Moth said:
First check that your CF 2.0 deployment worked. Browse to the Windows
directory on the PPC and run cgacutil.exe. Does it show both cf versions
[2.0.x.0, 1.0.x.0]? In addition, if you run on the device a CF 2.0 app,
what does the Version in the messagebox show for that?

Now, if the above has confirmed that cf 2.0 works fine, make sure your
config file is correct. At the top of the file you should have:
<?xml version="1.0" encoding="utf-8" ?>

Also if you are using the optional <runtime> element, you should also
place that under the <configuration> tag at the same level as the
startup... and not on its own.

Obviously, make sure you are deploying the config file to the target...
verify it exists at the same directory as your exe...

If you are still having problems, try a more sensible exe name without any
dashes in it (although I really doubt that is the problem).

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

Joseph Byrns said:
As I was saying, when I do a:

MessageBox.Show(System.Environment.Version.ToString)


I get a response telling me it is version 1.
 
Back
Top