-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IndexOutOfRangeException When Using PowerShell on Windows Server 2012R2 #303
Comments
Oh, judging by the name |
Unfortunately I am getting the same error:
|
The only mention of this issue I found so far is in this PR: microsoft/azure-pipelines-extensions@e563501 Can you please try I suspect it found this override and failed. Maybe a hint to use a different override will help. I'm speculating here |
I've upgraded .NET to 4.6, ran the script as an administrator, added nulls to the method's signature and modified the script as following:
There are no errors now and the output looks right:
The problem now is that the event does not show up in App Insights. |
Try to run: |
BTW, did just passing of argument helped or another framework and EventSoruce fixed the issue? |
This is getting interesting. If I run
Loading the EventSource and passing additional arguments helped with the previous problem. |
Are you sure you are using 4.5 version of Application Insights dll? |
I think so, although anything is possible. I am not a .NET developer. |
My question is where did you take this assembly from:
|
I took it from lib\net45 in https://www.nuget.org/api/v2/package/Microsoft.ApplicationInsights/2.1.0 |
Finally, it looks like it started working for me. I've started using dll from lib\net46. |
Thanks for help, Sergey! |
* fix signing (#301) * nupkg and symbols (#300) * Nuget.props and new symbols format * fixing compile issues * fix doc file * ApplicationInsights.NLogTarget - Updated docs with NLog.config example (#294) * new cert (#303) * new cert * update * bump version 2.11-beta2 (#309) * bump version 2.11-beta2 * Update CHANGELOG.md
When using AppInsights in PowerShell as described at https://vnextengineer.azurewebsites.net/powershell-application-insights/, everything works fine on Windows 10 but not on Windows Server 2012R2:
Full stack using https://blogs.msdn.microsoft.com/powershell/2006/12/07/resolve-error/:
I’ve tried both https://www.nuget.org/api/v2/package/Microsoft.ApplicationInsights/1.2.3 and https://www.nuget.org/api/v2/package/Microsoft.ApplicationInsights/2.1.0 with versions 4.0 and 4.5.
Windows Server 2012R2 (not working):
Windows 10 (working):
Could you please advise how this issue can be resolved?
The text was updated successfully, but these errors were encountered: