Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Learn about how to create projects and solutions.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
That's enough about layout.
0:00
Let's get to what
Visual Studio is really about.
0:02
Trading apps and programs.
0:04
Visual Studio is a project centric IDE,
which means all the code and
0:07
other files that make up your app
are organized into a project.
0:12
When starting on a new app,
0:17
the first thing you need to do is
create a project in Visual Studio.
0:18
Let's do that now.
0:22
To create a new project, click on file
then mouse over new and click project.
0:24
This opens the new project dialog.
0:30
What you see listed here
are project templates.
0:32
In visual studio all new projects
are created from a template.
0:35
The template provides a starting point for
your project.
0:40
You'll see what this means
once we create a project.
0:43
Templates are organized based
on programming language.
0:46
So if I click on visual C# we'll see
0:49
all the different types of projects
that we can make using C#.
0:52
You can reduce the list even more
by clicking on a subcategory.
0:57
Remember in the Installer where we
could customize the installation by
1:00
adding additional features and tools.
1:04
Well, it's all right if you chose
not to install those things.
1:06
You can do it here if you want.
1:10
I don't have the universal
Windows tools available, but
1:11
I can install them here if I want.
1:14
If I double-click on this,
1:15
Visual Studio will install everything I
need to create universal Windows apps.
1:17
Once it's installed, I'll see even
more templates to choose from here.
1:22
There are lots of other project types.
1:27
For instance,
you might want to create a web app.
1:30
You'll find a template for that under Web.
1:32
If you click on the template,
1:36
you'll get a brief description of what the
template is used for on the right side.
1:37
As you can see the ASP.net web
application project template
1:41
can be used to create webform,
MVC, or web applications.
1:45
As you can see,
there are lots of project types.
1:50
I could teach a whole
course on each one of them.
1:53
For now, let's create a project
from one of the simplest templates.
1:55
In the C# Basics Treehouse course,
1:59
I create a simple Windows
console application.
2:02
You'll find the template for this under
Classic Desktop in the Windows category.
2:04
To create a Windows console
application project,
2:09
I'll select the Console Application
template by clicking on it once.
2:12
I'll give this project a name.
2:16
The name entered here becomes
the default namespace for the code.
2:18
So it's best to pick a name that's
formatted like a namespace name.
2:22
That is, CamelCase with each word
capitalized and no spaces between words.
2:26
The name also becomes the name
of the assembly that's produced.
2:31
You notice that by convention,
2:35
most C# assemblies are named
after their namespace name.
2:37
I'm going to name this one
Treehouse.SimpleConsuleApp.
2:42
We can pick a directory for
the project files and code to go here.
2:46
You might be wondering what a solution is.
2:49
A solution is a collection of projects.
2:52
Most apps, other than the most basic ones,
are made up of more than one project.
2:55
At the very least, you'll probably have a
separate project that contains your tests.
3:00
If you are going to
have multiple projects,
3:05
you probably want them all
in the same directory.
3:07
In that case, you should check the create
directory for solution check box.
3:09
The solution name field here lets
you decide what you want that
3:14
top level directory named.
3:17
This add to source control check box tells
3:19
Visual Studio that we want it
to use a version control system.
3:22
We can pick which system we
want to use after clicking OK.
3:26
The basic install of Visual Studio
lets you decide between
3:30
team foundation server or GIT.
3:34
For this workshop,
I'll leave this unchecked.
3:36
Finally, we can pick which version
of the .NET Framework to use.
3:38
In most cases, we want to use the latest.
3:42
Now I can click OK to create the project.
3:45
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up