how to determine if my component will work under CP

  • Thread starter Thread starter David
  • Start date Start date
D

David

Do you know a software that determine if a particular assembly will run or
not under .net compact framework?

Thanks a lot
 
Something to check all referenced classes and method or properties invoked
and determine if is available in the .net compact framework

For example (just for example):

Class Available in CF
System.Net Yes
System.Reflection No

etc
 
Like Ginny said there isn't one... what is your specific scenario?

If you have the source code for this assembly just add the code files to a
CF project and check the compiler errors.

If you don't have the source then
i) you either have a desktop assembly in which case it will not work on a CE
device regardless of what it uses internally..
ii) you have a CF assembly in which case your question is moot
iii) You don't know what it was built against so just open it in ILDASM and
look at the manifest (if you see a bunch of "retargetable" strings it's CF,
otherwise it's not)

Any more responses would be guessing at what the real question is...

Cheers
Daniel
 
David,

As Daniel pointed out, the compiler will generally catch missing methods if
you have the source. What it won't necessarily catch until you test it is
the situation where a method is there but just doesn't do anything useful or
just throws a NotSupportedException at runtime. I have also heard a request
for the Managed C++ compiler to warn if code won't work on the Compact
Framework with a special compiler switch. Managed C++ isn't really supported
for the Compact Framework, but it does mostly work. Anyway, I wondered if
that is the direction you're thinking.

--
Ginny Caughey
..Net Compact Framework MVP
 
Yes, I have the source code, but is done with the .Net Framework 1.1 (Visual
Studio .Net 2003)

How Can I in the same project convert to CF project? In order to check if
the assembly compile successul or not.


I am very new in CF programming so, sorry if I am making stupid questions.

Thanks
 
Simple. If you created it as a CF component, it will, if not it won't.
Full framework assemblies are not retargetable.

-Chris
 
Create a new CF project, add your source files, hit F5. If it compiles,
you're good, if not, start at the top of the to-do list. Honestly that's
the best way.

-Chris
 
Back
Top