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

c# dll successfully added as a reference but can't be used in code

(0) ShareShare
ReportReport
Posted on by 45

Hi,

I'm using Visual Studio 2019 and, although I successfully added a reference to Gembox.Document.dll targeting .NET Framework 3.5-4.8, It's "not available" in a FinOps class, but I have no problem using it in a C# class. I've even tried with older versions or .NET standard 2.0.

What am I missing?

pastedimage1656346386920v3.png

pastedimage1656346111706v1.png

pastedimage1656346247315v2.png

I have the same question (0)
  • nunomaia Profile Picture
    25 Moderator on at

    Can you check if reference is added to model ?

  • Alexban Profile Picture
    45 on at

    what do you mean? where should I look for this?

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    You can see refences in the Application Explorer (AOT > References).

    What exactly is the target version used when building the assembly? What you showed is just the assembly description. It's not specific enough and it may be wrong, because it's set manually.

    Also, don't this assembly depend on other assemblies that you don't have in the F&O environment?

    Have you tried Assembly Binding Log Viewer?

  • Alexban Profile Picture
    45 on at

    Thank you for taking time to answer, Martin!

    I didn't realize about the References node in AOT...

    pastedimage1656396969952v1.png

    the download page for the assembly (https://www.gemboxsoftware.com/document/downloads/bugfixes.html) shows 3 versions and I've tried the .NET framework 3.5 - 4.8 version (and .NET Standard 2.0 one, just because I was running out of ideas...)

    pastedimage1656397075491v2.png

    according to https://www.nuget.org/packages/GemBox.Document/#dependencies-body-tab there's just one dependency on BouncyCastle,Crypto, witch I already have

    pastedimage1656397260484v3.png

    I didn't know about Assembly Binding Log Viewer; I've started it, restarted IIS but there's nothing in the log (I've set a custom log location but there's no log file written)

    pastedimage1656398887702v5.png

    I know I can create a c# project and add it as a reference in my finops project but, I already have lots of code using Gembox.Document, written for AX2009, and don't have to much time to change it...

  • Alexban Profile Picture
    45 on at

    any ideas what else I could try (or retry)?

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    I'm sorry, but I don't know why this assembly can't be loaded. If we had source code, I would try building it specifically for .NET 4. Because that's not an option, you can try asking Microsoft support.

    By the way, your assembly binding isn't working - you should get several binding failures from the standard solution. Either you didn't configure it correctly, didn't refresh the result or you didn't provide any relevant action since activating the log. Note that you mentioned IIS, but that's not relevant to this problem. Development is done in Visual Studio and compilation is done by xppc. IIS or IIS Express would be used to run your code if it was compilable, but that isn't the case.

    Unfortunately the log didn't help me much in this case. I got one failure related to GemBox, but when I fixed it, VS still complained that the type or namespace could not be found.

  • Alexban Profile Picture
    45 on at

    I don't know how I missed you answer Martin... I've got assembly binding to produce some output but there was nothing about Gembox.Document so I've opened a ticket with Microsoft support 5 days ago and I'm still waiting for the initial answer; I'll update this thread once I have some relevant info.

  • Suggested answer
    Alexban Profile Picture
    45 on at

    I've worked with Gembox support and tried a lot of versions until I found the latest working with D365FO; with this information, Gembox support identified the reason: they started annotating their API to support nullable reference types. Microsoft support official answer is that Nullable reference types are not yet available (no eta) in the x++ compiler and are not supported with Dynamics in the same way c# does.

    Hopefully, this will help someone else ...

    Thank you Martin for your continuous support for the community!

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Thank you for letting us know. This information may come in useful one day...

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans