nuget pack C:\Users\%USERNAME%\Source\Repos\Common\Common\Common.nuspec -OutputDirectory D:\NugetFeed
The above code is what is in my nugetpack.ps1 file. It works perfectly when I directly enter my username is the path, but I need it to be able to work for multiple users. I entered the %USERNAME% username variable into the path but I get the following response:
Could not find a part of the path 'C:\Users\%USERNAME%\Source.....'.
How can I use the %USERNAME% variable in my path. I am new to PowerShell.