I've tried doing add-type .\htmlagilitypack.dll with powershell v2 and powershell v3 but continue to get the below error. I've also tried loading the DLL from the net20, net40-client, and net45 folders. All produce the below error.
PS D:\htmlagilitypack\net40> Add-Type .\HtmlAgilityPack.dll
Add-Type : c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : Unexpected character '\'
c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : >>> .\HtmlAgilityPack.dll
At line:1 char:1
as fields or methods
c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : >>> .\HtmlAgilityPack.dll
At line:1 char:1
At line:1 char:1
PS D:\htmlagilitypack\net40> Add-Type .\HtmlAgilityPack.dll
Add-Type : c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : Unexpected character '\'
c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : >>> .\HtmlAgilityPack.dll
At line:1 char:1
- Add-Type .\HtmlAgilityPack.dll
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidData: (c:\Users...d character '\':CompilerError) [Add-Type], Exception
-
FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
as fields or methods
c:\Users\XXXX\AppData\Local\Temp\bww4lrx3.0.cs(1) : >>> .\HtmlAgilityPack.dll
At line:1 char:1
- Add-Type .\HtmlAgilityPack.dll
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidData: (c:\Users..elds or methods:CompilerError) [Add-Type], Exception
-
FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
At line:1 char:1
- Add-Type .\HtmlAgilityPack.dll
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidData: (:) [Add-Type], InvalidOperationException
- FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand