Compilation Error "The name Convert is not declared"

F

fabrice

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
 
A

Andrea Zani

fabrice said:
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
....
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top