JSON.NETのコンパイル済みDLLアセンブリをロードしようとしました。しかし、次のエラーメッセージが表示されます。Windows 10でdllアセンブリを読み込めません(HRESULTの例外:0x80131515)
PS C:\Users\tamas\Desktop\garbage> Add-Type -path .\Newtonsoft.Json.dll
Add-Type : Could not load file or assembly 'file:///C:\Users\tamas\Desktop\garbage\Newtonsoft.Json.dll' or one of its d
ependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Add-Type -path .\Newtonsoft.Json.dll
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
+ FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
別のコンピュータでは、Windows 7の下で問題なく同じことができました。 原因とその解決方法は何ですか?
私の.NETバージョン:
PS C:\Users\tamas\Desktop\garbage> [System.Environment]::Version
Major Minor Build Revision
----- ----- ----- --------
4 0 30319 42000
PowerShellのバージョン:
PS C:\Users\tamas\Desktop\garbage> $Host.Version
Major Minor Build Revision
----- ----- ----- --------
5 1 14393 206
ありがとうございます!あなたの答えは私を解決に導いてくれました。質問に対する私の答えを見てください。 – ThomasMX