Add reference to exe in Compact Framework?

  • Thread starter Thread starter Jimmy A
  • Start date Start date
J

Jimmy A

I know your not suppose to be able to do this...but is there a
work-around in the Compact Framework. I was reading in another post
that you can manually edit the project file and get this to work, but
I am having no luck.

Here is my problem. Say you have a Pocket PC app (exe) and want to do
some Unit Testing on it from a separate assembly that works with a
Pocket PC NUnit port. I need a way to reference the exe that is
created to test some of the classes in it. I know only assemblies are
suppose to share code, but I think the devs are going to architect the
app to only be an exe.

BTW the fact that you can not ref an exe sucks, from what I have read
you can do this in Java AND its not a limitation of .NET, it's a
restriction imposed by VS. Apparently you can compile /r and this is
suppose to work, but thats not what I want to do?

Help?
 
Have you tried using Reflection to load the .exe and run your tests? It's
not as easy as simply referencing the exe, but you can create simple
wrappers around reflection calls that will make it easier to invoke
methods, etc.
Your unit test library could create a shadow version of the classes you
want to test -- but whose methods use reflection to call into the "real"
types in your device assembly. Outside of these shadow classes, the
individual tests would not know the difference between them and the read
types in the exe.

-Ben

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: (e-mail address removed) (Jimmy A)
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: Add reference to exe in Compact Framework?
| Date: 16 Sep 2003 11:05:55 -0700
| Organization: http://groups.google.com/
| Lines: 18
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 129.46.148.120
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1063735559 22077 127.0.0.1 (16 Sep 2003
18:05:59 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: 16 Sep 2003 18:05:59 GMT
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!ne
ws.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!postnews1.goo
gle.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:33503
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I know your not suppose to be able to do this...but is there a
| work-around in the Compact Framework. I was reading in another post
| that you can manually edit the project file and get this to work, but
| I am having no luck.
|
| Here is my problem. Say you have a Pocket PC app (exe) and want to do
| some Unit Testing on it from a separate assembly that works with a
| Pocket PC NUnit port. I need a way to reference the exe that is
| created to test some of the classes in it. I know only assemblies are
| suppose to share code, but I think the devs are going to architect the
| app to only be an exe.
|
| BTW the fact that you can not ref an exe sucks, from what I have read
| you can do this in Java AND its not a limitation of .NET, it's a
| restriction imposed by VS. Apparently you can compile /r and this is
| suppose to work, but thats not what I want to do?
|
| Help?
|
 
Back
Top