Community

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

System.TypeLoadException
HResult=0x80131522
Message=Non-abstract, non-.cctor method in an interface.
Source=
StackTrace:

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

@KiwiBryn

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.