Hi everyone,
When the process was run, this error emerged:
No compiled code to run
error BC30002: Type ‘Net.WebClient’ is not defined. At line 23 Type ‘Net.WebClient’ is missing. You probably need to add an Activity Package to your workflow.
Here below are the codes in InvokeCode-Post Message:
Try
in_title = in_title.Replace(“", “\”)
in_title = If(in_title.Length>50, in_title.Substring(0,50), in_title)
in_text = in_text.Replace(”", “\”)
in_text = If(in_text.Length>300, in_text.Substring(0,300), in_text)
Dim payLoad As String = String.Format(
“{{”“@type”“: ““MessageCard””,” & _
“”“@context”“: ““https://schema.org/extensions””,” &
“”“summary”“: “”{0}”“,” &
“”“themeColor”“: ““0000ff””,” &
“”“title”“: “”{0}”“,” &
“”“sections”“: [{{” &
“”“text”“: “”{1}”“” &
“}},{{” &
“”“activityTitle”“: “””“,” &
“”“activitySubtitle”“: “”{2} [Machine] {3} [Project] {4} ({5})”“” &
“}}]” &
“}}”,
in_title,
in_text,
Datetime.Now.ToString(“yyyy/MM/dd (ddd) HH:mm:ss”, New System.Globalization.CultureInfo(“ja-JP”)),
in_mname, in_pname, in_pversion
)
Dim wc As New Net.WebClient
wc.Encoding = System.Text.Encoding.UTF8
Console.WriteLine("PostTeamsMessage - [request] " & payLoad)
Dim res As String = wc.UploadString(in_url, payLoad)
Console.WriteLine("PostTeamsMessage - [response] " & res)
Catch ex As Exception
Console.WriteLine("PostTeamsMessage - [error] " & ex.Message)
End Try
Any helps are appreciated.
Thanks in advance.




