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

Announcements

No record found.

News and Announcements icon
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
    239,040 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,208 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,208 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans