NAME

use-pathTopologyVersion

SYNOPSIS

Changes the DTE drive path topology version used by StudioShell.

SYNTAX

use-pathTopologyVersion [-version] <Version> [<CommonParameters>]

use-pathTopologyVersion -current [<CommonParameters>]

DESCRIPTION

The layout of the DTE drive may change between releases of StudioShell. This
cmdlet provides a way to keep scripts compatible across different versions
of StudioShell.

For instance, the 1.0 release of StudioShell supports a code model tree under
each project item:

dte:/solution/projects/MyProject/Program.cs/CodeModel

To facilitate code searches and isolate project properties from the code model,
the code model was moved to its own hive under the solution node in the 1.2
release of StudioShell:

dte:/solution/CodeModel/MyProject/Program.cs

If you have scripts that rely on the 1.0 path model, you can revert the path
topology to the 1.0 version using the use-pathTopologyVersion cmdlet:

use-pathTopologyVersion -version 1.0

The path topology change remains in effect for the duration of the session,
or until explicitly changed by invoking the cmdlet a second time.

To use the current path topology for the installed version of StudioShell,
invoke this cmdlet with the -current switch:

use-pathTopologyVersion -current

PARAMETERS

-version <Version>
the version of StudioShell path topology to use

Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters?


-current [<SwitchParameter>]
if specified, uses the path topology for the installed version of StudioShell

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?


<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS

None.

OUTPUTS

None.

NOTES



It is recommended that use of this cmdlet be restricted to solution modules. If
you have a solution that relies on an earlier version of StudioShell paths, you
can easily leverage your solution module and custom scripts my modifying your
solution module like so:
# this solution uses the 1.0 path model:
use-pathTopologyVersion 1.0;

$m = $MyInvocation.MyCommand.ScriptBlock.Module;
$m.OnRemove = {
    use-pathTopologyVersion -current;
}

EXAMPLES

EXAMPLE 1

C:\PS>use-pathTopologyVersion 1.0

This example changes the DTE path topology to match the 1.0 StudioShell release.

EXAMPLE 2

C:\PS>use-pathTopologyVersion -current

This example sets the DTE path topology to match the currently installed StudioShell version.

RELATED LINKS

get-pathTopologyVersion
PSDTE
about_StudioShell_Version
about_StudioShell_Path
about_StudioShell_SolutionModules

Last edited Dec 30, 2011 at 3:49 AM by beefarino, version 1

Comments

No comments yet.