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

Multiple projects in solution targeting Netduino


  • Please log in to reply
7 replies to this topic

#1 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 December 2010 - 04:33 AM

FYI....I've been having problems deploying to the Netduino when there are multiple projects (i.e. .csproj) in a solution (i.e. .sln) that are set to target the Netduino device. If I set the project that I am working on to target the Netduino device and set the other projects to target the emulator, then the deploy will work quickly and reliably. This has been my experience...I hope it helps someone else avoid some 'hair pulling'.

#2 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 16 December 2010 - 05:04 AM

FYI....I've been having problems deploying to the Netduino when there are multiple projects (i.e. .csproj) in a solution (i.e. .sln) that are set to target the Netduino device.

If I set the project that I am working on to target the Netduino device and set the other projects to target the emulator, then the deploy will work quickly and reliably.

This has been my experience...I hope it helps someone else avoid some 'hair pulling'.


Did you try specifying a single project as the startup project?

#3 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 December 2010 - 03:41 PM

Yes. It does this by default, no?

#4 Joe Griffith

Joe Griffith

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 16 December 2010 - 08:21 PM

I have a solution with three projects and have never had any problems deploying it. One is a Netduino project and the other two are micro framework class libraries.

#5 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 December 2010 - 09:14 PM

Multiple projects alone is not a problem. The problem (as I see it) is with multiple projects that target the device. Try it with more than one Netduino project (i.e. not a class library). Have both Netduino projects target the device. They should compile successfully, but if you try to deploy one of them, it won't deploy (in my experience).

#6 Sean

Sean

    New Member

  • Members
  • Pip
  • 2 posts

Posted 16 December 2010 - 09:38 PM

I have been successful with multiple projects all targeting micro framework devices. The trick is selecting which to deploy, and which is the default project when you are debugging.

So - for example, here is a solution I have with a bunch of projects in it. The trick is to deploy only one of them - otherwise, they stomp on each other. To choose what gets built and what gets deployed, you use the Configuration Manager - which is accessible a couple of ways: From the Build... menu, and from the little "Dubug" drop-down on the toolbar. Here is a screen shot of mine:
Posted Image

Here you can see all the projects - but only PWM1 will get built and deployed to my Netduino.

The second trick, if you have multiple projects and you want to step into code, you must select the startup project. To do that, you right-click on the project in the Solution Explorer, and select "Set as Startup Project". Then, when you debug, and set a break point, it will start the project you expect :) Here is a screen shot of mine. Here you see the PWM1 project is in bold, because it is the Startup Project.
Posted Image

Hope that helps.

- Sean

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 December 2010 - 09:22 AM

FYI....I've been having problems deploying to the Netduino when there are multiple projects (i.e. .csproj) in a solution (i.e. .sln) that are set to target the Netduino device.

If I set the project that I am working on to target the Netduino device and set the other projects to target the emulator, then the deploy will work quickly and reliably.

This has been my experience...I hope it helps someone else avoid some 'hair pulling'.


Alfred,

Do you have a small solution that you could zip up and post here which demonstrates the issue? This might be something we can fix in the .NET MF SDK or take up with Microsoft as a potential improvement for the .NET MF 4.2 SDK.

Chris

#8 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 21 December 2010 - 02:38 PM

The trick is to deploy only one of them - otherwise, they stomp on each other. To choose what gets built and what gets deployed, you use the Configuration Manager - which is accessible a couple of ways: From the Build... menu, and from the little "Dubug" drop-down on the toolbar.

Hope that helps.

- Sean

Yes, it did help! Thanks for this information!




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.