csc
does not work with .csproj
files. You have a few options:
use
msbuild
; for examplemsbuild ClassLibraryFunction.csproj
noting that you may need to change the output-type of the project (in the IDE this is Project Properties, Application, Output type; in the csproj file this is
<OutputType>Library</OutputType>
)use
csc
with the/recurse
switch; for example:csc /target:library /out:MyMaths.dll /recurse:*.cs
(which will compile all the
.cs
files in the current folder or in sub-folders)do nothing whatsoever, and just use the exe that you already have; a .NET exe can be referenced just like any other assembly, and any
public
types can be consumed