TaskItem.InitializeLifetimeService Method

This member has a SecurityCriticalAttribute attribute, which restricts it to internal use by the .NET Framework for Silverlight class library. Application code that uses this member throws a MethodAccessException.

[SECURITY CRITICAL]

When overridden in a derived class, gives task items infinite lease time.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Syntax

'Declaration
<SecurityCriticalAttribute> _
Public Overrides Function InitializeLifetimeService As Object
[SecurityCriticalAttribute]
public override Object InitializeLifetimeService()
[SecurityCriticalAttribute]
public:
virtual Object^ InitializeLifetimeService() override
[<SecurityCriticalAttribute>]
abstract InitializeLifetimeService : unit -> Object 
[<SecurityCriticalAttribute>]
override InitializeLifetimeService : unit -> Object
public override function InitializeLifetimeService() : Object

Return Value

Type: System.Object
nulla null reference (Nothing in Visual Basic) to specify an infinite lifetime.

See Also

Reference

TaskItem Class

Microsoft.Build.Utilities Namespace