none
AWS S3 library issue RRS feed

  • Question

  • Hi 

    I am trying to use AWS S3 library to upload files to S3.

    The issue is, when I add the S3 Library and call its function, it get the error below:

    An unhandled exception of type 'System.MissingMethodException' occurred in AnotherS3Test.exe

    Additional information: Method not found: 'System.IAsyncResult Amazon.Runtime.SharedInterfaces.ICoreAmazonS3.BeginDelete(System.String, System.String, System.Collections.Generic.IDictionary`2<System.String,System.Object>, System.AsyncCallback, System.Object)'.

    I am using Visual Studio 2015 and get the S3 packages using NuGet Package Manager. Everything works fine if I change the version of the app to use .Net 3.5, but as soon as I change the version to 4, 4.5 or 4.6, I start getting the error above even if I create a new project and get the S3 assembly again from NuGet Package Manager to make sure the app uses the correct AWS libraries (compatible with the current version of .Net selected).

    Can someone please help? maybe its something basic I've missed

    Thursday, February 6, 2020 1:27 AM

Answers

  • Hi mr_super_genius,
    The MissingMethodException happens when the application is deployed, the dlls it is referencing are from an older version than the ones that were used when the application was compiled. 
    Make sure that the latest assemblies are deployed and no duplicated older assemblies are hiding in certain folders.
    To handle the issue you can refer to following suggestions:
    1.Delete every built item and rebuild/redeploy the entire solution.
    2.To make sure that the old version of the references are not lingering in the GAC, you can remove the assembly from the global assembly cache by following this document.
    Here is a similar issue and hope it is useful for you.
    [System.MissingMethodException: Method not found?]
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 6, 2020 5:20 AM

All replies

  • Hi mr_super_genius,
    The MissingMethodException happens when the application is deployed, the dlls it is referencing are from an older version than the ones that were used when the application was compiled. 
    Make sure that the latest assemblies are deployed and no duplicated older assemblies are hiding in certain folders.
    To handle the issue you can refer to following suggestions:
    1.Delete every built item and rebuild/redeploy the entire solution.
    2.To make sure that the old version of the references are not lingering in the GAC, you can remove the assembly from the global assembly cache by following this document.
    Here is a similar issue and hope it is useful for you.
    [System.MissingMethodException: Method not found?]
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 6, 2020 5:20 AM
  • Hi Daniel,

    Thanks for the reply.

    It looks like it is picking up assemblies from GAC. Although I have tried uninstalling the assemblies (from GAC) but it fails due to a dependency issue. I uninstalled all AWS components that I could find in the "Programs and Features" option of the Windows Control Panel but still wasn't able to remove the AWS assemblies from GAC.

    Do you know if there is a way to check the dependencies of an assembly? or is there a way I can force Visual Studio to use assembly located at a specific path?

    Regards

    Thursday, February 6, 2020 5:30 AM
  • Hi mr_super_genius,
    Please refer to this document to remove the assembly from the global assembly cache.
    [How to: Remove an Assembly from the Global Assembly Cache]
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 11, 2020 6:43 AM