AssemblyInstaller.UseNewContext Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se deve criar um novo InstallContext objeto para a instalação do conjunto.
public:
property bool UseNewContext { bool get(); void set(bool value); };
public bool UseNewContext { get; set; }
member this.UseNewContext : bool with get, set
Public Property UseNewContext As Boolean
Valor de Propriedade
true se um novo InstallContext objeto for criado para a instalação do montagem; caso contrário, false. A predefinição é true.
Exemplos
No exemplo seguinte, um AssemblyInstaller é criado invocando o AssemblyInstaller construtor. A UseNewContext propriedade deste objeto é definida para true e o Install método é invocado na MyAssembly_HelpText.exe montagem. Por causa disso, as mensagens de registo são exibidas na consola.
// Create an Object* of the 'AssemblyInstaller' class.
AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller(
"MyAssembly_HelpText.exe", commandLineOptions );
// Set the 'UseNewContext' property to true.
myAssemblyInstaller->UseNewContext = true;
// Create an object of the 'AssemblyInstaller' class.
AssemblyInstaller myAssemblyInstaller = new
AssemblyInstaller( "MyAssembly_HelpText.exe", commandLineOptions );
// Set the 'UseNewContext' property to true.
myAssemblyInstaller.UseNewContext = true;
' Create an object of the 'AssemblyInstaller' class.
Dim myAssemblyInstaller As _
New AssemblyInstaller("MyAssembly_HelpText.exe", commandLineOptions)
' Set the 'UseNewContext' property to true.
myAssemblyInstaller.UseNewContext = True
Observações
Definir esta propriedade para true criar um novo ficheiro chamado "{Nome da assembleia}. InstallLog" para registar mensagens para esta assembleia. Definir UseNewContext para false impedir que o novo ficheiro seja criado.