locked
How to build C# using DDK environment NMAKE command?

    Question

  • I have "makefile", "sources", "makefile.inc" and all .CS files in directory,  I want to use a command NMAKE to build it, like DDK build environment. How can I build it?

    ------------ Sources file begin --------------------

    !INCLUDE csharp_inc.inc

    TARGETNAME=CSharpBuildTest
    TARGETTYPE=DYNLINK
    SOURCES=    \
            AssemblyInfo.cs         \
            source1.cs    \
            source2.cs     \
    REFERENCES=System.dll;  \

    ------------ Sources file end ----------------

    ------------- makefile file begin -------------

    !include $(NTMAKEENV)\makefile.def

    ------------- makefile file end ----------------

    Can anyone help me?

    Thanks!

    Friday, January 13, 2006 2:42 AM

Answers

  • Going forward, the preferred mechanism is to drive msbuild. (MSBuild is the build tool that Visual Studio 2005 calls to build projects/solutions. MSBuild ships with the .NET Framework SDK. So there's no licensing issues.) If you want to do it by hand, you would execute csc.exe, the C# compiler.
    Friday, January 13, 2006 8:49 PM