I am new to Netduino and am playing the NetduinoGo SDK in Visual Studio 2010 using the emulator.
I'm getting the following error -
An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.dll
My code is below -
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; namespace NetduinoGoApplication2 { public class Program { public static void Main() { // write your code here } } }
The exception is occurring in -
netduino_source\GoBus\GoHub.cs line 56
// enable our power output _powerEnable = new OutputPort((Cpu.Pin)0x0A, false);
The exception occurs if I have references to either SecretLabs.NETMF.Hardware.NetduinoGo or GoBus in my .csproj file.
My .csproj file is -
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <AssemblyName>NetduinoGoApplication2</AssemblyName> <OutputType>Exe</OutputType> <RootNamespace>NetduinoGoApplication2</RootNamespace> <ProjectTypeGuids>{b69e3092-b931-443c-abe7-7e7b65f2a37f};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{52D32E7B-9763-4645-AC56-C3220E9E327B}</ProjectGuid> <TargetFrameworkVersion>v4.2</TargetFrameworkVersion> <NetMfTargetsBaseDir Condition="'$(NetMfTargetsBaseDir)'==''">$(MSBuildExtensionsPath32)\Microsoft\.NET Micro Framework\</NetMfTargetsBaseDir> <DeployDevice>NetduinoGo</DeployDevice> <DeployTransport>USB</DeployTransport> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <Import Project="$(NetMfTargetsBaseDir)$(TargetFrameworkVersion)\CSharp.Targets" /> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Program.cs" /> </ItemGroup> <ItemGroup> <Reference Include="GoBus, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> <Reference Include="Microsoft.SPOT.Hardware" /> <Reference Include="Microsoft.SPOT.Hardware.PWM" /> <Reference Include="Microsoft.SPOT.Hardware.SerialPort" /> <Reference Include="Microsoft.SPOT.Native" /> <Reference Include="SecretLabs.NETMF.Hardware" /> <Reference Include="SecretLabs.NETMF.Hardware.NetduinoGo, Version=4.2.0.0, Culture=neutral, processorArchitecture=MSIL" /> </ItemGroup> </Project>