I have a number of tools that are more like scripts that full-fledged programs and in the olden days I would simply call the csc.exe
compiler and throw the program.cs
in there like this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
/out:NasPath.exe
/target:exe
/optimize+
/debug-
/platform:x64
NasPath.cs
I'm pretty certain that .net 4.8.1 will be around on Windows for quite some time but for my learning journey I was curious if there's a simple way to compile such a C# file in net7.0
or if I always need at least a .csproj
file for that.