Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
System Namespace
AppDomain Class
AppDomain Methods
 AppendPrivatePath Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.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)
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)
ExceptionCondition
AppDomainUnloadedException

The operation is attempted on an unloaded application domain.

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.

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.

.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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
CLR Team Blog: Why is AppDomain.AppendPrivatePath Obsolete?      Stefan Wenig ... Stanley Roark   |   Edit   |   Show History

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

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker