[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

Pb with compilation option in C#

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
1 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
javilmerAuthor Commented:
it seems to work, thanks a lot

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now