I updated my PWPS_DAB from version 1.5.15.0 to version 1.11.2.0, and now when running some previously working code
$fldrs = Get-PWFolders -FolderPath $PathSource -slow
I get the following error..
Get-PWFolders : Error: Unable to load DLL 'PWSearchWrapper.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at PWSearch.SearchForProjectsByTree(Int32 iParentProjectId, IntPtr& ppProjects, IntPtr& ppComponentClassIds, IntPtr& ppComponentInstanceIds, IntPtr& ppEnvironmentIds, IntPtr& ppWorkflowIds, IntPtr& ppParentIds, IntPtr& ppStorageIds, IntPtr& ppIsParent, String[]& arProjectNames, String[]& arProjectDescriptions, String[]& arProjectCodes, Int32& iCountP) at PWSearch.GetAllProjectsInBranch(Int32 iParentProjectId, Boolean bGetPath) at PWPS_DAB.GetPWFolders.ProcessRecord() At \\jdcpwaut01\iPasDT-FolderCopy\iPasDT-FolderCopy.ps1:79 char:14 + $fldrs = Get-PWFolders -FolderPath $PathSource -slow + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-PWFolders], Exception + FullyQualifiedErrorId : Error getting ProjectWise folders.,PWPS_DAB.GetPWFolders
any help will be greatly appreciated
kind regards Gavin Chapman
Hi Gavin...Same again here, when downgrading to 1.5.15.0.. Maybe a windows update or something else caused this. Will await Bentley's investigation:
PS C:\Windows\system32> Get-InstalledModule -Name PWPS_DAB
Version Name Repository Description ------- ---- ---------- ----------- 1.5.15.0 pwps_dab PSGallery ProjectWise PowerShell Cmdlets from System Architecture Group
PS C:\Windows\system32> New-PWLogin @NALoginTrue
PS C:\Windows\system32> $folders = Get-PWFolders -FolderPath "Admin Area\Templates\TSP Template Project" -JustOne
PS C:\Windows\system32> $b = Get-PWFolders -FolderID $folders.ProjectID | Where-Object { $_.ParentID -eq $folders.ProjectID }Get-PWFolders : Error: Unable to load DLL 'PWSearchWrapper.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at PWSearch.SearchForProjectsByTree(Int32 iParentProjectId, IntPtr& ppProjects, IntPtr& ppComponentClassIds, IntPtr& ppComponentInstanceIds, IntPtr& ppEnvironmentIds, IntPtr& ppWorkflowIds, IntPtr& ppParentIds, IntPtr& ppStorageIds, IntPtr& ppIsParent, String[]& arProjectNames, String[]& arProjectDescriptions, String[]& arProjectCodes, Int32& iCountP) at PWSearch.GetAllProjectsInBranch(Int32 iParentProjectId, Boolean bGetPath) at PWPS_DAB.GetPWFolders.ProcessRecord()At line:1 char:10+ $b = Get-PWFolders -FolderID $folders.ProjectID | Where-Object { ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-PWFolders], Exception + FullyQualifiedErrorId : Error getting ProjectWise folders.,PWPS_DAB.GetPWFolders
Agree with GaryJ. I ran some more tests:
Uninstall-Module pwps_dab -Force -AllVersions then:Install-Module pwps_dab -force -MaximumVersion x.x.x.x -Verbose
1.10.4.0 remove all / install x64 then x86 via ISE - Working1.11.0.0 remove all / install x64 then x86 via ISE - Broken1.10.5.0 remove all / install x64 then x86 via ISE - Broken
Go back to 1.10.4.0:1.10.4.0 remove all / install x64 then x86 via ISE - Working again
Looks like it broke at 1.10.5.0
Cheers
Chris
Chris,
I find that you only need to install in x64. When you do so, the module is available for both x64 AND x86.
I think 1.13.0.0 will fix this issue. Has to do with Microsoft dependencies and not ProjectWise ones. I changed the way I built those around 1.10.5.0. Reverted to the old way in 1.13.0.0. Should behave the same way regardless of version of ProjectWise.
As far as uninstalling/installing goes:
Run an admin 32-bit session of PowerShell and run cmdlet:
Uninstall-Module PWPS_DAB -AllVersions -Force
Close the session.
Run a admin 64-bit session of PowerShell and run cmdlet:
Still in 64-bit admin session run:
Install-Module PWPS_DAB
What you install in 64-bit will also be available in 32-bit so just do the installation once. Much easier to manage that way.
Tested and all working in 1.13.0.0 great work!!!
Uninstalled and reinstalled the the latest version, 1.13.1.0.
Our issues mentioned above when calling the Get-PWDocumentsBySearch cmdlet are now no longer producing the DLL errors.
Well done Dave, and thank you!