Posting native events in nanoFramework

José Simões

To deal with situations that require native coding or when one faces the situation of needing to add native code that has no place on the core library, there is Interop. It’s a rather powerful feature that opens immense possibilities.

Sending data from the native code to the C# managed application can be done easily by using either parameters passed by reference or sending the data on the return value. But… what if you need to signal your application of random events that occurs on the native code? Well now you can!

Support for CustomEvent has just been added to nanoFramework.Runtime.Events.

Let me explain how easy it is to use this cool feature. 😉

On your native code, all you have to do it’s just adding a simple line of code. Really! Like this:

PostManagedEvent( EVENT_CUSTOM, 0, 1111, 2222 );

The payload that’s available consists of the last…

View original post 176 more words

NuGet, assembly and native versions

nanoFramework C# class libraries are distributed as NuGet packages to be consumed by projects. This has been like this since day one. NuGet packages are practical, easy to distribute, easy to consume, easy to update. But they had a …minor… problem. Actually, make that two… 😉 One was that the dependency between the managed assembly … Continue reading NuGet, assembly and native versions

SonarCloud is on nanoFramework repos!

Code quality is something that is high in our priority list at nanoFramework. Though, being on the list is not of much use, it must be measurable and comparable against an accepted standard. For this reason, since last week we’ve been busy adding the awesome SonarCloud tool to all our class libraries repositories on GitHub. … Continue reading SonarCloud is on nanoFramework repos!

Deployment image generator

nanoFramework Visual Studio extension (both VS2017 and VS2019 versions) just got a new improvement: the ability to generate a “deployment image”. And what the heck is a “deployment image” you ask? Let me explain with a bit more detail. To run a C# application a nanoDevice must have on its storage (which is a flash … Continue reading Deployment image generator