Visual Studio 2019 Configuration for Kinect V2 code development
In this tutorial, you will find the instructions for configuring your Visual Studio 2019 to write code for the Kinect V2
- At least 15 GB of free space on disk
- Internet connection to download the installer
- Download the Visual Studio Community 2019 installer from the Microsoft website Link
- Execute the installer
- Select the .NET development environment as well the C++ development environment as showed in the picture in your Visual Studio Installer. It will take more or less 10GB or disk.
- Restart your computer
- All done!
Creating a WPF (Windows Presentation Foundation) project
- Open your Visual Studio 2019
- Select the option Create new poject
- Search for WPF
- Select the option WPF (.NET Framework)
- Give a name to your project
- Ideally, create the project in the folder with your Github projects (because you are a good developer who will commit the changes to your own repository ;) )
- Select the option Place solution and project in the same folder
- Click on Create
- Now you have ready your template to work
Configuring the WPF project for Kinect V2 code
For running the application using the Microsoft Kinect library, you will need to run the Build in a x64 architecture and in some cases, your code needs to be run in unsafe mode.
Configuring for x64 build
- Open the Configuration Manager. Go to Build in the context menu, and select Configuration Manager
- In Active solution plataform open the scroll menu and select <New…>
- It should pop up the x64 text automatically, if not, just select it or write it down.
- Click on OK
- Click on Close
Configuring unsafe code
- Open the Solution Explorer. Go to View in the context menu, and select Solution Explorer
- Right click on your project name, and select Properties
- On the left menu, select Build
- From the options, check Allow unsafe code
- Save with Ctrl+S or click on the Save icon.