Generate EXE File from C# Project in Visual Studio 2019

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
howdy guys welcome back once again in this video we will look at how we can generate an executable file from a.net or non-net call project inside the visual studio 2019 but before we get started please make sure you subscribe to channel if you haven't so let's get to it then so what is really an executable file so an executable file contains an executable programs for windows execute exe is shot for executable and it is the standard file extension used by windows programs so for many windows users exe files are synonymous with windows programs making exe one of the most recognizable file extensions so rather than just talking too much let's get to it then so what we do is we're just going to create a very simple dotnet up application or net project then we will try and generate an executable files from that project so that sounds very simple and that is exactly how it is so we're just gonna go ahead and create a console application so as you can see i've already got one created so there's no need for that but if you haven't create a new console application you can do that by clicking on the create a new project and then selecting the c sharp or vb whatever language that you want then you can you can even double click it or click the nest select um i mean configure the project details and whatnot we're not going to look too much into that so as you can see here now we've got a very simple c-sharp console application created yeah so this is how we can actually generate an executable from this this project so we can do that by right-clicking the project that we want to generate from so then we click on the publish so you'll be prompted with this dialog here so from here you can publish it directly to windows azure so as you can see so publish your application to microsoft cloud or you can you can you can publish it into a docker oh it's our docker container registry so you can also publish it into a local folder or local file system on your computer or you can also actually import the settings from an external from an external server external computer so in this case what we do is just gonna publish it on a local computer so we select the folder so once we select the folder this is where we this is what actually happens here we come to the click once so the click once is when publishing a clip once application for the first time the publish properties can be sent using the publish wizard only a few of the properties are available in the wizards all the other properties are set to the default values yeah so we click on that to see what actually comes here so here so this is where we can select the publish location right you can either we can browse to the location or we can put it inside this to publish to being published and then we can click on the nest so here we can actually specify what link it will be the update will be coming from is it going to be from the website or from unc path or it's a file share or it's from a cd so basically we're just going to skip this bit here we're just going to say from a cd dvd or usb so here so you can check on this box if you want an automatic update right so here we can also put our version i mean version number or whatever our build number whatever we want to put here then we can select nest and here we can also add more information to the manifest and then we can go into the last config so here you can also actually configure the target framework the deployment mode target runtime and some configurations as well so the next bit of course is we finish it so now we've got this bit here so deploy you up to the folder iss azure and another destinations all right so here we can rename we can delete or we can go ahead and and publish it so this is exactly what we do so we click on the publish so this might take a few moments so as you can see here now we've got the the published successful so we can actually go click on the open the publish location to get into whether we've got the executables located so this is what actually this is what we got so if we look at it here we've got um this bit here which is the the setup and this is the launcher so if we look at the properties here so as you can see here the type of the file is application this dot exe it's unexecutable so basically if you want to run the application this is where this is if you double click this bit here you get that application run it might take a while i'm not sure but let me double click it again but anyway that's what actually happened so what i'm gonna do is just gonna click on the setup so once you click on the setup here so the publishers cannot be having verified and whatnot so it's not really important so you're gonna have to install it so it actually opened on on my other windows but it was very quick so what i'm going to do is just going to come inside the code and make a very quick change here so we're going to put our console dot redline so console.org line we save it we go food the same procedure published so now we can click on this bit here publish so i've come back to the to the folder click on the now it's not used so i'm just going to install it first okay so it actually run by it's on my other screen so i'm just going to grab it here so as you can see here this is where the application is located so it's a bunch of crap but obviously it actually shows you where the application is so as you can see it's a very simple stuff so what i'm going to do is just going to leave it here i mean you can do pretty much to the same to other applications like um wpf winforms and whatnot so you can go ahead and use the same procedure on other projects to see what actually happened so if you've got any problem just drop a line and i'll do my best to reply as soon as possible so have a lovely morning afternoon evening wherever you are peace and catch up on my next video bye
Info
Channel: Hacked
Views: 252,561
Rating: undefined out of 5
Keywords: visual studio, visual studio 2019, microsoft visual studio, c# exe file, c# executable file, exe files, c# project to exe, c++ project to exe, python project to exe, generate exe in visual studio, exe in visual studio 2019, publish console application c#, c# deployment, visual studio 2019 deployment project, exe project visual studio, c#, c++, python, executable in c#, .net exe, visual studio click once, visual studio clickonce deployment
Id: pn7IPCuliZs
Channel Id: undefined
Length: 8min 39sec (519 seconds)
Published: Mon Dec 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.