Gibe / Umbraco-Link-Picker

Link picker property editor for Umbraco 7
12 stars 10 forks source link

Using Modelbuilder API issue #29

Closed Dclapperton closed 5 years ago

Dclapperton commented 6 years ago

Hey I'm using the Modelbuilder api and when I try to build the project the compiler is complaining that the namespace 'Gibe' can't be found despite the reference existing in the project.

Any idea what would cause this?

Thanks, David

karltynan commented 6 years ago

Not 100% sure as I would need @stevetemple to double check with me, but I think Nuget isn't including the Models and PropertyConverters - might be worth just checking you have all the appropriate cs files (https://github.com/Gibe/Umbraco-Link-Picker/tree/master/src/Gibe.LinkPicker.Umbraco) while I wait for Steve to input on his return?

Dclapperton commented 6 years ago

Hmm I think all the required cs files are in the dll. I'll try manually copy the files into my project for now.

Cheers!

karltynan commented 6 years ago

Ah yes, good point... Sorry, more front end and not been looking at this package recently. We can get back to you next week as this isn't my strong point.

karltynan commented 6 years ago

And especially not modelsbuilder...

Dclapperton commented 6 years ago

No you've been a great help I didn't know about PropertyConverters so that's going to save me a bunch of time thanks 😄 I've just removed the reference to the dll for now and moved the files into my project manually, seems to work!

Thanks

karltynan commented 6 years ago

Good start! We will have a look into it at some point to see if we can figure it out, but if you find a solution in the meantime, please feel free to contribute it back :)

amrosama2020 commented 6 years ago

Had the same issue. Fixed it without including the cs files since all required classes are included in DLL.

However to get strong type "LinkPicker" the following needs to be done:

  1. Make sure you install via nuget to reference the DLL "Gibe.LinkPicker.Umbraco" in your project
  2. Add the following line to the views folder web.config "<add namespace="Gibe.LinkPicker.Umbraco" />" (would be nice if this change gets added to nuget package)
  3. Add a using to your cshtml file "@using Gibe.LinkPicker.Umbraco.Models"

I tried this on both regular views and macros

stevetemple commented 5 years ago

DLLs are in v 1.4.x and above so should not be an issue any more