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 :
Small and medium business | Business Central, N...
Suggested Answer

How to use Dotnet Assembly in Business Central On premises

(0) ShareShare
ReportReport
Posted on by

Hi,


I have a client requirement to add PMT calculation formula in excel but it requires XmlDocument Dotnet variable and if I create the one and try to build the extension it throws an error - Dotnet interop requires version 2.0 or greater. So I wanted to know on which version should I move on to complete this task.


Version Information of current Business Central On premises
BCVersion.png


Variable Declarated


DeclareDotnet.PNG


Error log

'.NET interop' is not available in runtime version '1.0'. The supported runtime versions are: '2.0' or greater.

App.json for more reference


{
"id": "28dfg330-95af-4e22-a7e0-d73b7ec08ree",
"name": "Testing",
"publisher": "DEV",
"version": "1.0.0.0",
"brief": "",
"description": "",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"capabilities": [],
"screenshots": [],
"platform": "13.0.12929.0",
"application": "13.1.25940.0",
"showMyCode": true,
"runtime": "1.0",
"target": "Internal",
"idRange": {
"from": 50000,
"to": 60000
}
}

Will be waiting for response. Any response from your side will be helpful to me.

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    XMLDocument object is available also on SaaS as a native data type in AL.

    However, to use .NET assemblies in extension, you need to declare that your extension is for on-premise only by setting "target": "OnPrem" in app.json file.

    A link that explains all is here:

    demiliani.com/.../

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,468

#2
YUN ZHU Profile Picture

YUN ZHU 923 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans