C
C#3y ago
Angius

I need help making my C sharp code into a exe in visual studio

What's the problem?
51 Replies
Angius
AngiusOP3y ago
And how are you publishing the project?
lia
lia3y ago
I need to make my visual studio code into an exe file but when I go to debug I can’t see it @Angius
Angius
AngiusOP3y ago
Publish a .NET console application using Visual Studio - .NET
Learn how to use Visual Studio to create the set of files that are needed to run a .NET application.
lia
lia3y ago
When I press publish I see something different @Angius
pip
pip3y ago
in visual studio press the green arrow button
lia
lia3y ago
Yes
pip
pip3y ago
so you're able to start the program in visual studio right?
lia
lia3y ago
Yes
pip
pip3y ago
go to your app in windows explorer
lia
lia3y ago
yes
pip
pip3y ago
show me
lia
lia3y ago
Okay
Angius
AngiusOP3y ago
(Pressing the green arrow produces a debug build, not a final optimized exe. You want to publish your app to get that)
pip
pip3y ago
ye but he said before he didnt even see debug so let's make sure we see that .exe then we can publish
lia
lia3y ago
what to take picture of
pip
pip3y ago
the windows explorer window
lia
lia3y ago
its in another language what do u want me to show u in ther e the debug?
pip
pip3y ago
i want to see you navigate to bin, debug, then .net and see whats in that folder
lia
lia3y ago
lia
lia3y ago
its not the right project tho
pip
pip3y ago
well that should be a brand new .exe if you just ran the program in Visual Studio
lia
lia3y ago
when i press it its just blank code tho
pip
pip3y ago
that .exe is a month old if you build your project in visual studio it should make a new one
lia
lia3y ago
can we be on call and ill sharescreen while u type what to do
pip
pip3y ago
go to dev-vc-0 ok press start your program closes immediately?
lia
lia3y ago
yes
pip
pip3y ago
is that intentional? o ok i see ok
lia
lia3y ago
no idk
pip
pip3y ago
is it because you're hitting escape or something?
lia
lia3y ago
i only press on start
pip
pip3y ago
ok well thats code that you probably have to fix then lol but anyway go to the right window in visual studio right click BonusProject then open in windows explorer open folder in file explorer at the bottom no its an option right click BonusProject open in file explorer "open folder in file explorer" go to bin that is your project
lia
lia3y ago
if someone doesnt have visual studio can they open it
pip
pip3y ago
they should be able to if not they just need something called ".net 6 runtime"
lia
lia3y ago
its the middle one?
pip
pip3y ago
its the top one double click open ok in your code at the end of what you're doing do "Console.ReadLine()" at the very end of Main good press start now open the .exe in the folder not the .exe.config, the .exe top there now if you want to "publish" your build which honestly for this isn't necessary
lia
lia3y ago
i want them to also see the code
pip
pip3y ago
follow the docs that the guy above linked you if you want them to see the code then you can link them your .cs file that's not in bin/debug
lia
lia3y ago
when i press publish it shows me something else
pip
pip3y ago
press finish
lia
lia3y ago
it shows me a different thing from him
pip
pip3y ago
press finish yes go to publsih again ok good go to the directory in windows explorer
lia
lia3y ago
directory?
pip
pip3y ago
directory = folder
lia
lia3y ago
which
pip
pip3y ago
right click on the project go to visual studio
lia
lia3y ago
its hebrew
pip
pip3y ago
go to visual studio
lia
lia3y ago
how do i send the teacher
pip
pip3y ago
make a google drive file attach your .exe then the .cs file
lia
lia3y ago
like this? it doesnt show the right page thank you very much
pip
pip3y ago
np

Did you find this page helpful?