Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Common library target choice


Best Answer Emilio x64, 25 July 2013 - 10:44 PM

Just found out it is not possible. If you reference a uF common library from the emulator you get this error:

Warning	1	The project 'CommonLibrary' cannot be referenced. The referenced project is targeted to a different framework family (.NETMicroFramework)	MyDeviceEmulator

so the problem remains how to share certain data types (interfaces, classes, structs) that are common to both the emulator and the uF application taking into consideration that the common library should behave the same (some methods such as ToString are implemented differently in the frameworks) and compile under both frameworks. Pity...

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 24 July 2013 - 07:53 PM

Since I don't have a device yet and it is good for early prototyping, I am using a custom emulator for my project for the time being. As we all know (I recently only...) the Device Emulator project is targeted to the standard .NET framework (v4.5).

 

My actual application is a .NET Microframework v4.3 project with ".NET Microframework 4.3" as the target. So far so good...

 

Now, since for the configuration of both applications I need things like pin numbers and perhaps a few interface definitions, rather than duplicating them in both the uF console app and the .NET device emulator project, I thought a common library project would be more suitable to share those things I mentioned.

 

My question is... such "common library" project to be used with both the Device Emulator project AND the uF Console Application should be targetted at the uF (the lowest denominator) or is this approach just not possible?



#2 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 25 July 2013 - 10:44 PM   Best Answer

Just found out it is not possible. If you reference a uF common library from the emulator you get this error:

Warning	1	The project 'CommonLibrary' cannot be referenced. The referenced project is targeted to a different framework family (.NETMicroFramework)	MyDeviceEmulator

so the problem remains how to share certain data types (interfaces, classes, structs) that are common to both the emulator and the uF application taking into consideration that the common library should behave the same (some methods such as ToString are implemented differently in the frameworks) and compile under both frameworks. Pity...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.