Error on Microsoft.SPOT.Input.TouchEventArgs..ctor

I have a strange error on a Hydra project coming with the following code:

var arg = new Microsoft.SPOT.Input.TouchEventArgs((InputDevice)null, DateTime.Now, new TouchInput[1]
{
new TouchInput()
{
X = 100,
Y = 200
}
});

the debugger start fine but it stop after the resolving assemblies step with the following error:

Assembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Graphics (4.2.0.0)Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)
Assembly: Microsoft.SPOT.IO (4.2.0.0)Assembly: System.IO (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.Touch (4.2.0.0)
Assembly: Microsoft.SPOT.Ink (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)
Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)Assembly: System.Xml (4.2.0.0)
Assembly: Microsoft.SPOT.Time (4.2.0.0)Assembly: Microsoft.SPOT.Net (4.2.0.0)Assembly: System (4.2.0.0)
Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)Assembly: System.Net.Security (4.2.0.0)
Loading Deployment Assemblies.

Attaching deployed file.

Assembly: GHI.OSHW.Hardware (4.2.2.0)Attaching deployed file.
Assembly: Gadgeteer (2.42.0.0)Attaching deployed file.
Assembly: System.Http (4.2.0.0)Attaching deployed file.
Assembly: GadgeteerApp1 (1.0.0.0)Attaching deployed file.
Assembly: GTM.GHIElectronics.Display_CP7 (1.0.0.0)Attaching deployed file.
Assembly: GHIElectronics.Gadgeteer.FEZHydra (1.0.5.0)Resolving.

Resolve: unknown method: Microsoft.SPOT.Input.TouchEventArgs…ctor
Error: ff000000

Waiting for debug commands…

The program ‘[4] Micro Framework application: Managed’ has exited with code 0 (0x0).

If I comment the line the program work fine,
have you any idea ?

Regards

Mirco

Using code tags will make your post more readable. This can be done in two ways:[ol]
Click the “101010” icon and paste your code between the

 tags or...
Select the code within your post and click the "101010" icon.[/ol]
(Generated by QuickReply)

… and the best way to correct that is to edit your post (the pencil icon on the right side, above your post text), highlight the code section, then hit the 101010 button above the message box.

Onto your problem; I am actually not very knowledgable, but here’s what I see.

[quote]Resolve: unknown method: Microsoft.SPOT.Input.TouchEventArgs…ctor
Error: ff000000
[/quote]
Your code is trying to create a new TouchEventArgs object, and the constructor can’t be resolved. I can’t see Microsoft.SPOT.Input being included as a reference above that?

Hi here is the code:



using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
using Microsoft.SPOT.Input;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using GHI.OSHW.Hardware;

namespace GadgeteerApp1
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            var arg = new Microsoft.SPOT.Input.TouchEventArgs((InputDevice)null, DateTime.Now, new TouchInput[1]
                                                                    {
                                                                        new TouchInput()
                                                                        {
                                                                            X = 100,
                                                                            Y = 200
                                                                        }
                                                                    });
       
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }
    }
}

The sample was compiled fine but the error coming in the debug session, in the resolving assemblies step.
As you can see the TouchEventArgs is declared in the Microsoft.SPOT.TinyCore.dll module that it was referenced on my project.
If you like I can send the sample that reproduce the issue.

Regards

Mirco

Please download the SDK released 2 days ago and update your firmware.

Hi Gus,

now it works fine with the last fw, thanks a lot.

Mirco

Enjoy :slight_smile:

Hello,

i have this problem even after I have done update of Hydra’s FW to latest version downloaded from http://www.ghielectronics.com/download/ghi-netmf-v4.2-and-.net-gadgeteer-package-10242012.

Here are my device capabilities:


HalSystemInfo.halVersion:               4.2.0.0
HalSystemInfo.halVendorInfo:            Microsoft Copyright (C) Microsoft Corporation.  All rig
HalSystemInfo.oemCode:                  255
HalSystemInfo.modelCode:                0
HalSystemInfo.skuCode:                  65535
HalSystemInfo.moduleSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
HalSystemInfo.systemSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ClrInfo.clrVersion:                     4.2.0.0
ClrInfo.clrVendorInfo:                  Microsoft Copyright (C) Microsoft Corporation.  All rig
ClrInfo.targetFrameworkVersion:         4.2.0.0
SolutionReleaseInfo.solutionVersion:    4.2.3.1
SolutionReleaseInfo.solutionVendorInfo: Copyright (C) GHI Electronics, LLC
SoftwareVersion.BuildDate:              Oct 23 2012
SoftwareVersion.CompilerVersion:        410462
FloatingPoint:                          True
SourceLevelDebugging:                   True
ThreadCreateEx:                         True
LCD.Width:                              320
LCD.Height:                             240
LCD.BitsPerPixel:                       16
AppDomains:                             True
ExceptionFilters:                       True
IncrementalDeployment:                  True
SoftReboot:                             True
Profiling:                              False
ProfilingAllocations:                   False
ProfilingCalls:                         False
IsUnknown:                              False

Micro please could you tell me what is your solution version displayed in device capabilities?

Thanks for any help,

Jan

Jan, can you clearly state your error condition? Can you also confirm you’ve created a new project and you’re not trying to reuse an old one?

Hi Jan

I have installed the FW with the Ethernet support and I have created a new project and it work fine with the last SDK.
I have saw your device capabilities and they are the same as my Hydra

Mirco


Pinging... TinyCLR
HalSystemInfo.halVersion:               4.2.0.0
HalSystemInfo.halVendorInfo:            Microsoft Copyright (C) Microsoft Corporation.  All rig
HalSystemInfo.oemCode:                  255
HalSystemInfo.modelCode:                0
HalSystemInfo.skuCode:                  65535
HalSystemInfo.moduleSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
HalSystemInfo.systemSerialNumber:       FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ClrInfo.clrVersion:                     4.2.0.0
ClrInfo.clrVendorInfo:                  Microsoft Copyright (C) Microsoft Corporation.  All rig
ClrInfo.targetFrameworkVersion:         4.2.0.0
SolutionReleaseInfo.solutionVersion:    4.2.3.1
SolutionReleaseInfo.solutionVendorInfo: Copyright (C) GHI Electronics, LLC
SoftwareVersion.BuildDate:              Oct 23 2012
SoftwareVersion.CompilerVersion:        410462
FloatingPoint:                          True
SourceLevelDebugging:                   True
ThreadCreateEx:                         True
LCD.Width:                              800
LCD.Height:                             480
LCD.BitsPerPixel:                       16
AppDomains:                             True
ExceptionFilters:                       True
IncrementalDeployment:                  True
SoftReboot:                             True
Profiling:                              False
ProfilingAllocations:                   False
ProfilingCalls:                         False
IsUnknown:                              False


@ Proxima Software - Thanks for info, I have created new project also, but without luck. Still got stuck in resolving with following message:
@ Brett - I have same problem as Mirco, but his has been resolved by updating SDK, but in my case it didn’t help, I’ll try uninstall SDKs, and will see what happends next. Yes, I created new Window Application with lastest SDK and same trouble in my case.


   Assembly: HydraTouchTest (1.0.0.0)  Resolving.

Resolve: unknown method: Microsoft.SPOT.Input.TouchEventArgs..ctor

Error: ff000000

Waiting for debug commands...

The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).

Thanks for your help.

Jan