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, ...
Unanswered

Unable to use custom DLL's from x++ projects

(0) ShareShare
ReportReport
Posted on by 52

Hi Team,

I'm having an issue where I'm unable to use any DLL's from my D365FO projects.  I've added a reference to the DLL in my x++ project as described in the links below but the Visual Studio development environment does not appear to be aware of the reference and behaves as though it does not exist.

- IntelliSense does not provide suggestions that should be available from the assembly.

- The compiler displays build errors that indicate it is unaware of the reference:

'TestAPI' is not declared.

The qualifier 'TestAPI.Class1' is not valid for field 'helloWorld' 

The qualifier 'TestAPI' is not valid for field 'Class1' 

Links:

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/write-business-logic 

https://www.schweda.net/blog_ax.php?bid=477&wdl=en 

https://blog.monsieurwinner.com/2022/08/30/consume-api-from-dynamics-365-finance-and-operations/ 

My environment:

D365FO dev environment v10.0.29 deployed from LCS. 

Visual Studio Professional 2019 Version 16.11.18

Microsoft .NET Framework Version 4.7.03190

My test class library:

Language:  C#

Targeting:  .Net framework 4.7

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestAPI
{
public class Class1
{
public string helloWorld()
{
return "Hello world!";
}
}
}

Other information:

The DLL exists under my \PackagesLocalDirectory\<MyModel>\bin\ directory:  C:\AOSService\PackagesLocalDirectory\<MyModel>\bin\TestAPI.dll

The XML file exists in my \PackagesLocalDirectory\<MyModel>\<MyModel>\AxReference folder.

XML file contents:

<?xml version="1.0" encoding="utf-8"?>
<AxReference xmlns:i="">www.w3.org/.../XMLSchema-instance">
<Name>TestAPI</Name>
<AssemblyName>TestAPI</AssemblyName>
<AssemblyDisplayName>TestAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</AssemblyDisplayName>
<Version>1.0.0.0</Version>
</AxReference>

I've tried the following troubleshooting tests with no success:

- Building the DLL with different target frameworks including 4.5, 4.7, .Net 5, netstandard2.0

- Adding the assembly to the GAC

- Referencing the DLL as a prebuilt DLL

- Referencing the DLL as a C# project in the same solution

Hoping that someone can tell me what I'm doing wrong and what I need to do to get it working as it should.  Please let me know if you need any additional info or want me to perform additional troubleshooting. 

Thanks,

Stuart

I have the same question (0)

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 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans