www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] compile single .cs file into single .dll file

  1. #1
    Join Date
    Jun 2008
    Posts
    118

    resolved [RESOLVED] compile single .cs file into single .dll file

    OK here's the question

    I have "component1.cs" file in the "D:\Site" directory and I need to compile it into "D:\Bin\component1.dll" file

    I looked around some tutorials. but can not find a way of doing it.

    Any ideas on how it can be done?

  2. #2
    Join Date
    Jun 2008
    Posts
    118
    Found the solution, strangly enough in the book that sit's on my shelf

    Here it comes

    These are the commands for comand line

    1) change your directory to where your .cs files are

    2) run next commant

    csc /t:library /r:System.dll /out:component1.dll component1.cs


    The things you might need to change:

    instead of plain csc you might need to put in a path to .NET framwork and then csc

    example:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc

    If you want to save .dll file in a different folder, you migh want to add a path to that folder

    example
    /out:C:\Bin\component1.dll



    I hope it'll help to those who, like me, does not read books too attentively, or does not have one.

    Refference book:

    Beggining ASP.NET1.1 with Visual C#.NET 2003, released by WROX, Chapter 13, p 470-475

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles