Incompatibility between AzurePowerShell & DTF.ServiceBus
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
Hello,
Im facing an issue wih DTF.ServiceBus. Im working on a project where I use DTF to launch long running powershell tasks.
To do so, I use PowerShell SDK to run scripts directly from C#.
My script do use Azure PowerShell (https://github.com/Azure/azure-powershell) and adding DTF.ServiceBus to my project make Azure PowerShell fail.
To be more precise, one essential module of Azure PowerShell get kind of "corrupted" by DTF.ServiceBus.
It is the Az.Accounts module which initialize many things.
When adding DTF.ServiceBus, the module load into C# without problem BUT, all the commands from the module are not visible nor usable.
Removing DTF.ServiceBus make them work just fine.
For more details, you can take a look at the issue I opened in Azure Powershell project :
https://github.com/Azure/azure-powershell/issues/10680
My questions are, what is causing this ? How can I fix it ? Otherwise, what workaround can I use ?
Here is a sample where I included DTF.ServiceBus. If you run it, it will fail (error display and Get-Command does not return anything)
If you simply remove the reference to DTF.ServiceBus, it will display a success at the end and also display the available command in Az.Accounts.
[DemoAzPowershell.zip](https://github.com/Azure/durabletask/files/3987797/DemoAzPowershell.zip)
Thanks you
*edit*
When running both version (with and without DTF.ServiceBus) I notice some difference in the output console.
For the working version without DTF.ServiceBus, I can see those two DLL's loading while they are not loaded when using DTF.ServiceBus:
```
'DemoAzPowershell.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\1.6.4\NetCoreAssemblies\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'DemoAzPowershell.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\1.6.4\NetCoreAssemblies\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.