Shop OBEX P1 Docs P2 Docs Learn Events
Help getting a wiimote C# project running? — Parallax Forums

Help getting a wiimote C# project running?

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-11-09 11:06 in General Discussion
So im trying to experemint with some wiimotes before I go tearing them up! I cant get any of the C# code working in 2010 express. I keep getting this error

System.IO.FileLoadException was unhandled
Message=Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Source=mscorlib
StackTrace:
at System.Reflection.RuntimeAssembly.GetEntryPoint(RuntimeAssembly assembly, ObjectHandleOnStack retMethod)
at System.Reflection.RuntimeAssembly.get_EntryPoint()
at Microsoft.VisualStudio.HostingProcess.HostProc.GetEntryPointAptThreadState(String assemblyFile)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunParkingWindowThread()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

I build solution everythings fine, then I hit play and get this

The project im trying to get working is the first one on this page http://johnnylee.net/projects/wii/ "tracking fingers with wiimote. I figured itd be easy for my just to light up an ir LED and this code would track it but I cant get the darn thing to run in VC# 2010 express. Im hoping someone who has a little c# expertise can tell me whats wrong here, I do have the directx sdk installed that he links too also.

Comments

  • Mike GMike G Posts: 2,702
    edited 2012-11-08 14:23
    The source in the samples folder targets the 2.0 runtime. Did you create a new project and drop the dll in the bin? Are you running one of the samples? Do you have .NET 2.0 installed on your PC?
    • Right click the project.
    • Select Properties
    • Select the "Application" tab on the left
    • Target framework -> Select .NET Framework 2.0
    • Save and compile
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-11-09 11:06
    Oh thank you so much that worked I had no idea what i was doing havent used VS since 2006 really
Sign In or Register to comment.