C
C#2y ago
Ciro

❔ Visual Studio build solution problem

Hi, i just finished writing my c# console app with .Net Core but i cant run it in other folder thats not the bin/debug/net7.0/
38 Replies
Ciro
CiroOP2y ago
crashing too fast lemme see same tries to start and then it crashes
apollyon_unknown
add the dll to the location where u want to run it as well.. might just want to add a shortcut to the application executable.
Ciro
CiroOP2y ago
nope, same thing nothing
Jayy
Jayy2y ago
I have no idea what that video is supposed to convey What should the application be doing What is the code We have so little useful information here
Ciro
CiroOP2y ago
Open the tab and work
Jayy
Jayy2y ago
That tells me literally nothing
Ciro
CiroOP2y ago
I showed you the app working in the same video You can see how the windows logo on the taskbar moving so you can think that something tried to open and then closed instantly
Jayy
Jayy2y ago
Ohhhhh i see now that was fast Ya that's not how an exe works with dotnet lol The exe isn't standalone
Ciro
CiroOP2y ago
i also tried moving it with the other files
Jayy
Jayy2y ago
The exe is literally just a small wrapper around running dotnet yourdll.dll
Ciro
CiroOP2y ago
in other folder
Jayy
Jayy2y ago
Move the entire folder
Ciro
CiroOP2y ago
i tried same result
Jayy
Jayy2y ago
Then we'd need to see the code Why are you trying to move the debug folder anyway That's a weird ass thing to try and do
Ciro
CiroOP2y ago
I wanna upload to github
Jayy
Jayy2y ago
Wut No
Ciro
CiroOP2y ago
Yes
Jayy
Jayy2y ago
Like as a release?
Ciro
CiroOP2y ago
yee
Jayy
Jayy2y ago
Your build output should not be in a repo And the debug folder is not a release build lol
Ciro
CiroOP2y ago
what do u refer?
Jayy
Jayy2y ago
Like it's just for you to debug If you want to publish and application you have to... publish it
Ciro
CiroOP2y ago
some tutorial u wanna show me?
Jayy
Jayy2y ago
dotnet publish command - .NET CLI
The dotnet publish command publishes a .NET project or solution to a directory.
Ciro
CiroOP2y ago
i thought that with that .exe everything would work
Jayy
Jayy2y ago
But if you have hardcoded paths in your code you won't be able to do anything No lol, the exe doesn't do anything All it does it's just execute the command to run the dll
Ciro
CiroOP2y ago
lol
Jayy
Jayy2y ago
So if you move the exe file it can't find the dll anymore and there's nothing to run
Ciro
CiroOP2y ago
damn thanks bro didnt know that
Ciro
CiroOP2y ago
Ciro
CiroOP2y ago
What should i use?
Jayy
Jayy2y ago
No clue I've never used a vs publish window
Ciro
CiroOP2y ago
Maybe with the command, can u help me?
Jayy
Jayy2y ago
I mean it depends on what you want
Ciro
CiroOP2y ago
A single.exe that will run my code as it does in the build
Jayy
Jayy2y ago
It doesn't do that in the build right now it calls the exe So you want a single file publish, but do you want an AOT compilation or a bundled runtime
Ciro
CiroOP2y ago
Okay, gonna find out Thank you so much!
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server