Skip to content

Update library.ps1: Use Write-Warning instead of Write-Error for catch block#436

Merged
Petebro-MSFT merged 2 commits intomicrosoft:masterfrom
Zhangqi910:patch-3
Mar 5, 2025
Merged

Update library.ps1: Use Write-Warning instead of Write-Error for catch block#436
Petebro-MSFT merged 2 commits intomicrosoft:masterfrom
Zhangqi910:patch-3

Conversation

@Zhangqi910
Copy link
Copy Markdown
Contributor

fix #435 (comment).

Importing ReportingServicesTools Module...
C:\Users\Akash\Documents\WindowsPowerShell\Modules\ReportingServicesTools\ReportingServicesTools\Libraries\library.ps
1 : Error: Cannot add type. The type name 'Microsoft.ReportingServicesTools.ConnectionHost' already exists.
At C:\Users\Akash\Documents\WindowsPowerShell\Modules\ReportingServicesTools\ReportingServicesTools\ReportingServices
Tools.psm1:1 char:1

Remove-Module can't fully unload a module, so when re-importing the module, it threw the error "the type already exists", using warning instead of error to unblock install.ps1

@Petebro-MSFT Petebro-MSFT merged commit 3740be3 into microsoft:master Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Facing an issue: 1 : Error: Cannot add type. The type name 'Microsoft.ReportingServicesTools.ConnectionHost' already exists.

2 participants