我正在尝试从 Amazon EC2 获取标签:
using (client = Amazon.AWSClientFactory.CreateAmazonEC2Client(accessKeyID, secretAccessKeyID))
{
DescribeTagsRequest request = new DescribeTagsRequest().WithFilter(
new Filter().WithName("key").WithValue(new string[] { "domain" }),
new Filter().WithName("resource-type").WithValue(new string[] { "instance" }));
DescribeTagsResponse responce = client.DescribeTags(request); //**error**
}
错误文字:
Message: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\03eg1ztl.0.cs' could not be found
error CS2008: No inputs specified
我找到了两个解决方案:授予帐户访问临时目录的权限并将 sgen.exe 用于 AWSSDK.dll
当我尝试将 sgen.exe 用于 AWSSDK.dll 时,出现错误:
Types "Amazon.RDS.Model.VpcSecurityGroupMembership"
and "Amazon.Redshift.Model.VpcSecurityGroupMembership"
use the name of the type XML "VpcSecurityGroupMembership" from namespace "".
Use the attributes of XML, to set the type of a unique name and / or namespace XML.
请帮帮我!