C
C#11mo ago
FacePalmGamer

✅ Compile with bat file

Is there an easy way to compile and run in a bat file? I have a discord bot I am messing around with, and I am trying to make it redeploy itself whenever a github push is made. I can already detect when a push is made by just looking for the webhook post in a channel, then I know how to pull from git in batch, but I'm not sure how to compile the code then start the program. I read something about the csc command, but I'm not sure how to install that on my pc or use it really
2 Replies
jcotton42
jcotton4211mo ago
csc is the compiler, there's little reason to invoke it directly, it comes with the SDK, but as a DLL and not a standalone exe instead you use dotnet build or dotnet publish to compile projects the latter of which produces output intended for distribution
FacePalmGamer
FacePalmGamer11mo ago
just running it locally I sohuld just build then navigate to the debug and start im assuming? awesome I got it. TY