0

As part of my project I have two files that I need to compile, and they both depend on System.Windows.Forms and System.Drawing. When compiling I write:

mcs engine.cs -r:System.Windows.Forms.dll,System.Drawing.dll mcs main.cs -r:System.Windows.Forms.dll,System.Drawing.dll,engine.exe

Right now this is a nuisance, but manageable, but I am afraid that it will get worse once I write more code. I am not using Visual Studio as I found it easier to just use Atom for everything.

I tried to search for Atom packages that can handle this automatically; bash scripts that compile with the references in the background, but I'm curious to know if there is a simpler way that I'm just not seeing.

Thanks.

LuckyMG
  • 1
  • 3
  • You can create project file (csproj) and write all dependencies there. And then build the project just with simple `dotnet build`. By the way, `System.Drawing & Windoes.Forms` are Windows-only and you may hit a problems trying to use them on Linux. – Serg Nov 30 '22 at 12:04
  • Isn't Atom being sunset this month and will not receive any further updates? I doubt it received much updates in recent years anyway. – Evk Nov 30 '22 at 12:13
  • @Serg Yeah, this is what I needed. Appreciate the help! – LuckyMG Nov 30 '22 at 12:22
  • You might look at this: https://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable – Vic F Dec 01 '22 at 13:44

0 Answers0