web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Renci.SHHNET.dll reference in D365 Project

(0) ShareShare
ReportReport
Posted on by 184

Hello All,

I am doing a file based integration for which I have added  the Renci,sshnet.dll as reference in my project.

Now  when I build the project it throws me an error "A reference to 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is required to compile this module."

I have pasted the C# library project and Renci dll in "K:\AosService\PackagesandLocalDirectory\<MyPackage>\<MyModel>\bin\

Still its not working.

Can someone please suggest me what would be the missing reference that I need to add?

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Please give us more information about what you did. There is no point in putting a Visual Studio project to the bin folder, but I guess you maybe mean a DLL file built from your project. You also didn't mention what the project has to do with F&O and whether you've added any project reference or an assembly reference.

    Doesn't your project target .NET Core instead of .NET Framework? I suspect that this may be the reason for the error.

  • D365_Wibes Profile Picture
    184 on at

    Can someone please help me by suggesting some answers?

  • D365_Wibes Profile Picture
    184 on at

    Thanks for your response Martin.

    Yes I have put the dll file into the bin.

    And in that I have written code for connecting with SFTP server by passing (hostname,username,password,port) to pick up files from a storage location

    And to read the file and then load data in D365 FO custom tables,

    And let me the check project Target.

  • Suggested answer
    Komi Siabi Profile Picture
    13,093 Most Valuable Professional on at

    Hello,

    I believe you are trying to connect with an sftp server with your dll.

    I have encountered this error before. Please confirm that your project is .Net Framework class library

  • D365_Wibes Profile Picture
    184 on at

    I have just checked it martin.

    The project target is .Net Core 3.1.

    Do I need to select .Net 5.1 instead?

  • Suggested answer
    Komi Siabi Profile Picture
    13,093 Most Valuable Professional on at

    Hi D365_Wibes,

    Your project should target .NET framework

    Netfra.png

    Right click project and property. 

    If you do not have .Net framework to update, you might create a new C# class Library(.NET framework)

  • D365_Wibes Profile Picture
    184 on at

    Thanks Siabi. It worked!!! Awesome

  • D365_Wibes Profile Picture
    184 on at

    Awesome!! It worked!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans