kontent-ai / model-generator-net

Kontent.ai .NET model generator.
https://www.nuget.org/packages/Kontent.Ai.ModelGenerator
MIT License
17 stars 19 forks source link

Generated models do not use the right using statement for Kentico required by latest SDK #101

Closed vletierce closed 4 years ago

vletierce commented 4 years ago

The Kentico Kontent model generator v 5.0.0 generates models using Kentico.Kontent.Delivery statement in however the latest SDK (v13) requires Kentico.Kontent.Delivery.Abstractions to be used.

Also I have installed the generator locally in visual studio code with the following manifest: { "version": 1, "isRoot": true, "tools": { "kentico.kontent.modelgenerator": { "version": "5.0.0", "commands": [ "KontentModelGenerator" ] } } }

Generated sample: using System; using System.Collections.Generic; using Kentico.Kontent.Delivery;

Downloading the standalone generator on Windows does generate the right header.

petrsvihlik commented 4 years ago

Hi @vletierce , thanks for the feedback. Are you 100% sure about this? I tested it and it works fine for me. Moreover, the standalone generator uses the exact same binaries as the .NET tool.

These models were generated by the 5.0.0 version of the .NET tool generator and they contain Kentico.Kontent.Delivery.Abstractions;.

Can you please check %userprofile%\.nuget\packages\kentico.kontent.modelgenerator if the 5.0.0 package was restored correctly?

vletierce commented 4 years ago

Hi @petrsvihlik, I have deleted the content from the nugget folder (which was 5.0.0) and re-install the tool and it seems to work now.

Thanks for comming back quickly.

Regards, Vincent

petrsvihlik commented 4 years ago

no problem ;) glad to help