powershell - Add install.ps1 on Class Library (.NET Standard) Project -
i have migrate .net framework project .net standard project.
in .net framework project have .nuspec file additional file config , create nuget package "nuget.exe pack"
<files> <file src="install.ps1" target="tools\install.ps1" /> </files in .net standard project have not longer nuspec file , switch "msbuild -t:pack" create nuget package. have try set install.ps1 (buildaction = content) see warning in log "issue: powershell file out side tools folder." , in nupkg file directory "content\tools\install.ps1" need "tools\install.ps1".
to file different path in package can use <packagepath> element in <content> element this:
<itemgroup> <content include="install.ps1"> <packagepath>tools\</packagepath> </content> </itemgroup> (providing install.ps1 in root of project, otherwise you'll have adjust include attribute value)
for more information check out docs pack msbuild target here:
https://github.com/nuget/home/wiki/adding-nuget-pack-as-a-msbuild-target
Comments
Post a Comment