我试图找到程序包管理器控制台的启动脚本,它是加载所有NuGet和Entity Framework cmdlet的程序。VS2013中的程序包管理器控制台初始化文件
我发现:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\NuGet Packages\EntityFramework.5.0.0\tools\init.ps1
和
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\NuGet Packages\EntityFramework.6.0.0\tools\init.ps1
,但我不知道他们正在运行。 (我添加了一些写 - 主机调用,但文本没有出现。)
任何想法?我想打电话给我定期的PS启动脚本来获得我所有的别名,以及posh-git。
谢谢你,我的路径略有不同,但Profile.ps1就是我一直在寻找;我可以从那里运行我的首选启动脚本。 有没有办法找到Profile.ps1中的文件?在Profile.ps1之后执行... – Number8
不确定是否存在位于同一位置的NuGet.psd1,并指定Profile.ps1作为唯一要执行的脚本,如果执行了其他脚本,则可以通过PS主机本身(而不是其他脚本)。但是,您可能会发现此信息很有帮助:http://poshoholic.com/2008/03/18/powershell-deep-dive-using-myinvocation-and-invoke-expression -to-support-dot-sourcing-and-direct-invocation-in-shared-powershell-scripts/ –
特别讨论关于文章中途的“$ MyInvocation.InvocationName”部分。 –