In this recipe, we will be using a text log file to store details about how the library interacts with other programs. This is a good practice; to log things as you go. Then, you will be able to pinpoint errors and other important things, such as usage of the library.
Make sure you have the latest version of Visual Studio 2017 installed on your system. Let's get started on our recipe.
- Open Visual Studio 2017.
- Click
File
|New
|Project
to create a project. - In the
New Project
dialog box, expand theOther Project Types
node in the left-hand pane and selectVisual Studio Solutions
. In the right-hand pane, selectBlank Solution
. - In the
Name:
textbox, typeChapter10.Logging
, and, in theLocation:
textbox, select a path from the drop-down box or click on theBrowse...
button to locate a path:
- Click
OK
. - Now, the
Solution Explorer
(Ctrl + Alt + L) should look like this:
- Now, right-click on the
Chapter10.Logging
label in theSolution Explorer
and...