System.TypeLoadException on application start

Hi all,

I have updated one of my libraries to the latest NuGets etc. but am having an issue…

When I download the application to a device to Debug I get

Message=Non-abstract, non-.cctor method in an interface.

I can see the application is running because I can see debug output which is good.

Just to check it wasn’t my code I have created an application using the C# sample template and it exhibits same behaviour. The application throws the exception but the LED cycles through colours as expected.

I’m running VS2k12 V16.10.3


Hey, the Devs mentioned on the slack channel a while ago that this is caused by hitting the play button. What you should be doing is right clicking the project in the solution explorer and selecting deploy. Apparently these do different things!

Hey @ben.pierre, I am seeing the same will when trying to deploy with the “Play” button in Visual Studio. I tried selecting “Deploy” from the solution explorer as you suggested; but, the App is never deployed using that method. The “Output” window in Visual Studio, just indicated “Loading application…”. The console never appears and I don’t see any indication on the board that that App was deployed. I am just trying to run the sample App that is packaged in the Visual Studio template.

Hey, saw your message on slack too, clicking deploy on vs2019 just works for me, so I wouldn’t be sure how to help with that. When you click play however your app should still run on the board despite the error appearing. Put a Console.Writeline() somewhere near the top and see if it is output despite the error. If it is not then I think it’s different to the errors others have been seeing, or pehaps another error on top. I’d suggest maybe reflashing your board, especially if you haven’t since the release of CLI 1.14.2, and verifying everything is up to date there.

Hi, all,
is there a solution for this issue? Who can help, please?

My environment:
Windwos 11, VS2019, F7v1
have tried to debug the blink example. Deployment is working - but I cannot debug.
I get the debug console windows with System.TypeloadException:
Non abstract Non-.cctor-Method in an interface.
at HelloMeadow.Program.Main(String[] args)
What is going wrong?

Debug console output (is German ;)):
Unbehandelte Ausnahme: System.TypeLoadException: Nicht abstrakte Nicht-.cctor-Methode in einer Schnittstelle.
bei HelloMeadow.Program.Main(String[] args)

C:\Users\Stani\source\repos\HelloMeadow\HelloMeadow\bin\Release\netstandard2.1\App.dll (process 8676) exited with code -532462766.

Thanks a lot for your help.

Kindest regards