Build Assembly from command line

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

Hello,

I have a C# file that I want to build into a dll assembly.
The big problem I have in doing this are the 2 required
references in the file.

One reference is to the Interop Assembly SHDocVW,
and the second reference is to mshtml .

The code for the C# file begins as follows:

using System;
using System.Collections;
using System.Diagnostics;
using System.Threading;
using mshtml;
using SHDocVw;


namespace IEAutomation {
/// <summary>
/// Summary description for IEDriver.
/// </summary>

public class IEDriver {


blah blah


}
}

I have tried to use the following command line exe that spits
out error messages on the 2 references :

csc /out:IEDriver.dll /t:library IEDriver.cs

please help, sincerely Rob
 
Nevermind, I found the answer:

csc /target:library /out:IEDriver.dll /reference:Interop.SHDocVW.dll /reference:Microsoft.mshtml.dll IEDriver.cs
Hello,

I have a C# file that I want to build into a dll assembly.
The big problem I have in doing this are the 2 required
references in the file.

One reference is to the Interop Assembly SHDocVW,
and the second reference is to mshtml .

The code for the C# file begins as follows:

using System;
using System.Collections;
using System.Diagnostics;
using System.Threading;
using mshtml;
using SHDocVw;


namespace IEAutomation {
/// <summary>
/// Summary description for IEDriver.
/// </summary>

public class IEDriver {


blah blah


}
}

I have tried to use the following command line exe that spits
out error messages on the 2 references :

csc /out:IEDriver.dll /t:library IEDriver.cs

please help, sincerely Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top