Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

Proxies.RetailProxy.Extensions.StoreHoursSample compilation

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

If I open the file StoreDayHoursManager.cs in visual studio from the Proxies.RetailProxy.Extensions.StoreHoursSample.csproj project: 

pastedimage1589214622868v1.png

In an untouched RetailSDK I will get an error:

pastedimage1589214712480v2.png

I get the error because the IStoreDayHoursManager interface is declared in another auto generated file (interfaces.g.cs) that is not included in the project:

pastedimage1589215395030v5.png

But when I build the project, everything is fine:

pastedimage1589214908402v3.png

Is there a switch or something on the project that ignores this compilation error?

The reason I'm asking is because I have a proxy extension of my own with the exact same error but it won't compile:

pastedimage1589215080693v4.png

  • Ramshenkar Profile Picture
    Ramshenkar on at
    RE: Proxies.RetailProxy.Extensions.StoreHoursSample compilation

    Does this resolved your issue ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Proxies.RetailProxy.Extensions.StoreHoursSample compilation

    Hi Ram,

    Thank you very much for your answer. I followed your instructions and the typescript proxies were created successfully. Having exhausted all avenues we had to elevate a ticket directly with the Microsoft product support team and they are investigating. The workaround that Microsoft suggested was to include the Interfaces.g.cs file into the project (I have a project where this file is not included and it compiles, and I thought since it's auto generated it might create problems with AzureDev ops). When I did that it started complaining about the return type. So the second thing I had to do is to fully qualify the return type:

       internal class RetailStoreTableEntityManager : IRetailStoreTableEntityManager

       {

           public Task<PagedResult<HF.CRT.Extensions.DataModel.RetailStoreTableEntity>> GetRetailStoreTableByStore(string storeNumber, string shiftId, string terminalId, QueryResultSettings queryResultSettings)

           {

               var request = new GetRetailStoreTableRequest(storeNumber, shiftId, terminalId) { QueryResultSettings = queryResultSettings };

               return Task.Run(() => CommerceRuntimeManager.Runtime.Execute<GetRetailStoreTableResponse>(request, null).retailStoreTableRecords);

           }

       }

    This happened to me in PU31 1.0.7.

  • Suggested answer
    Ramshenkar Profile Picture
    Ramshenkar on at
    RE: Proxies.RetailProxy.Extensions.StoreHoursSample compilation

    Hi

    Was it working before? If you are building it for the first time, you can try the following approach

    - Try generating typescript proxy o make sure your retail server EDM model and factory are correct.

    - You can still generate a c# proxy with the command line tool instead of the VS project.

    Ref: docs.microsoft.com/.../typescript-proxy-retail-pos

    If you can generate proxy with any of the above ways, we can say the customizations (retail server) are correct.  

    I do not see any switch that ignores compilation error.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,791 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans