Community

Target of Invocation exception

trying to deploy/run HellowMeadow and get the following:

BUILD / DEPLOY OUTPUT:

Build started…
1>------ Build started: Project: YoMeadow, Configuration: Debug Any CPU ------
1>YoMeadow → C:\Users\serve\source\repos\HelloWilderness\YoMeadow\bin\Debug\net472\App.exe
2>------ Deploy started: Project: YoMeadow, Configuration: Debug Any CPU ------
2>[1/23/2021 7:24:06 PM] Deploying to Meadow on COM4…
2>[1/23/2021 7:24:12 PM] /meadow0/App.exe [0xb9fe12fa] 8 KB (6144 bytes) (00:00:05.6644955 since last.)
2>[1/23/2021 7:24:13 PM] /meadow0/mscorlib.dll [0x55f0b59d] 4532 KB (4639232 bytes) (00:00:01.3300075 since last.)
2>[1/23/2021 7:24:13 PM] /meadow0/Meadow.dll [0x7b9297c8] 192 KB (196608 bytes) (00:00:00.0001278 since last.)
2>[1/23/2021 7:24:14 PM] /meadow0/System.dll [0xcdaef5af] 2604 KB (2664448 bytes) (00:00:00.6814966 since last.)
2>[1/23/2021 7:24:14 PM] /meadow0/Mono.Security.dll [0xe6aef316] 236 KB (240128 bytes) (00:00:00.0605446 since last.)
2>[1/23/2021 7:24:14 PM] /meadow0/System.Configuration.dll [0x7f8e1ec9] 120 KB (122880 bytes) (00:00:00.0646473 since last.)
2>[1/23/2021 7:24:15 PM] /meadow0/System.Xml.dll [0xee1ec40d] 3100 KB (3174400 bytes) (00:00:00.7810441 since last.)
2>[1/23/2021 7:24:15 PM] /meadow0/System.Security.dll [0x798d2de3] 304 KB (308224 bytes) (00:00:00.0605491 since last.)
2>[1/23/2021 7:24:15 PM] /meadow0/System.Core.dll [0xa8fa3f94] 1064 KB (1086976 bytes) (00:00:00.2502695 since last.)
2>[1/23/2021 7:24:15 PM] /meadow0/System.Numerics.dll [0xf9124bf3] 120 KB (119808 bytes) (00:00:00.0000369 since last.)
2>[1/23/2021 7:24:15 PM] /meadow0/Meadow.Foundation.dll [0xc7876e92] 84 KB (84480 bytes) (00:00:00.0642412 since last.)
2>[1/23/2021 7:24:15 PM] A total of 11 files using 12364 KB (12643328 bytes) (00:00:00.0000253 since last.)
2>[1/23/2021 7:24:20 PM] Deployment Duration: 00:00:13.5647324 (00:00:04.6066314 since last.)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

CONSOLE OUTPUT:

Initialize hardware…
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.TypeInitializationException: The type initializer for ‘Meadow.Devices.UPD’ threw an exception. —> System.DllNotFoundException: Unable to load DLL ‘nuttx’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Meadow.Core.Interop.Nuttx.open(String pathname, DriverFlags flags)
at Meadow.Devices.UPD…cctor()
— End of inner exception stack trace —
at Meadow.Devices.UPD.SetRegister(UInt32 address, UInt32 value)
at Meadow.Devices.F7GPIOManager.ConfigureGpio(GpioPort port, Int32 pin, GpioMode mode, ResistorMode resistor, GPIOSpeed speed, OutputType type, Boolean initialState, InterruptMode interruptMode, Int32 alternateFunctionNumber, Double debounceDuration, Double glitchDuration)
at Meadow.Devices.F7GPIOManager.Initialize()
at Meadow.Devices.F7Micro…ctor()
— End of inner exception stack trace —
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstanceT
at Meadow.App`2.get_Device()
at YoMeadow.MeadowApp.Initialize() in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\MeadowApp.cs:line 24
at YoMeadow.MeadowApp…ctor() in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\MeadowApp.cs:line 16
at YoMeadow.Program.Main(String[] args) in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\Program.cs:line 17

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.TypeInitializationException: The type initializer for ‘Meadow.Devices.UPD’ threw an exception. —> System.DllNotFoundException: Unable to load DLL ‘nuttx’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Meadow.Core.Interop.Nuttx.open(String pathname, DriverFlags flags)
at Meadow.Devices.UPD…cctor()
— End of inner exception stack trace —
at Meadow.Devices.UPD.SetRegister(UInt32 address, UInt32 value)
at Meadow.Devices.F7GPIOManager.ConfigureGpio(GpioPort port, Int32 pin, GpioMode mode, ResistorMode resistor, GPIOSpeed speed, OutputType type, Boolean initialState, InterruptMode interruptMode, Int32 alternateFunctionNumber, Double debounceDuration, Double glitchDuration)
at Meadow.Devices.F7GPIOManager.Initialize()
at Meadow.Devices.F7Micro…ctor()
— End of inner exception stack trace —
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstanceT
at Meadow.App`2.get_Device()
at YoMeadow.MeadowApp.Initialize() in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\MeadowApp.cs:line 24
at YoMeadow.MeadowApp…ctor() in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\MeadowApp.cs:line 16
at YoMeadow.Program.Main(String[] args) in C:\Users\serve\source\repos\HelloWilderness\YoMeadow\Program.cs:line 17

C:\Users\serve\source\repos\HelloWilderness\YoMeadow\bin\Debug\net472\App.exe (process 15708) exited with code -532462766.
Press any key to close this window . . .