---
title: "Including/excluding files in Visual Studio .NET"
url: "https://osherove.com/blog/2003/2/24/includingexcluding-files-in-visual-studio-net.md"
canonical: "https://osherove.com/blog/2003/2/24/includingexcluding-files-in-visual-studio-net.html"
published: "2003-02-24T09:19:00"
updated: "2003-02-24T09:19:00"
tags: []
author: "Roy Osherove"
description: "Including/excluding files in Visual Studio .NET Date: 2/17/2003 Versions: VS7 Level: Beginner Author: The VB2TheMax Team Say that that you have an existing Visual Studio .NET project, and that you copy a lot of new…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Including/excluding files in Visual Studio .NET

By Roy Osherove February 24, 2003

**Historical article** · Originally published February 24, 2003; technical details may be outdated.

<table><tbody><tr><td><strong><a href="http://www.vb2themax.com/Item.asp?PageID=TipBank&amp;ID=620">Including/excluding files in Visual Studio .NET</a></strong></td></tr><tr><td><i><strong>Date:</strong> 2/17/2003<br><strong>Versions: </strong>VS7 <strong>Level: </strong>Beginner<br><strong>Author: </strong>The VB2TheMax Team</i><p>Say that that you have an existing Visual Studio .NET project, and that you copy a lot of new source code files, images and other stuff from another project (maybe you're merging two projects, or a colleague wrote and passed those files to you). One approach to include the new files is to use the <i>Project | Add Existing Item…</i> command and select all the files you want to include in the current project. Unfortunately this is quite long if the files are organized in a lot of sub-directories, and even more if you want to first check the content of the file, and eventually add the ones you need. A much simpler approach is the following: by clicking the <i>Project | Show all files</i> command the Solution Explorer will be filled with all the files and directories located under the project's main directory, allowing to easily browse the sub-directories, and to open the source code files to read their content, without actually adding them to the project. When you find the files you need, simply right click on them in the Solution Explorer, and select <i>Include In Project</i>. If you later want to remove a file from the project, without physically deleting it, right click on the file and select <i>Exclude From Project</i>.</p></td></tr></tbody></table>

\[via [VB2TheMax](http://www.vb2themax.com/)\]


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
