I have a smart device class library and I have Smart Device application
project that uses the library. I also want to have a regular .NET
desktop application that uses the same library for testing and
debugging. However, when the Desktop application references the Smart
Device class library I get the following warning: "Adding a reference to
a device project may produce unexpected results". Is there a better
approach for reusing the same C# files in a mobile and desktop
application. Should I forget the class library and just add the common
C# classes as linked files to both my mobile and desktop projects?

RE: Adding a reference to a device project may produce unexpected resu by dbgrick

dbgrick
Wed May 16 18:36:00 CDT 2007

Doug,
I've faced the same issue before. THe way I got around it was to create two
seperate dll projects. One for Smart Device and the other for desktop.
Create all of the files in the smart device project and then add them as
references to the desktop project. You can then reference the appropriate
project and all should be well.

Rick D.
Contractor

"Doug Crawford" wrote:

> I have a smart device class library and I have Smart Device application
> project that uses the library. I also want to have a regular .NET
> desktop application that uses the same library for testing and
> debugging. However, when the Desktop application references the Smart
> Device class library I get the following warning: "Adding a reference to
> a device project may produce unexpected results". Is there a better
> approach for reusing the same C# files in a mobile and desktop
> application. Should I forget the class library and just add the common
> C# classes as linked files to both my mobile and desktop projects?
>

Re: Adding a reference to a device project may produce unexpected resu by Daniel

Daniel
Thu May 17 04:46:17 CDT 2007

FYI, both of these approaches work for the scenario described. I have
captured them here
http://www.danielmoth.com/Blog/2004/09/retargetable-256.html
http://www.danielmoth.com/Blog/2004/09/share-code-if-fullframe_17.html:

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

"dbgrick" <dbgrick@discussions.microsoft.com> wrote in message
news:92EA9EF7-B910-4798-A30B-2E6C4A85E27E@microsoft.com...
> Doug,
> I've faced the same issue before. THe way I got around it was to create
> two
> seperate dll projects. One for Smart Device and the other for desktop.
> Create all of the files in the smart device project and then add them as
> references to the desktop project. You can then reference the appropriate
> project and all should be well.
>
> Rick D.
> Contractor
>
> "Doug Crawford" wrote:
>
>> I have a smart device class library and I have Smart Device application
>> project that uses the library. I also want to have a regular .NET
>> desktop application that uses the same library for testing and
>> debugging. However, when the Desktop application references the Smart
>> Device class library I get the following warning: "Adding a reference to
>> a device project may produce unexpected results". Is there a better
>> approach for reusing the same C# files in a mobile and desktop
>> application. Should I forget the class library and just add the common
>> C# classes as linked files to both my mobile and desktop projects?
>>