PC Review


Reply
Thread Tools Rate Thread

Add reference to exe in Compact Framework?

 
 
Jimmy A
Guest
Posts: n/a
 
      16th Sep 2003
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?
 
Reply With Quote
 
 
 
 
Benjamin Wulfe
Guest
Posts: n/a
 
      17th Sep 2003
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 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: <(E-Mail Removed)>
| 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: groups-(E-Mail 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?
|

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Compact Framework Class Reference Rob H Microsoft Dot NET Compact Framework 1 16th Dec 2003 09:23 PM
Pass a structure by reference to C++ dll in .Net Compact Framework Maloney Microsoft C# .NET 2 3rd Oct 2003 02:41 AM
Pass a structure by reference to C++ dll in .Net Compact Framework Maloney Microsoft Dot NET Compact Framework 2 3rd Oct 2003 02:41 AM
Microsoft® .NET Compact Framework (Core Reference) Gary Desrosiers Microsoft Dot NET Compact Framework 1 27th Aug 2003 03:13 AM
Microsoft .NET Compact Framework (Core Reference) - Your opinion? Victor Microsoft Dot NET Compact Framework 5 7th Aug 2003 03:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 PM.