Error with packaging as exe VS 2019 PS Tools ver 5.8.2


After the last update (Ver 5.8.2) I am receiving an error regarding permissions when compiling my project into an .exe. This wasn’t an issue in the previous release so I figured I’d throw it out here. I rolled back to the last release 5.8.1 and am successfully packaging the same project with no changes.

Error from output
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets(5,5): error MSB4018: The “PowerShellPackageTask” task failed unexpectedly.
System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Diagnostics.Process.Kill()
at PowerShellToolsPro.Packager.Bundler.d__18.System.IDisposable.Dispose()
at PowerShellToolsPro.Packager.Bundler.d__18.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at PowerShellToolsPro.Packager.Bundler.Bundle(String root)
at PowerShellToolsPro.Packager.BundleStage.Execute(PackageProcess process, StageResult previousStage)
at PowerShellToolsPro.Packager.PackageProcess.Execute()
at PowerShellToolsPro.MsBuild.PowerShellPackageTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Done building project “CMTGUI.pssproj” – FAILED.

Thanks for reporting this and sorry for the issue. I’ve created an issue to track: Error with packaging as exe VS 2019 PS Tools ver 5.8.2 · Issue #136 · ironmansoftware/issues · GitHub

I’ll see if we can get this resolved in the next version.

No worries at all, 5.8.1 works great for what I’m working on.

Let me know if you need any supporting info/data and I’ll be happy to submit.

1 Like