Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio StudioShell不会在退出Visual Studio 2012时保存DTE:\WindowConfiguration_Visual Studio_Powershell_Visual Studio 2012_Studioshell - Fatal编程技术网

Visual studio StudioShell不会在退出Visual Studio 2012时保存DTE:\WindowConfiguration

Visual studio StudioShell不会在退出Visual Studio 2012时保存DTE:\WindowConfiguration,visual-studio,powershell,visual-studio-2012,studioshell,Visual Studio,Powershell,Visual Studio 2012,Studioshell,当我使用下面的示例创建新的窗口配置时,它不会在退出Visual Studio 2012时保存配置。是否应该运行cmdlet来强制进行此更改 cd dte:\windowconfiguration new-item Work ls-dte:\windowconfigurations 位置:studioshell\PSDTE::WindowConfiguration 可用操作:d+< 名称 ---------- ----

当我使用下面的示例创建新的窗口配置时,它不会在退出Visual Studio 2012时保存配置。是否应该运行cmdlet来强制进行此更改

cd dte:\windowconfiguration
new-item Work

ls-dte:\windowconfigurations
位置:studioshell\PSDTE::WindowConfiguration
可用操作:d+<
名称
---------- ----                                                                                                                               
~z~我去调试
~z~我喜欢设计
~z~我不是奥尔温

窗口配置很棘手,从2008年到2010年(以及2012年),窗口配置的行为似乎发生了变化

TL;DR:使用new item创建一个新配置,然后立即在新配置上调用invoke item。然后,退出visual studio时将保存配置,再次启动visual studio时将重新加载配置

窗口配置将作为winprf(windows配置文件)xml文件保存到%APPDATA%\microsoft\visualstudio\11.0文件夹中。此外,还有一个windows.index文件,它基本上是winprf文件的配置名称索引

使用新项将一个条目添加到windows.index文件中;但是,它不会强制创建实际存储windows设置的winprf文件。这似乎只有在应用了windows配置(使用invoke项)的情况下才能完成。这与2008年的行为不同,在2008年,支持新项的dte操作将神奇地为您创建索引项和winprf文件

我已更改windows配置路径的新项的行为,以强制windows配置的持久性。它将在下一个维护版本中提供;在此之前,解决办法是:

new-item dte:/windowconfigurations/myawesomeconfig # this creates the index
invoke-item dte:/windowconfigurations/myawesomeconfig # this forces VS to acknowledge the profile and save it on exit.

窗口配置很复杂,从2008年到2010年(以及到2012年),它的行为似乎发生了变化

TL;DR:使用new item创建一个新配置,然后立即在新配置上调用invoke item。然后,退出visual studio时将保存配置,再次启动visual studio时将重新加载配置

窗口配置将作为winprf(windows配置文件)xml文件保存到%APPDATA%\microsoft\visualstudio\11.0文件夹中。此外,还有一个windows.index文件,它基本上是winprf文件的配置名称索引

使用新项将一个条目添加到windows.index文件中;但是,它不会强制创建实际存储windows设置的winprf文件。这似乎只有在应用了windows配置(使用invoke项)的情况下才能完成。这与2008年的行为不同,在2008年,支持新项的dte操作将神奇地为您创建索引项和winprf文件

我已更改windows配置路径的新项的行为,以强制windows配置的持久性。它将在下一个维护版本中提供;在此之前,解决办法是:

new-item dte:/windowconfigurations/myawesomeconfig # this creates the index
invoke-item dte:/windowconfigurations/myawesomeconfig # this forces VS to acknowledge the profile and save it on exit.

令人惊叹的。新项后的invoke项解释了为什么我有时看到windows配置被保存,而其他时候没有保存。很明显,我可以用Studio Shell做更多的事情,但仅仅是windows配置和删除不必要菜单项的能力,就让它成为一个非常棒的工具。新项后的invoke项解释了为什么我有时看到windows配置被保存,而其他时候没有保存。显然,我可以用studioshell做更多的事情,但仅仅是windows配置和删除不必要菜单项的能力就使得它成为一个非常好的工具。