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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Consumption of D365 Od...
Finance forum

Consumption of D365 Odata througth c# console application

(0) ShareShare
ReportReport
Posted on by

Hi,

I have created ODataLibrary and its generated .cs with all the end points from my given metadataUriString ;

and generated Anthentication utility.dll  added these dll files to console application to consume data from d365fo..

when i add the command "Using ODataUtility.Microsoft.Dynamics.DataEntities " in my program.cs

it gives me following error "The type or namespace name "Odatautility" could not be found (are you missing using directive or assembly reference)

Please help me to resolve this issue

Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    236,867 Most Valuable Professional on at
    RE: Consumption of D365 Odata througth c# console application

    C# is case sensitive, therefore Odatautility isn't the same thing as ODataUtility. Also, do you have a reference to any assembly containing such a namespace?

    By the way, it's interesting that you added binaries of the authentication utility and not code. If you're talking about the utility from Microsoft sample code, you need to change its code to specify application ID and things like that.

  • Community Member Profile Picture
    on at
    RE: Consumption of D365 Odata througth c# console application

    Hi Martin,

    I have created library for authentication utility with Client configuration and oauthHelper files. In Clientconfiguration i have given every details regrading the application registered in azure portal.(App ID, Secret key, D365Fo instance) on building this library dll file is generated.

    Similarly i created ODataLibrary added metadatadocumentURI string and added TempPathfile

    and i created console application where i refered above 2 dll and when i add the package Using ODataUtility.Microsoft.Dynamics.DataEntities

    its throwing error saying The type or namespace name "OdataUtility" could not be found (are you missing using directive or assembly reference)

  • Blue Wang Profile Picture
    on at
    RE: Consumption of D365 Odata througth c# console application

    Hi Kasthu,

    Have you opened a solution that contains all referenced projects?

    This reference comes from the ODataUtility project, which is also part of the repository and the main solution.

    https://msdax.wordpress.com/2018/03/31/consuming-dynamics-ax-365fo-data-entities-using-web-api-part-3/

  • Martin Dráb Profile Picture
    236,867 Most Valuable Professional on at
    RE: Consumption of D365 Odata througth c# console application

    All right, you make your life much more complicated by referring the binaries rather than to projects, but if you prefer...

    If I assume that the problem with incorrect casing it caused by the fact that you failed to quote the error message precisely, there is still the question whether either of your libraries contains ODataUtility.Microsoft.Dynamics.DataEntities. If not, then it makes sense that it can't be found. Either you refer to something that you don't really need, and you should remove the using statement, or you're missing the object you want to use.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans