This article explains how to use the .NET Core Demo provided as Program.cs file. This example shows a simple console telegram monitor which can be executed on Windows and Linux.
|Please read this: Getting started with .NET Core on Windows/Linux/macOS using the command line|
- Launch Visual Studio 2017. Select File > New > Project from the menu bar. In the New Project* dialog, select the Visual C# node followed by the .NET Core node. Then select the Console App (.NET Core) project template. Click OK.
- Visual Studio uses the template in order to create the project. The C# Console Application template for .NET Core automatically defines a class: Program. Remove the Program.cs from the template. Add the Program.cs provided via the Falcon.NET SDK.
- Add references to Knx.Falcon.Sdk.dll and Knx.Falcon.UsbAccess.dll, which are provided via the Falcon.NET SDK.
- On the menu bar, select Build > Build Solution.
- The console prompts to select a KNX Interface which is connected via USB or IP.
- After selecting an interface all telegrams arriving at the interface are displayed in the console output.
Please note that core console applications are provided per default as a DLL file. In order to get further information about publishing this demo, see .NET Core-CLI-Tools. In order to run, open a command prompt and use dotnet cli.