[Mono-list] error CS0246: The type or namespace name `PrivateKey' could not be found

Sebastien Pouliot sebastien.pouliot at gmail.com
Fri Feb 23 07:59:47 EST 2007


Hello Viraj,

Try:

mcs s.cs -r:Mono.Security.dll

because, by default, mcs only reference (-r:) very few assemblies. So
you need to reference additional ones yourself.

On Fri, 2007-02-23 at 09:45 +0530, viraj wrote:
> hi all,
> i'm trying to compile a small command line application..
> 
> //http://projects.zillabit.com/authenticode.html
> using System;
> using System.IO;
> using System.Text;
> using Mono.Security.Authenticode;
> public class PrivateKeyTest {
>         private const string testfilein = "testin.pvk";
>         private const string testfileout = "testout.pvk";
>         public static void Main ()
>         {
>                 PrivateKey pvk = PrivateKey.CreateFromFile
> (testfilein, "my_actual_password");
>                 pvk.Save (testfileout);
>         }
> }
> 
> i keep getting this message,
> 
> viraj:/home/viraj# mcs s.cs
> s.cs(10,17): error CS0246: The type or namespace name `PrivateKey'
> could not be found. Are you missing a using directive or an assembly
> reference?
> Compilation failed: 1 error(s), 0 warnings
> 
> in mono api reference, it says this 'PrivateKey' resides in
> Mono.Security.Authenticode.PrivateKey Class.
> 
> i'm on debian etch, and my mono version is..
> 
> Mono JIT compiler version 1.2.2.1, (C) 2002-2006 Novell, Inc and
> Contributors. www.mono-project.com
>         TLS:           normal
>         GC:            Included Boehm (with typed GC)
>         SIGSEGV:       normal
>         Disabled:      none
> 
> am i missing anything here? is there a command to list/dump all
> available mono namespaces in my box, to a file?
> 
> thank you.
> 
> 
> ~viraj
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/



More information about the Mono-list mailing list