C# console Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deeps khats
    New Member
    • Jan 2011
    • 1

    #1

    C# console Application

    Hello,
    Iam using C# console application, iam using mailchimp DLL as mailchimp incorporates 2 DLL
    mailchimp and cook computing

    i have added reference for both DLL..

    using System;
    using System.Collecti ons.Generic;
    using System.Linq;
    using System.Text;
    using CookComputing.X mlRpc;
    using MailChimp;

    namespace ConsoleApplicat ion1
    {
    class Program
    {
    static void Main(string[] args)
    {
    if (args == null)
    {
    Console.WriteLi ne("args is null"); // Check for null array
    }
    else
    {
    Console.Write(" args length is ");
    Console.WriteLi ne(args.Length) ; // Write array length
    for (int i = 0; i < args.Length; i++) // Loop through array
    {
    string argument = args[i];
    Console.Write(" args index ");
    Console.Write(i ); // Write index
    Console.Write(" is [");
    Console.Write(a rgument); // Write string
    Console.WriteLi ne("]");
    }
    }
    Console.ReadLin e();

    }
    }
    }

    when i build it builds successfully but when i go to command prompt to build exe by running command
    csc program.cs

    it showing namespace name cookcomputing could not be found missing a using directive or assembly reference.

    Please tell me whats problem iam trying since day iam not able to solve.

    thanks
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I've only compiled C# programs with Visual Studio, never from the csc command line compiler. If you can indeed do this and compile a code file on it's own, you need to tell it where that dll is, the one that contains the CookComputing namespace.

    You said you included the reference, but where did you put it?

    Comment

    Working...