Compilation Error "The name Convert is not declared"

Discussion in 'ASP .Net' started by fabrice, Aug 18, 2005.

  1. fabrice

    fabrice Guest

    Hello

    I'm getting an error during a .vb file compilation.

    My command is :

    vbc /t:library /r:system.web.dll /r:system.dll /r:mscorlib.dll myFile.vb


    The error is :


    Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
    pour Microsoft (R) .NET Framework version 1.1.4322.2300
    Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.

    F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est pas
    déclaré.
    Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
    ~~~~~~~
    F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
    n'est pas
    déclaré.

    Dim buffer As Byte() = Convert.FromBase64String(value)


    --> The name Convert is not declared.

    The reference to mscorlib.dll assembly is realised. I don't understand the
    error for the name Convert.
    Which assembly do i used ?


    Thanks for your help.

    Fabrice
    fabrice, Aug 18, 2005
    #1
    1. Advertising

  2. fabrice

    Andrea Zani Guest

    fabrice <> ha scritto:
    > Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
    > pour Microsoft (R) .NET Framework version 1.1.4322.2300
    > Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.
    >
    > F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est
    > pas déclaré.
    > Return Convert.ToBase64String(ms.GetBuffer(), 0,
    > ms.Length) ~~~~~~~
    > F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
    > n'est pas
    > déclaré.
    >
    > Dim buffer As Byte() = Convert.FromBase64String(value)
    >
    >
    > --> The name Convert is not declared.
    >
    > The reference to mscorlib.dll assembly is realised. I don't
    > understand the error for the name Convert.
    > Which assembly do i used ?


    In your code, you have inserted the import for the namespace System?

    imports System
    imports System.Data
    ....
    > Thanks for your help.
    >
    > Fabrice


    --
    AZ [Microsoft - .NET MVP]
    Mia Home page: http://ciclismo.sitiasp.it
    Asp.Net community: http://www.aspitalia.com
    Il mio blog: http://blogs.aspitalia.com/az
    Andrea Zani, Aug 18, 2005
    #2
    1. Advertising

  3. Fabrice,

    Just use System.Convert.To...

    Eliyahu

    "fabrice" <> wrote in message
    news:...
    > Hello
    >
    > I'm getting an error during a .vb file compilation.
    >
    > My command is :
    >
    > vbc /t:library /r:system.web.dll /r:system.dll /r:mscorlib.dll myFile.vb
    >
    >
    > The error is :
    >
    >
    > Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
    > pour Microsoft (R) .NET Framework version 1.1.4322.2300
    > Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.
    >
    > F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est pas
    > déclaré.
    > Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
    > ~~~~~~~
    > F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
    > n'est pas
    > déclaré.
    >
    > Dim buffer As Byte() = Convert.FromBase64String(value)
    >
    >
    > --> The name Convert is not declared.
    >
    > The reference to mscorlib.dll assembly is realised. I don't understand the
    > error for the name Convert.
    > Which assembly do i used ?
    >
    >
    > Thanks for your help.
    >
    > Fabrice
    >
    >
    Eliyahu Goldin, Aug 18, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vittal
    Replies:
    2
    Views:
    687
    Gordon Burditt
    Jul 8, 2003
  2. =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    Replies:
    5
    Views:
    1,277
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=
    May 6, 2006
  3. Gavin
    Replies:
    3
    Views:
    458
    Chris Uppal
    Mar 28, 2007
  4. C__chp
    Replies:
    4
    Views:
    493
    Puppet_Sock
    Feb 15, 2008
  5. Tassador

    const string error compilation - error C2679

    Tassador, Jul 19, 2009, in forum: C Programming
    Replies:
    0
    Views:
    613
    Tassador
    Jul 19, 2009
Loading...

Share This Page