Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Cannot Create an instance of the following .NET Framework object

Posted on by 2
I have inherited a code base for Business Central on-prem.
 
The code calls into FluentFTP dll to transport data files. 
 
This code has more or less remained the same with small changes for each new Business Central iteration.
 
We are currently trying to get BC22 compliant, but cannot get an instance of FluentFTP (or any other assembly) to instantiate. 
 
The code base will fully compile and publishes without errors.
 
Steps we've taken so far:
  • Updated to .Net Framework 6
  • Updated FluentFTP.dll to the new version 48.0.0.0
    • //////
  • Added Probing paths for new .Net assembly​​​​​​​
    • ​​​​​​​​​​​​​​//////
 
Current constructor
         //////
 
 
 
Categories:
  • Cannot Create an instance of the following .NET Framework object
    For more clarity, I have attempted to migrate the references to .NET 6. 
     
    After installing .net 6,  the probing paths within settings.json point to those assemblies:
     
    "al.assemblyProbingPaths": [
           
            "./.netpackages",
            "C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\6.0.23\\ref\\net6.0",
     
     
    The runtime version is pointing to .net 6 in the app.json
     "runtime": "6.0",
     
    2 of the 4 assemblies work correctly when references, the other 2 throw the original error message. 
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 68,341 Super User 2024 Season 2 on at
    Cannot Create an instance of the following .NET Framework object
    Hi, if it is Business Central 2023 wave 1 (BC22), it should be related to the update below. I hope the following information can give you some tips.
    Migrating from .NET Framework to .NET Standard
     
    Thanks.
    ZHU

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,246 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,041 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans