Package Modules is not packaging modules

Ok. Thanks for the heads up. There is something funky going on with the VS builder…

Adam - If you’re interested, I solved my Visual Studio packaging problem. My execution policies were:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Unrestricted

I set CurrentUser to Unrestricted and the packaging works now.

hi there, i seem to be getting the same issue within visual studio where by it wont package the modules? I get the following error whe it tries to create an exe.
the module im trying to import is ‘NTFSSecurity’

‘C:\Users\veeam.admin\AppData\Local\Temp\6\87b7ad0df51547d29ab19d8fbac60b2b\Modules\NTFSSecurity\NTFSSecurity.dll’ already exists. ExamFiles C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets 5

Chris – For me, the fix was to set the execution policy for my user account to Unrestricted.

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Get-ExecutionPolicy -List

Scope ExecutionPolicy


MachinePolicy Undefined

UserPolicy Undefined

Process Undefined

CurrentUser Unrestricted

LocalMachine Bypass

my current user is already set as that?

moment i untick the package modules box it builds the exe, which then isnt very useful without the module

We have an issue where it’s attempting to package the module twice. Sometimes this can happen from multiple Import-Module statements of the same module but we’re seeing it happen even when that isn’t the case. Hope to have a fix out in the next couple of days.

1 Like

ok, yeah im pretty sure my code only imports that module once…Ill double check tho as could do with this fixed asap…tightline for me, and if i have got it twice and thats the reason it.ll help me, otherwise i’ll await the fix

Cheers

nope sods law i only have it once