Couldn't Resolve Assembly By Name Microsoft.IIS.PowerShell.Framework
Summary
Powershell custom actions fail based on modules not available.Synopsis
Powershell custom actions will not work as expected if "import" statements that required DLLS need to be loaded into the process.Discussion
Verbose install logs indicate similar errors indicating not being able to locate something by name.For example:
# SomeFile.ps1 import-module WebAdministration foreach ($someSite in get-childitem IIS:\Sites) { echo $someSIte }
This code results in
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Provider
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources
Workaround
- When testing ensure you can run the Powershell script outside of InstallShield.
- Import required modules and make sure they exist.
- Use Try-Catch blocks for error handling.
- Include return value in the debugging effort.
0% helpful
(0/1)
Comments
Jul 09, 2019
02:55 AM
- Mark as Read
- Mark as New
- Permalink
- Email to a Friend
- Report Inappropriate Content
Jul 09, 2019
02:55 AM
Where is the solution ?