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

Dlls - Are they a" No No"?


  • Please log in to reply
10 replies to this topic

#1 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 26 November 2010 - 10:53 PM

I tried to compile a DLL of my Charlieplexing class. I used the Class Library template in VS to do that. But the Netduino App refused to acknowledge that my added reference to that DLL existed. I wasn't able to use the DLL! Is this something that can be done but I am doing it wrong? If not can this be supported in the future?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 12:53 AM

Hi Omar, It should work; we use DLLs all the time (like the SecretLabs.NETMF.Hardware.dll that's included in your Netduino projects). Two quick things: 1. Be sure to include the DLL in the main folder (not in the LE or BE folders). 2. After you add the DLL, be sure to include its name in a "using" statement at the top of your code files (or use the full namespace references to your class). Chris

#3 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 27 November 2010 - 01:03 AM

2. After you add the DLL, be sure to include its name in a "using" statement at the top of your code files (or use the full namespace references to your class).
Chris


Thats what I had issues with, it would let me do 'using blah' I would type it, but it wouldn't accept it.

#4 Corey Kosak

Corey Kosak

    Advanced Member

  • Members
  • PipPipPip
  • 276 posts
  • LocationHoboken, NJ

Posted 27 November 2010 - 01:04 AM

Is this something that can be done but I am doing it wrong?


"Works for me", so I think you're doing it wrong :wacko:. Can you post more information about what you tried, or perhaps a zip file of your solution?

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:09 AM

Thats what I had issues with, it would let me do 'using blah' I would type it, but it wouldn't accept it.


Can you take a screenshot to show us what you're experiencing?

Chris

#6 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 27 November 2010 - 01:12 AM

"Works for me", so I think you're doing it wrong :wacko:. Can you post more information about what you tried, or perhaps a zip file of your solution?

Here is my DLL project: Attached File  CharliePlex3Pins.zip   83.63KB   2 downloads Can you check if you can add a reference to it in a project?

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:18 AM

Omar, The project you've created is a .NET (desktop) class library, not a .NET Micro Framework class library. If you re-create the project as a .NET Micro Framework class library, it should work well for you... [The problem is that the .NET MF libraries need to target a specific version of the .NET Micro Framework--which this libary doesn't.] Chris

#8 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 27 November 2010 - 01:23 AM

Omar,

The project you've created is a .NET (desktop) class library, not a .NET Micro Framework class library.

If you re-create the project as a .NET Micro Framework class library, it should work well for you...

[The problem is that the .NET MF libraries need to target a specific version of the .NET Micro Framework--which this libary doesn't.]

Chris

Well I can't trust my eyes anymore. I had checked if there was a class library in the Micro framework and I didn't see it, so I moved on and tried it with the regular .net framework class library. and I looked now, and see the .NET MF one... it must be all that turkey :) on a side note, it surprised me that no one posted a little "happy thanksgiving" post.

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:49 AM

Well I can't trust my eyes anymore. I had checked if there was a class library in the Micro framework and I didn't see it, so I moved on and tried it with the regular .net framework class library. and I looked now, and see the .NET MF one... it must be all that turkey :) on a side note, it surprised me that no one posted a little "happy thanksgiving" post.


Happy Thanksgiving, Omar :)

[We have a pretty international crowd here.]

Chris

#10 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 27 November 2010 - 02:24 AM

Happy Thanksgiving, Omar :)

[We have a pretty international crowd here.]

Chris

Same to you! I hope you had a nice day. I know right? This forum is full of different nationalities, it's really cool. :)

#11 segu

segu

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts
  • LocationLima - Peru

Posted 27 November 2010 - 06:14 PM

it must be all that turkey :)


We have your "turkey problem" by Christmas day :huh:

Regards :)




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.