1 00:00:01,010 --> 00:00:01,610 Up until now, 2 00:00:01,610 --> 00:00:05,370 we've been executing the code from within the IDE using the debugger. 3 00:00:06,390 --> 00:00:09,480 Eventually, you want to build your application and publish it somewhere, 4 00:00:09,480 --> 00:00:13,460 distribute it, or in the very least, run it without using Visual Studio. 5 00:00:14,680 --> 00:00:16,560 When I click the Start button here, 6 00:00:16,560 --> 00:00:19,740 Visual Studio will first build the solution before running the program. 7 00:00:20,830 --> 00:00:24,910 When it builds the solution, all of the files needed to run the program 8 00:00:24,910 --> 00:00:29,320 are copied into a special folder inside the project directory called bin. 9 00:00:29,320 --> 00:00:33,650 Bin is short for binary, so you might hear people call this the bin directory. 10 00:00:33,650 --> 00:00:37,320 The point is, this is where you go to find your application. 11 00:00:37,320 --> 00:00:41,230 You can run it from the bin directory, move it to another directory, or even 12 00:00:41,230 --> 00:00:46,050 another computer so long as that computer has the same version of .NET and MONO. 13 00:00:46,050 --> 00:00:51,770 By default, Visual Studio projects come preconfigured with two types of builds, 14 00:00:51,770 --> 00:00:53,640 Debug and Release. 15 00:00:53,640 --> 00:00:56,060 These are called build configurations. 16 00:00:56,060 --> 00:00:58,880 The Debug build configuration does things like 17 00:00:58,880 --> 00:01:02,320 include information that the debugger and profilers need. 18 00:01:02,320 --> 00:01:05,560 The Release build configuration, among other things, 19 00:01:05,560 --> 00:01:10,090 applies compile time optimizations to make the code run faster. 20 00:01:10,090 --> 00:01:14,240 You can switch between build configurations here in this drop-down. 21 00:01:14,240 --> 00:01:17,210 Switching to Release build disables the debugger. 22 00:01:17,210 --> 00:01:20,740 So, if we attempt to run the debugger with this set to release, 23 00:01:20,740 --> 00:01:22,650 we'll see this message. 24 00:01:22,650 --> 00:01:25,110 We're still able to continue running the code, but 25 00:01:25,110 --> 00:01:26,550 none of the break points will be hit. 26 00:01:27,820 --> 00:01:31,957 You can build the code without running the debugger by clicking on build solution in 27 00:01:31,957 --> 00:01:32,796 the build menu. 28 00:01:35,712 --> 00:01:37,711 Now let's take a look at what it did. 29 00:01:37,711 --> 00:01:42,347 The easiest way to get to the bin directory is to right click on the project 30 00:01:42,347 --> 00:01:46,462 in Solution Explorer and click on Open Folder in File Explorer. 31 00:01:50,129 --> 00:01:52,430 Here we see the bin directory. 32 00:01:52,430 --> 00:01:54,610 In here, we find two directories. 33 00:01:54,610 --> 00:01:57,700 Each named for a build configuration. 34 00:01:57,700 --> 00:02:00,010 For this c sharp console app, 35 00:02:00,010 --> 00:02:02,250 both directories contain the same types of files. 36 00:02:03,320 --> 00:02:06,580 Here we see the file with the .exe extension. 37 00:02:06,580 --> 00:02:10,030 That's our executable file which we can copy around. 38 00:02:10,030 --> 00:02:12,430 These other files here are not required for 39 00:02:12,430 --> 00:02:16,020 the program to run, most of them are only used by Visual Studio.