LINQPad 6 Error
Hi,
I was using LINQPad 5 and with AWS NuGet package and it was working.
Same script - when upgraded to LINQPad 6...
Amazon.EC2.Model.DescribeInstancesResponse describeInstancesResponse = ec2Client.DescribeInstances();
In above line DescribeInstances() is not coming in IntelliSense. (attached image)
Geting this message : CS1061 'IAmazonEC2' does not contain a definition for 'DescribeInstances' and no accessible extension method 'DescribeInstances' accepting a first argument of type 'IAmazonEC2' could be found (press F4 to add an assembly reference or import a namespace)
Comments
-
With LINQPad 6, you will be using the .NET Core version of using Amazon's library, instead of the .NET Framework version with LINQPad 5. The .NET Core version doesn't expose a synchronous version of the DescribeInstances method, so you must call the asynchronous version instead:
.DescribeInstancesAsync()
Note that this will return a Task, so you must either await the result or use the .Result property to access the result synchronously:
var response = ec2Client.DescribeInstancesAsync().Result
-
Joe,
Thank you.
Please close this issue or let me know how to close it.