【发布时间】:2020-01-20 17:53:51
【问题描述】:
nuget pack C:\Users\%USERNAME%\Source\Repos\Common\Common\Common.nuspec -OutputDirectory D:\NugetFeed
上面的代码是我的 nugetpack.ps1 文件中的内容。当我直接输入我的用户名是路径时,它工作得很好,但我需要它能够为多个用户工作。我在路径中输入了 %USERNAME% 用户名变量,但得到以下响应:
找不到路径“C:\Users\%USERNAME%\Source.....”的一部分。
如何在我的路径中使用 %USERNAME% 变量。我是 PowerShell 的新手。
【问题讨论】:
标签: powershell nuget nuget-package