Pb with compilation option in C#

Posted on 2005-04-10
Last Modified: 2010-04-16
We need to make modification in a .NET web application and are struggling to recompile things.
We have a file called stag.asp with code behing (stag.aspx.cs). We made modification in the stag.aspx.cs and need to recompile it. But in the bin directory, we don't have a stag.dll but a big file called FINALE.dll, so we guess the result of the compilation should be in this file ??

First two lines of stag.aspx :

<%@ Register TagPrefix="uc1" TagName="PageEnteteMenu" Src="ucs/PageEnteteMenu.ascx" %>
<%@ Page language="c#" Codebehind="stag.aspx.cs" AutoEventWireup="false" Inherits="FINALE.stag" culture="fr-FR" enableViewState="True"%>

Fisrt lines of stag.aspx.cs :
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace FINALE
  using ucs;

So what option do we need to specify when compiling (with command line) ?

Any help greatly appreciated
Question by:javilmer
    LVL 2

    Accepted Solution

    you need to compile the files again (i dont know how many files there are)

    for Microsoft.NET
    csc /t:library /r:System.Web.dll /out:FINALE.dll *.cs

    or for Mono:
    mcs /t:library /r:System.Web.dll /out:FINALE.dll *.cs

    but be carefull. mabey there are some code behind files that shoudnt be included.
    so for this case use:
    csc /t:library /r:System.Web.dll /out:FINALE.dll file1.cs file2.cs file3.cs
    .... and so on

    And i don t know if you need to reference System.Drawing.dll because you re using the namespace. for this.. /r:System.Web.dll,System.Drawing.dll

    mfg WebSpecials

    Author Comment

    it seems to work, thanks a lot

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now