C
C#17mo ago
marsastro

✅ Compile visual studio project on linux?

I've developed a .net 7 console app in Visual Studio, and I'd like to deploy it on a VPS that runs linux so I don't have to run it locally (I don't keep my computer running at night). I can just build it for linux and transfer that over, but I'm curious if there's a not too complicated way to build the project natively on linux. That way I can clone the repo and pull and recompile whenever I update the app, instead of always having to transfer a finished build over. Is there an easy way to do this?
6 Replies
sibber
sibber17mo ago
yeah just build with the cli dotnet publish -c Release
Angius
Angius17mo ago
No such thing as a "visual studio project" btw It's a .NET project. You can write it with Nano, Notepad, or whatever else
marsastro
marsastro17mo ago
Oh, right! I thought maybe the solution file had some important information for the building. Thanks, I'll give it a shot!
chef drone builder
you can either build a project or an entire solution with the dotnet cli:
Accord
Accord17mo 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.
marsastro
marsastro17mo ago
Worked like a charm!