►
From YouTube: Introduction to MSBuild in .NET Core with Nate McMaster
Description
Nate McMaster gives and introduction to using MSBuild in .NET Core project files. Watch as he runs through the basics in a new .NET Core application (using Visual Studio Code on a Mac), then shows off a few useful tricks including property imports, directory build properties, and running custom tasks like Gulp as part of your build.
B
I'm
es
kinetochore
team:
we
use
them
as
build
all
the
time.
Okay
name
is
build,
for.net
core
is
really
new,
which
is
why
I
wanted
to
show
kind
of
the
basics
of
what
it
does
today.
Great
okay.
So
we're
going
to
dive
right
into
some
code
that
sounds
great
here:
I
have
a
dotnet
new
project
and
there's
lots
of
material
already
on
like
how
to
install
dotnet
how
to
use
it,
we're
using
Visual
Studio
code.
So
if
I
have
a
basic
project,
I
have
CSS
files
for
c-sharp
and
CS
proj
msbuild
is
the
cs.
B
Proj
file,
it's
the
magic
that
happens
be
between
dotnet
run
and
your
program
actually
producing
outputs
donĂt
run
actually
did
two
things
for
us,
the
first
of
which
was
button.
It
build
okay.
Now
you'll
notice,
Microsoft
build
engine,
that's
long
for
MSP.
Let's
go
right:
okay,
msbuild
is
an
Orchestrator.
It
takes
a
bunch
of
different
technologies
and
puts
them
together.
So
it
takes
a
c-sharp
compiler,
nougats,
Visual,
Studio
Visual
Studio
code,
the
command
line
and
ties
them
all
together.
Okay,
most
of
the
way
that
it
works
is
controlled
in
XML
in
this
file.
So
what?
B
If
I
want
to
do
something
simple,
like
change
this
file,
that's
produced
it
defaulted
to
app,
there's
a
setting
called
assembly,
name,
we'll
call
it
whatever.
If
I
do
dotnet
build,
you
see
now
it
produces
a
new
file
name
right.
Okay,
so
there
are
lots
of
really
cool
things.
You
can
do
in
Emmis
build
a
lot
of
these
you'll
find
automatically
in
Visual
Studio
with
the
GUI
editor
it'll.
Add
things
to
your
project.
Ok,
there
are
others
that
you
won't
find.
For
example,
my
favorite
is
import.
B
B
Let's
build
a
smarten
up
to
look
up
your
directory
structure,
so
I
have
here
my
app
in
a
folder
and
above
it
directory
build
msbuild
automatically
found
this
property
here
company
and
use
that
as
a
part
of
building
the
project,
you
didn't
have
to
add
anything
to
CS
project,
which
is
automatically
added.
Okay,.
B
B
Let's
look
at
this
project,
so
you
have
a
web
project
that
has
a
gulp
file.
Whoo
gulp
is
a
JavaScript
thing.
That's
going
to
compile
some
JavaScript
and
CSS
for
me
if
I
want
it
to
build
gulp
or
run
gulp
every
time,
I
build
in
Visual
Studio
and
from
the
command
line.
I
can
use
something
called
a
target.
Okay,.
A
B
Target
is
defined
in
your
CS
proj
file,
we're
going
to
write
a
new
one
called
run
gulp,
and
we
want
this
target
to
run
after
the
main.
Build
step
now
target
contains
a
series
of
steps,
we're
going
to
add
just
one
called
exec
and
we're
going
to
start
up
node
to
make
this
work.
We
have
to
give
it
node
and
a
path
to
where
gulp
is
contained
and
mi
goal
file.
I
hadded.
If
we
look
at
gulp
real,
quick,
a
task
called
compile.
This
is
a
dummy
of
course,
I'm,
not
actually
ok,
building.