Compartilhar via


/vbruntime

Specifies that the compiler should compile without a reference to the Visual Basic Runtime Library, or with a reference to a specific runtime library.

/vbruntime:{ - | + | * | path }

Arguments

  • -
    Compile without a reference to the Visual Basic Runtime Library.

  • +
    Compile with a reference to the default Visual Basic Runtime Library.

  • *
    Compilar sem uma referência à biblioteca de tempo de execução de Visual Basic e incorporar funcionalidade de núcleo da biblioteca de tempo de execução de Visual Basic no assembly.

  • path
    Compile with a reference to the specified library (DLL).

Comentários

The /vbruntime compiler option enables you to specify that the compiler should compile without a reference to the Visual Basic Runtime Library. If you compile without a reference to the Visual Basic Runtime Library, errors or warnings are logged on code or language constructs that generate a call to a Visual Basic runtime helper. (A Visual Basic runtime helper is a function defined in Microsoft.VisualBasic.dll that is called at runtime to execute a specific language semantic.)

The /vbruntime+ option produces the same behavior that occurs if no /vbruntime switch is specified. You can use the /vbruntime+ option to override previous /vbruntime switches.

A incorporação de funções essenciais de tempo de execução de Visual Basic

O /vbruntime* opção permite que você compilar sem uma referência a umabibliotecade tempo de execução. Em vez disso, a funcionalidade principal da biblioteca de tempo de execução de Visual Basic é incorporada noassemblyde usuário. Você pode usar esta opção para permitir que seu aplicativo ser executado em plataformas que não contêm o Visual Basic de tempo de execução.

Os seguintes membros de tempo de execução são incorporados:

Se você compilar usando o /vbruntime* opção e seu código referencia um membro da biblioteca de tempo de execução de Visual Basic não está incorporada com a funcionalidade de núcleo, o compilador retorna um erro que indica que o membro não está disponível.

Fazendo referência a uma bibliotecade especificada

Você pode usar o pathargumento para compilar com uma referência a umabiblioteca do personalizadas tempo de execuçãoem vez do padrão de Visual Basic biblioteca de tempo de execução.

If the value for the path argument is a fully qualified path to a DLL, the compiler will use that file as the runtime library. If the value for the path argument is not a fully qualified path to a DLL, the Visual Basic compiler will search for the identified DLL in the current folder first. It will then search in the path that you have specified by using the /sdkpath compiler option. If the /sdkpath compiler option is not used, the compiler will search for the identified DLL in the .NET Framework folder (%systemroot%\Microsoft.NET\Framework\versionNumber).

Exemplo

The following example shows how to use the /vbruntime option to compile with a reference to a custom library.

vbc /vbruntime:C:\VBLibraries\CustomVBLibrary.dll

Consulte também

Referência

Exemplos de Linhas de Comando de Compilação (Visual Basic)

/sdkpath

Outros recursos

Compilador do Visual Basic

Histórico de alterações

Date

History

Motivo

Março de 2011

Adicionado o /vbruntime* opção.

Alteração de recurso do SP1.