SumoLogic / sumologic-otel-collector

Sumo Logic Distribution for OpenTelemetry Collector
Apache License 2.0
40 stars 37 forks source link

Cannot load assembly 'System.Net.Http' #1348

Open droyad opened 10 months ago

droyad commented 10 months ago

When run, the following error occurs

ParserError: C:\Users\rober\AppData\Local\Temp\install.ps1:1
Line |
   1 |  using assembly System.Net.Http
     |                 ~~~~~~~~~~~~~~~
     | Cannot load assembly 'System.Net.Http'.

Removing the first line of the script makes it run.

droyad commented 10 months ago

Looks like it works fine on the Powershell 5 (the non-core version).

Even after the above change it failed due to the arguments passed to msiexec being invalid.

ccressent commented 9 months ago

System.Net.Http is definitely needed by the script, so even if it goes further when removing the using statement, you're bound to run into issues.

What platform were you on when you came across this issue? I've seen it before while using PowerShell on Linux.

droyad commented 9 months ago

Here is the output from $PSVersionTable. I think it's because it uses .NET Core instead of .NET Framework

Name                           Value
----                           -----
PSVersion                      7.3.10
PSEdition                      Core
GitCommitId                    7.3.10
OS                             Microsoft Windows 10.0.22635
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0