-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property type is not changed into the correct type #16
Comments
To be honest, stuff got worse after installing this package. |
Hey Stefan, Thanks for using SuperValueConverters! There is a small issue where you have to rebuild and regenerate your models a second time in order for it to discover all the types needed to be returned - this might be what is happening here? Can you try rebuilding your solution and regenerating your models to see if that helps? If that doesn't work, please let me know your Umbraco version and version of the package you are using. Cheers, |
I've rebuild the solution 3 times and rebuild the models every time as well, the result is the same. Umbraco v8.6.3, super value converter v2.0.1 |
Thanks for clarifying! Just to check also which Models Builder mode you are using? And to confirm you are using the Models Builder plugin rather than embedded? Cheers, |
The API mode with visual studio plugin
|
I could really use this strongly typed feature right now, can I help debug? |
It would be good if you could try and replicate this on a clean Umbraco install. Blank VS solution > Install Umbraco + the SuperValueConverters from NuGet. If you can replicate, you should then clone down the source - attach to the process when generating models and see what's going on in this method. I will be able to have a look at it shortly too, but no guarantees about timeframes unfortunately. |
I tested this just now on a clean solution (with MB in PureLive mode I think) and it worked. |
Soooooo I think the problem is generating models via the API in Visual Studio. |
Right, the namespace is the issue!
I have my namespace configured via a C# class, as mentioned here: |
Great find @stefankip! I can confirm I can replicate this also on AppData mode. This seems to be a bit of an oversight in the implementation, and honestly this namespace check and the dependency on Models Builder shouldn't actually be needed at all. This namespace check is purely there to try and avoid clashes between type names in namespaces we don't care about. The safer solution is surely to only check for types that implement I've been investigating options of switching the logic determining types to Umbraco's For now is it a suitable workaround to set this app setting? |
Yeah works fine using the appSetting, so I'll keep that in place for now ;-) |
This sounds like an awesome package, exactly what I need to get rid of all those
IPublishedContent
properties and get rid of all my manual overrides!But...
It doesn't seem to work for me?
I have this MNTP:
And this is the generated property:
The type should be
Ambassador
here, right?The text was updated successfully, but these errors were encountered: