I have a data import routine in a C# project based on a post here by Martin Dráb.
The original code has been working fine and already been committed to the CUS layer and I am working in USR layer making changes to import new data points.
Visual Studio compilation and deployment to AX is working fine. Also I am pulling through new data points as intended in my updated routine so functionally I have no issues either.
However, when compiling my AX Project that contains the Visual Studio C Sharp project I get the following error (truncated by AX compiler).
"CS1061: 'NS.MyDataContext' does not contain a definition for 'Personnel_Posts' and no extension method 'Personnel_Posts' accepting a first argument of type 'NS.MyDataContext' could be found (are you missing a using directive or an assembl"
My C# code contains a .dbml file which auto-generates Linq-to-SQL classes to access another SQL database. In a custom C# class, I use the data context class to connect to this data source. This class is where the error is being detected (even though it is working!)
The specific table "Personnel_Posts" is the only update to the .dbml file and generated classes.
So far I have tried AOS restart, .auc client files deletion under AppData\Local and clearing the AX caches.
Hope someone can help.
Where do you execute your code? If it runs on server (and it works), while X++ compilation fails (which happens on client), maybe you have one version on AOS and another on client.
Business Applications communities