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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Error while regenerati...
Finance forum

Error while regenerating OData Client code

(0) ShareShare
ReportReport
Posted on by 417

Hi,

I am trying to regenerate the OData Client code. My environment is below.

Visual Studio 2015 pro edition. Framework 4.5.2

  • Microsoft.OData.Client (version 7.5.4)
  • Microsoft.OData.Core (version 7.5.4)
  • Microsoft.OData.Edm (version 7.5.4)
  • Microsoft.Spatial (version 7.5.4)

Below error are thrown. 

Severity Code Description Project File Line Suppression State
Error CS0116 A namespace cannot directly contain members such as fields or methods ODataUtility D:\D365\Utility\ODataUtility\ODataClient.cs 1 Active
Error Compiling transformation: 'CoreVocabularyConstants' does not contain a definition for 'OptimisticConcurrencyControl' ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 989
Error Compiling transformation: 'IEdmModel' does not contain a definition for 'FindDeclaredValueTerm' and no extension method 'FindDeclaredValueTerm' accepting a first argument of type 'IEdmModel' could be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 989
Error Compiling transformation: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.Vocabularies.IEdmVocabularyAnnotation>' to 'System.Collections.Generic.IEnumerable<IEdmVocabularyAnnotation>'. An explicit conversion exists (are you missing a cast?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 831
Error Compiling transformation: The first operand of an 'is' or 'as' operator may not be a lambda expression, anonymous method, or method group. ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 835
Error Compiling transformation: The type or namespace name 'Annotations' does not exist in the namespace 'Microsoft.OData.Edm' (are you missing an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 13
Error Compiling transformation: The type or namespace name 'EdmxReaderSettings' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 586
Error Compiling transformation: The type or namespace name 'Expressions' does not exist in the namespace 'Microsoft.OData.Edm' (are you missing an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 14
Error Compiling transformation: The type or namespace name 'IEdmIntegerValue' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 2267
Error Compiling transformation: The type or namespace name 'IEdmStringConstantExpression' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 836
Error Compiling transformation: The type or namespace name 'IEdmValueAnnotation' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 832
Error Compiling transformation: The type or namespace name 'IEdmValueTerm' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 835
Error Compiling transformation: The type or namespace name 'IEdmVocabularyAnnotation' could not be found (are you missing a using directive or an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 831
Error Compiling transformation: The type or namespace name 'Library' does not exist in the namespace 'Microsoft.OData.Edm' (are you missing an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 15
Error Compiling transformation: The type or namespace name 'Values' does not exist in the namespace 'Microsoft.OData.Edm' (are you missing an assembly reference?) ODataUtility D:\D365\Utility\ODataUtility\ODataClient.tt 16

I have the same question (0)
  • Community Member Profile Picture
    on at

    in order to generate OData proxy, try download OData client code generator from Visual Studio - extension an updates

  • vannamani77 Profile Picture
    417 on at

    OData v4 Client Code Generator already installed in Visual Studio

  • richierich79 Profile Picture
    300 on at

    Hi, I am having this issue. Did you find a solution?

  • Kirans Profile Picture
    65 on at

    Hi,

    Did you find any solution for this. Please let me know as we are blocked with this error.

    Thanks,

    kiran

  • richierich79 Profile Picture
    300 on at

    I used the unchase generator instead

    marketplace.visualstudio.com/items

  • Sergei Minozhenko Profile Picture
    23,097 on at

    Hi Kirans,

    Which oData package version are you using in solution? There were some issues in old version, but i don't see them anymore in 7.6.4

  • Kirans Profile Picture
    65 on at

    Hi BR,Sergei,

    I'm not sure where to check for oData package version as i'm now. Can you please help. I'm Using visual Studio 2015 and if i need to get 7.6.4 package version from where i can get it.

    Thanks,

    Kiran

  • Sergei Minozhenko Profile Picture
    23,097 on at

    Hi Kiran,

    You need to open your solution and open from VS top men Tools -> NuGet package manager -> Manager NuGet packages for solution.

    Also, could you check your T4 template file (.tt) from oDataUtility project and check if "public const string TempFilePath" variable is not empty.

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