none
C# .NET Trouble referencing Core Library from AWS Lambda Function RRS feed

  • Question

  • Hello, so I'm playing with AWS Lambda Functions and the AWS .NET toolkit.

    The toolkit template creates a C# .NET Core class with a function handler method.  All good.  I can test the code and it works fine.  Now I want to create a library with method to use from my Lambda code. So, I created a Core library and had a simple static public object with a single public method. I then added a reference to my library to my lambda project. All looks good.  The reference shows up under the Projects dependencies.


    HOWEVER, no matter what I've tried I can't seem to reference the public class and method from my lambda project code.

    I then went and created a simple .NET core console class project and added the library and had NO problem referencing the library from the consuming project's code. I compared the lambda project settings to my standalone Core library setting and they both seem to be building with core 2.1.

    What is going on? Being new to .NET core it's probably something stupid...


    Tuesday, March 26, 2019 6:16 PM

Answers

  • I found that it was an IDE issue.  That is, even though intellisense didn't show the library when I entered "using ..." or show class members and so on it still compiled and worked.  I then saved my project and exited and on restart intellisense started working.
    • Marked as answer by Grant Schenck Wednesday, March 27, 2019 12:13 PM
    Wednesday, March 27, 2019 12:13 PM

All replies

  • Hi Grant Schenck,

    Thank you for posting here.

    For your question, could you provide your code for me to test?

    Best Regards,

    Wendy


    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.

    Wednesday, March 27, 2019 6:41 AM
    Moderator
  • I found that it was an IDE issue.  That is, even though intellisense didn't show the library when I entered "using ..." or show class members and so on it still compiled and worked.  I then saved my project and exited and on restart intellisense started working.
    • Marked as answer by Grant Schenck Wednesday, March 27, 2019 12:13 PM
    Wednesday, March 27, 2019 12:13 PM