I’m writing this post "I don’t know if it already asked before " because I need to know how to modify the default Package.psd1 “Default Manifest (i don’t know the correct name of it)”, I’m nearby in the scripting world and is annoying to change every time the package.psd1 with adding the same parameters.
Currently not possible but would be pretty easy to add.
What if we added a way to create a template package.psd1? For example, you could create it in %AppData%\PowerShellProTools. Then we would have some replacement parameters.
First of all, thanks Adam for the quick Answer, I really appreciate it a lot.
looks good to have a template of it, because I have a real problem with the Execution policy so sometimes I forgot to add like today and I don’t know why if the execution policy is not declared, you cannot write to Regedit .
So PowerShellArguments = '-ExecutionPolicy bypass ’ is important and RequireElevation = $true too "all of my script Require Elevation "
I follow what you write and i have just one problem,
the value of package.psd1 "Root = ‘$fileName’ " will still like this and during compile dosent work.
Outputfile is ok and create the folder normally.
i wrong something?
Exception running command: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Exception: File $fileName does not exist.
at PowerShellToolsPro.Packager.BundleStage.Execute(PackageProcess process, StageResult previousStage) in D:\a\1\s\PowerShellToolsPro.Packager\PackageProcess.cs:line 305
at PowerShellToolsPro.Packager.PackageProcess.Execute() in D:\a\1\s\PowerShellToolsPro.Packager\PackageProcess.cs:line 63
at PowerShellToolsPro.PoshToolsServer.Package(String packageFile) in D:\a\1\s\PowerShellProTools.Host\PoshToolsServer.cs:line 284
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at PowerShellToolsPro.PoshToolsServer.Start(String pipeName) in D:\a\1\s\PowerShellProTools.Host\PoshToolsServer.cs:line 95