老师.net安装了4.6 ,麻烦帮我看下,dll也引用了,命名空间也照C#里写了,命令窗口运行还是报这个错
可以运行的C#代码附件我也上传了
全局代码如下:
Public Sub Main1()
Try
Dim cred As TencentCloud.Common.Credential = New TencentCloud.Common.Credential
cred .SecretId = "AKIDOYUtON8qV69cZQ2PO8l9UfsrcyKI"
cred .SecretKey = "3g5wXtcnhJekcDXbYswUmnXwmPdaG"
Dim clientProfile As TencentCloud.Common.Profile.ClientProfile = New TencentCloud.Common.Profile.ClientProfile()
Dim httpProfile As TencentCloud.Common.Profile.HttpProfile = New TencentCloud.Common.Profile.HttpProfile()
httpProfile.Endpoint = ("sms.tencentcloudapi.com")
clientProfile.HttpProfile = httpProfile
Dim client As TencentCloud.Sms.V20210111.SmsClient = New TencentCloud.Sms.V20210111.SmsClient(cred, "ap-guangzhou", clientProfile)
Dim req As TencentCloud.Sms.V20210111.Models.SendSmsRequest = New TencentCloud.Sms.V20210111.Models.SendSmsRequest()
req.PhoneNumberSet = New String() {"+8615968015166"}
req.SmsSdkAppId = "1400517359"
req.SignName = "测试"
req.TemplateId = "947545"
req.TemplateParamSet = New String() {"123321"}
Dim resp As TencentCloud.Sms.V20210111.Models.SendSmsResponse = client.SendSmsSync(req)
msgbox(TencentCloud.Common.AbstractModel.ToJsonString(resp))
'
Catch e As Exception
msgbox(e.ToString())
End Try
Console.Read()
End Sub
此主题相关图片如下:11.png

此主题相关图片如下:222.png

[此贴子已经被作者于2021/5/19 15:04:28编辑过]