I have a vb script that uses System.Net.Http. A very simplified version of my script (to exhibit my problem) is as follows:
Imports System.Net.Http
Public Sub Main(ByVal param As Object)
Dim client As HttpClient = New HttpClient()
End Sub
This script works fine when run from HomeSeer after I added this line to the [Settings] section of HomeSeer's settings.ini file (thanks to Jon00 for the tip):
ScriptingReferences=System.Net.Http;System.Net.Http.dll
Now, I want to continue developing my script with tenScripting3 using Visual Studio Community 2017. I created a simplified version of the script for tenScripting3:
Imports System.Net.Http ' For: HttpClientPublic Class
Class MyTest
Public Sub Main(ByVal param As Object)
Dim client As HttpClient = New HttpClient()
End Sub
End Class
Unfortunately, Visual Studio 17/tenScripting3 doesn't like my "Imports System.Net.Http". As the below image shows, Visual Studio says that the "Imports System.Net.Http" is unnecessary, and then gives errors that "HttpClient is not defined".
Is there something I need to change, maybe in my tenscripting3 environment to address this problem? Note that Visual Studio and tenscripting3 are run on a Windows 10 PC that is different than the Windows 10 PC where I run HomeSeer.
Imports System.Net.Http
Public Sub Main(ByVal param As Object)
Dim client As HttpClient = New HttpClient()
End Sub
This script works fine when run from HomeSeer after I added this line to the [Settings] section of HomeSeer's settings.ini file (thanks to Jon00 for the tip):
ScriptingReferences=System.Net.Http;System.Net.Http.dll
Now, I want to continue developing my script with tenScripting3 using Visual Studio Community 2017. I created a simplified version of the script for tenScripting3:
Imports System.Net.Http ' For: HttpClientPublic Class
Class MyTest
Public Sub Main(ByVal param As Object)
Dim client As HttpClient = New HttpClient()
End Sub
End Class
Unfortunately, Visual Studio 17/tenScripting3 doesn't like my "Imports System.Net.Http". As the below image shows, Visual Studio says that the "Imports System.Net.Http" is unnecessary, and then gives errors that "HttpClient is not defined".
Is there something I need to change, maybe in my tenscripting3 environment to address this problem? Note that Visual Studio and tenscripting3 are run on a Windows 10 PC that is different than the Windows 10 PC where I run HomeSeer.
Comment