ComponentServices Class | MSBuild Extension Pack Help 4.0.12.0 |
AddComponent (Required: Path, ApplicationName Optional: Activation, Identity, UserPassword, Framework)
AddNativeComponent (Required: Path, ApplicationName Optional: Activation, Identity, UserPassword, Framework)
CheckApplicationExists (Required: ApplicationName Output: Exists)
CreateApplication (Required: ApplicationName Optional: Activation, EnforceAccessChecks, Identity, UserPassword)
DeleteApplication (Required: ApplicationName)
RemoveComponent (Required: Path Optional: Framework)
SetConstructor (Required: ApplicationName, ComponentName, ConstructorString)
SetAccessIisIntrinsicProperties (Required: ApplicationName, ComponentName Optional: AllowIntrinsicIisProperties)
SetTransactionSupport (Required: ApplicationName, ComponentName, Transaction)
ShutDownApplication (Required: ApplicationName)
UpdateApplication (Required: ApplicationName Optional: Activation, Identity, UserPassword)
Remote Execution Support: No
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.ComputerComponentServices
Namespace: MSBuild.ExtensionPack.Computer
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The ComponentServices type exposes the following members.
Name | Description | |
---|---|---|
ComponentServices |
Name | Description | |
---|---|---|
Activation |
Sets the type of activation for the application. Defaults to "Local". Supports: Local (server application), Inproc (library application)
| |
AllowIntrinsicIisProperties |
Sets whether or not component services allows access to Intrinsic IIS properties, used for Windows 2003
components on Windows 2008 and later. Defaults to "False". Supports: True, False (allow access to Intrinsic IIS properties)
| |
ApplicationName |
Sets the name of the COM+ Application.
| |
ComponentName |
Sets the name of the COM+ component
| |
ConstructorString |
Sets the constructor string for the specified COM+ component. If empty, then the constructor support is removed
| |
EnforceAccessChecks |
Sets whether or not component services enforces access checks for this application. Defaults to "True". Supports: True (Enforce access checks), False
| |
Exists |
Gets whether the application exists.
| |
Framework |
Sets the version of the .NET FrameWork. Defaults to "v2.0.50727"
| |
Identity |
Sets the process identity for the application. Specify a valid user account or "Interactive User" to have the application assume the identity of the current logged-on user.
| |
Path |
Sets the path to the DLL to be added to the application
| |
Transaction |
Sets the Transaction support for the component. Supports: Ignored, None [Default], Supported, Required, RequiresNew
|
<Project ToolsVersion="4.0" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <Target Name="Default"> <!--- Add a component --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="AddComponent" Path="C:\Projects\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication" Identity="Interactive User"/> <!-- Check it exists --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication"> <Output TaskParameter="Exists" PropertyName="DoI"/> </MSBuild.ExtensionPack.Computer.ComponentServices> <Message Text="Exists: $(DoI)"/> <!--- Remove the component --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="RemoveComponent" Path="C:\Projects\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication"/> <!-- Check it exists again--> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication"> <Output TaskParameter="Exists" PropertyName="DoI"/> </MSBuild.ExtensionPack.Computer.ComponentServices> <Message Text="Exists: $(DoI)"/> <!--- Add a component --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="AddComponent" Path="C:\Projects\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication" Identity="Interactive User"/> <!-- Check it exists --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication"> <Output TaskParameter="Exists" PropertyName="DoI"/> </MSBuild.ExtensionPack.Computer.ComponentServices> <Message Text="Exists: $(DoI)"/> <!-- Various quick tasks --> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="ShutDownApplication" ApplicationName="MyApplication"/> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="UpdateApplication" Activation="Inproc" ApplicationName="MyApplication"/> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetTransactionSupport" Transaction="RequiresNew" ComponentName="BankComponent.Account" ApplicationName="MyApplication"/> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetConstructor" ComponentName="BankComponent.Account" ApplicationName="MyApplication" ConstructorString="demo"/> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetConstructor" ComponentName="BankComponent.Account" ApplicationName="MyApplication" ConstructorString=""/> <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="DeleteApplication" ApplicationName="MyApplication"/> </Target> </Project>