Cloud Insight Telegrafエージェントのインストールに失敗し、「CS0246:タイプまたはネームスペース名「ICertificatePolicy」が見つかりませんでした」というエラーが表示される
環境
- Cloud Insights
- Tegrafエージェントfor Windows
問題
Tegrafエージェントをインストールしようとすると、すぐにインストールが失敗し、次のエラーが表示されます。
Add-Type: C:\Users\user1\cloudinsights-windows-env.ps1:1 Line | 1 | Add-Type 'using System.Net; using System.Security.Cryptography.X509Ce … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (1,107): error CS0246: The type or namespace name 'ICertificatePolicy' could not be found (are you | missing a using directive or an assembly reference?) using System.Net; using | System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { | public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest | request, int certificateProblem) {return true;}} | ^