简体   繁体   中英

Extract the code into an executable file vb.net

For example i have this code

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim i As String
        i = xx
        MsgBox(i)
    End Sub

i want to make this code in exe file when click button in runtime

Since you are using VB.Net. Just click on the Debug button. Or F5 button to debug it. Also, your string should include quotes like "xx".

Like the other answers said, Visual Studio will automatically build an executable file for you. This happens when you debug or build your app. Press F5 to debug/run or build your application by right clicking your application in the solution explorer and selecting "build". This will create a .exe in the Debug folder of your Application. To find it, right click your application in the solution explorer and select open folder in file explorer. This will take you to the root folder of your application. Once there open "bin' then "debug" then run the file with your application name as its title and that ends in .exe(myapplication\\bin\\debug\\myapplication.exe).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM