[edit: stupid mistakes]
Same as Fruny, but for VS .NET 2002 to 2003
Creating and Building a Project w/ Visual Studio .NET 2003
The instructions for creating a project/file in the book on pages 19-20 are for Visual C++ 6. Visual Studio .NET 2003 is actually version 7.1 (VS .NET 2002 is version 7).
The correct approach for .NET 2003 is:
Step 1: Create an empty project- File->New->Project
- Open the 'Visual C++ Projects' branch in the Project types panel
- Select 'Win32' from Project types
- Select 'Win32 Console Application' from the Templates
- Type the name of the project and the location in the edit box near the bottom.
- Click OK
- When the dialog box appears click on "Application Settings" on the left
- Select 'Console application' under Application type
- Click "Empty Project" under Additional options.
- Click Finish
Step 2: Add files to your project- Right click on your project in the Solution Explorer
- Add->New Item
- Click Code in the Categories List
- Select either C++ File or Header File as appropriate to the task
- Type the name of the file in the edit box near the bottom.
- Click Add
Building your executableFor solutions which only have a single project, Build Solution will do the same as "Build <projName>". Once you have solutions which are containers for multiple projects, you will need to choose either to build individual projects, or the whole solution.
The tasks we will attempt in this workshop will most likely require only a single project. As such, "Build Solution" should work just fine.
About "precompiled headers"They are rather annoying when you are a beginner - mostly because most of the time, you forget to add this stupid and quite obscure #include "stdafx.h" at the beginning of the source code file.
If you decide to go without them:
- in the Project menu, chose the properties menu option (or, in the solution explorer, right click your project and select properties)
- In the Configuration drop down combobox, select All Configurations
- in the left panel, select the Configuration Properties / C++ / Precompiled Headers branch
- in the right panel, on the Create/Use Precompiled Headers, select the Not Using Precompiled Headers option.
[Edited by - Emmanuel Deloget on June 15, 2006 5:46:59 AM]