.NET Framework Class Library
AppDomain..::.AppendPrivatePath Method

NOTE: This API is now obsolete. The non-obsolete alternative is PrivateBinPath.

Appends the specified directory name to the private path list.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")> _
<SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain := True)> _
Public Sub AppendPrivatePath ( _
    path As String _
)
Visual Basic (Usage)
Dim instance As AppDomain
Dim path As String

instance.AppendPrivatePath(path)
C#
[ObsoleteAttribute("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")]
[SecurityPermissionAttribute(SecurityAction.LinkDemand, ControlAppDomain = true)]
public void AppendPrivatePath(
    string path
)
Visual C++
[ObsoleteAttribute(L"AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")]
[SecurityPermissionAttribute(SecurityAction::LinkDemand, ControlAppDomain = true)]
public:
virtual void AppendPrivatePath(
    String^ path
) sealed
JScript
public final function AppendPrivatePath(
    path : String
)

Parameters

path
Type: System..::.String
The name of the directory to be appended to the private path.

Implements

_AppDomain..::.AppendPrivatePath(String)
Exceptions

ExceptionCondition
AppDomainUnloadedException

The operation is attempted on an unloaded application domain.

Remarks

The use of this property is not recommended, because it might change the probing path for assemblies after they have already been loaded. Use the AppDomainSetup..::.PrivateBinPath property instead.

The private path, or relative search path, is the path relative to the base directory where the assembly resolver probes for private assemblies.

.NET Framework Security

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 1.1, 1.0
Obsolete (compiler warning) in 3.5
Obsolete (compiler warning) in 3.5 SP1
Obsolete (compiler warning) in 3.0
Obsolete (compiler warning) in 3.0 SP1
Obsolete (compiler warning) in 3.0 SP2
Obsolete (compiler warning) in 2.0
Obsolete (compiler warning) in 2.0 SP1
Obsolete (compiler warning) in 2.0 SP2
See Also

Reference

Tags :


Community Content

Stanley Roark
CLR Team Blog: Why is AppDomain.AppendPrivatePath Obsolete?

For more information on why this is obsolete see the following article on the CLR blog:
http://blogs.msdn.com/clrteam/archive/2009/05/14/why-is-appdomain-appendprivatepath-obsolete.aspx


Page view tracker