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

A problem with VS Express for C#


Best Answer Kenny1234, 22 February 2014 - 08:50 PM

Hi again Chris,

I solved the last problem. It appears the version of the .NET Micro Framework was not compatible with the Netduino I'm was using. For anyone else that may have this problem this is what I did. While my project was loaded into VS 2012, I clicked the Project menu and opened Properties at the bottom of the list. If you're not on the Application page then click Application on the left side of your screen. On this page go to Target Framework and click the down arrow. A drop down list appears. I clicked .NET Micro Framework 4.1. The .NET Micro Framework was defaulted to 4.2.  Then I closed Visual Studio Express 2012 and restarted it again.  Reopen my project and clicked the Start button which is the same as pressing the F5 key on VS 2010.  It compiled and uploaded to the Netduino board and the onboard LED started blinking. Finally everything works! Thank you again Chris for helping me with this problem. As I asked in a previous post, which one of us is supposed to click the "Mark Solved" button.

Go to the full post


  • Please log in to reply
24 replies to this topic

#1 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 17 February 2014 - 04:04 AM

I recently purchased a "Getting Started with Netduino Kit". I'm installing the software on my Windows 7, 64-bit computer. I installed Visual Studio Express for C#, then the .NET framework, and finally the Netduino SDK.. When I plug the Netduino into the USB port, the computer acknowledges it and loads in the drivers. But when I start the VS Express application and click New Project, and select Visual C#> Micro Framework, there is no option for me to select the Netduino Application. This is supposed to be the easy part and I can't get past this. What am I doing wrong?



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 February 2014 - 05:02 AM

Hi Kenny1234, Which version of Visual Studio did you install? Do the .NET Micro Framework templates appear (.NET MF Console Application, etc.)? Welcome to the Netduino community, Chris

#3 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 17 February 2014 - 06:19 PM

Hi Chris, thanks for replying. I installed the VS Express 2010 for C#.  The templates available are:

 

Windows Forms Application

WPF Application

Console Application

Class Library

WPF Browser

Empty Project

 

According to the "Getting Started With Netduino" book, there should be a template called "Netduino Application". But it's not there.



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 February 2014 - 06:46 PM

Hi Kenny, Please try uninstalling the Netduino SDK and then re-installing it. Install the SDK linked directly from the "32-bit" or "64-bit" link in the top-left section of this page: http://www.netduino.com/downloads/ Be sure to close all copies of Visual Studio 2010 before installing the SDK. After the SDK is installed, go ahead and open back up VS 2010. Does that get you up and running? Chris

#5 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 17 February 2014 - 09:46 PM

I uninstalled the Netduino SDK and then reinstalled it using the link you posted and it's still not working. It still shows the same six templates but not the "Netduino Application" template. Before I started the VS Express 2010 for C# software, I first plugged in the Netduino into the USB port. I verified in Device Manager that it was acknowledged and I also saw that Windows had installed the device drivers. But it had to search online for them. Didn't the Netduino SDK install the drivers? Windows shouldn't have had to search for them.



#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 February 2014 - 11:07 PM

Hi Kenny1234, The drivers aren't available online; they should have been installed with the SDK. If you check the following folder, do you see the Netduino drivers? "C:Program FilesSecret LabsNetduino SDKDrivers" And the Netduino assemblies in this folder (remove the " (x86)" if you're on 32-bit Windows)? "C:Program Files (x86)Secret LabsNetduino SDKAssemblies" To look for the templates, search for "NetduinoApplication.zip" inside: "C:Program Files (x86)Microsoft Visual Studio 10.0" You should see the ZIP file in an a "ProjectTemplates" folder and also in a "ProjectTemplatesCache" folder. What folders are they in? Chris P.S. If you're using Visual Studio Express, the easiest way to fix this may be to install Visual Studio 2012 Express for Windows Desktop...and then install the VS2012 SDK from the Downloads page instead (after removing the NETMF and Netduino SDKs from your PC). If you do that, just be sure to change the "Target Framework" on your board to match the .NET MF 4.2 runtime on your devices, instead of the 4.3 that it defaults to.

#7 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 18 February 2014 - 05:39 AM

Now we're getting somewhere.  I checked the directories in C:Program Files (x86)Secret LabsNetduino SDK folder and it contains both the Drivers and Assemblies folders.  The Drivers folder contains two other folders named MFUSB and WINUSB.  The Assemblies folder contains two folders named v4.1 and v4.2.  Then I checked the folder C:Program Files (x86)Microsoft Visual Studio 10.0  and did not find the NetduinoApplication.zip file.  There is a folder called Common7 that contains a folder called IDE which contains both the ProjectTemplates and ProjectTemplatesCache folders.  The ProjestTemplates folder contains a CSharp folder that has a Micro Framework folder in it that contains the following folders:

 

ClassLibrary

ConsoleApllication

Emulator

WindowApplication

 

The ProjectTemplateCache folder contains a CSharp folder that contains a Micro Framework folder that contains the following .zip folders:

 

ClassLibray.zip

ConsoleApplication.zip

Emulator.zip

WindowApplication.zip

 

The NetduinoApplicatio.zip file is nowhere to be found.



#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 February 2014 - 05:43 AM

Hi Kenny, Hmm, it sounds like something in your installation is throwing off the installer. I'd recommend either "uniextracting" the installer and then copying the template files into that folder manually (and then running visual c# from the command-line with the "update templates" command-line argument). Or...use VS2012 Express instead. Chris

#9 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 18 February 2014 - 05:52 AM

Chris, I also have Visual Studio Express 2013 on this computer. Is it possible that having two different versions of VS Express are causing a conflict?  Should I delete the 2013 version and then try uninstalling and reinstalling the Netduino SDK?



#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 February 2014 - 07:31 AM

Hi Kenny, It's unlikely that VS2013 Express is causing a conflict. I'd recommend either "uniextracting" the installer and then copying the template files into that folder manually (and then running visual c# from the command-line with the "update templates" command-line argument). Or...use VS2012 Express instead. Chris

#11 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 18 February 2014 - 06:17 PM

I think I found the problem but I don't know how to correct it.  First I went into Command Prompt in the c: directory and did a system wide search for the folder NetduinoApllication.zip  and I found it in my Documents folder in the VS 2010 folder. All the files and folders you're talking about are there.  But the executable file that starts VS Express 2010 is not in any folders in in the VS Express that's in my documents folder. But that executable file is in the copy of VS Express 2010 that's in the Program Files (x86) folder. Now how can I merge these two copies to get all the files and folders where they belong?



#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 February 2014 - 09:13 PM

Hi Kenny1234, Your Netduino templates should have been installed into a folder such as: ...DocumentsVisual Studio 2010TemplatesProjectTemplatesVisual C#Micro Framework If your computer uses a different setup for template folder locations, find the alternative "ProjectTemplates" folder on your computer. Copy the Netduino .ZIP templates to that folder. Then open up a command-prompt with Administrator privileges and run this command on your Visual C# IDE: "devenv /installvstemplates" Alternatively, you may consider using VS2012 Express instead and installing the new 4.3 SDK. P.S. Once you get this installed, you will need to add the SecretLabs.NETMF.Hardware.AnalogInput.dll and SecretLabs.NETMF.Hardware.PWM.dll references to your project (for the code samples from the book). Chris

#13 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 19 February 2014 - 01:10 AM

I think your second option is better.  Before I download the VS 2012 Express, should I uninstall the 2010 version first? Do I also have to reinstall the Netduino SDK?  Also where do I find the SecretLabs.NETMF.Hardware.Analoginput.dll  and  the SecretLabs.NETMF.Hardware.PWM.dll  files?



#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 February 2014 - 02:44 AM

Hi Kenny,

I think your second option is better.  Before I download the VS 2012 Express, should I uninstall the 2010 version first? Do I also have to reinstall the Netduino SDK?  Also where do I find the SecretLabs.NETMF.Hardware.Analoginput.dll  and  the SecretLabs.NETMF.Hardware.PWM.dll  files?

You don't need to uninstall VS 2010 Express. But you will want to uninstall the NETMF SDK before upgrading. The two DLL files will be registered globally, so you can just right-clock on your project and "Add Reference..." and they'll be in the ".NET Components" list. You can also manually add them as references from the Program Files folder. Chris

#15 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 19 February 2014 - 02:12 PM

How do I uninstall the NETMF SDK?  Can I use "Add/Remove Programs" in Control Panel?



#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 February 2014 - 11:12 PM

How do I uninstall the NETMF SDK?  Can I use "Add/Remove Programs" in Control Panel?

Yes. All three installers (Visual Studio, NETMF SDK and Netduino SDK) put their "uninstall" entries there. Chris

#17 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 20 February 2014 - 09:38 PM

Hi again Chris,

These are the only programs that I can find in "Add/Remove Programs" in Control Panel.

I don't see the NETMK SDK in the list. Are these the only programs that I should remove?

 

Netduino SDK v4.22 (January 2013)

Microsoft Visual Studio 2010 ADO.NET Entity Framework Tool

Microsoft Visual Studio 2010 Express Prerequisite x64 - ENU

Microsoft Visual Studio 2010 Shell (Isolated) - ENU



#18 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 February 2014 - 11:30 PM

Hi Kenny,

These are the only programs that I can find in "Add/Remove Programs" in Control Panel. I don't see the NETMK SDK in the list. Are these the only programs that I should remove?   Netduino SDK v4.22 (January 2013)

Uninstall the following, before installing the new SDKs: "Netduino SDK" (any installed versions) "Microsoft .NET Micro Framework SDK" (any installed versions) Please note that "Microsoft .NET Micro Framework" comes later in the alphabet than "Microsoft .NET Framework" (the desktop version that's also on your computer). If you can't find it in the list, you can always re-run the original installer and choose "uninstall/remove". Chris

#19 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 21 February 2014 - 04:24 PM

Hi Chris,

I uninstalled everything. Do you have the link to the Visual Studio 2012 Express for C#?  Do I also have to install it in a certain order?



#20 Kenny1234

Kenny1234

    Member

  • Members
  • PipPip
  • 14 posts
  • LocationLong Island, NY

Posted 21 February 2014 - 09:21 PM

Hi Chris,

I found the VS 2012 download in the previous link you sent me. When I click on download, it gives me a choice of two files to download. They are wdexpress_full.exe  or  VS2012_WDX_ENU.iso. Which one should I choose?






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.