简体   繁体   English

从Nuget Package Manager控制台内的解决方案资源管理器运行powershell脚本

[英]Running powershell script from solution explorer inside Nuget Package Manager Console

I have a few powershell scripts inside my c# project. 我在c#项目中有一些powershell脚本。 I added them to a solution folder. 我将它们添加到解决方案文件夹中。 Would it be possible to make VS2010 run them inside the nuget powershell console by one of these methods : 是否可以通过以下方法之一使VS2010在nuget powershell控制台中运行它们:

  • double clicking on the file 双击该文件
  • right click / open with 右键单击/打开
  • custom action on the context menu 上下文菜单上的自定义操作

Since the previous answer was posted this very simple package came about which does exactly what is needed: 自上一个答案发布以来,这个非常简单的软件包出现了,它确实需要:

In short, install the package and place those scripts in a folder called SolutionScripts . 简而言之,安装软件包并将这些脚本放在名为SolutionScripts的文件夹中。

We followed up on this question at http://nuget.codeplex.com/Thread/View.aspx?ThreadId=239161 . 我们在http://nuget.codeplex.com/Thread/View.aspx?ThreadId=239161上跟进了这个问题。

To summarize, try using an init.ps1 file. 总而言之,请尝试使用init.ps1文件。 Look at the MvcScaffold package for a good example of this. 看看MvcScaffold软件包就是一个很好的例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从visual studio命令提示符运行nuget包管理器控制台 - Run nuget package manager console from visual studio command prompt 无法打开 NuGet 包管理器控制台 - Unable to open the NuGet Package Manager Console 我无法从nuget软件包管理器控制台安装epson热敏打印机nuget - I am unable to install epson thermal printer nuget from nuget package manager console Asp.Net核心程序包管理器控制台。 安装NuGet库而不创建库/脚本文件夹 - Asp.Net Core Package Manager Console. Installing NuGet library not creating a library/script folder 通过恢复NuGet包在控制台上运行Nunit - Running Nunit on console through restoring NuGet Package 如何在PowerShell脚本中使用NuGet包? - How to use a NuGet package within a PowerShell script? EF Core使用NUGET Package Manager控制台或CMD - EF Core to use NUGET Package Manager Console or CMD 如何在 ubuntu 18.04.2 上访问 nuget 包管理器控制台 - How can I access the nuget package manager console on ubuntu 18.04.2 使用NuGet软件包管理器控制台为C#安装EMGU OpenCV - Using NuGet Package Manager Console to install EMGU OpenCV for C# 使用 NuGet 包管理器控制台时无法访问源 - Source unreachable when using the NuGet Package Manager Console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM