I am getting the name factory does not exist in the current context. I followed your video and added references to my project and added the DittoPublishedContentModelFactory DLL. The AppStartup.cs is in the AppCode folder and should work. What am i missing?
Cannot resolve DittoPublishedContentModelFactory
Hi!
I’m trying to use Ditto 0.6.1 but can’t resolve the custom model factory (DittoPublishedContentModelFactory).
Is anyone else having this problem or did I overlook something?
Installation through nuget.
I used version 0.4.1 in another solution and this works fine.
Umbraco 7.1.8
Using version 0.4.1 for now.
Any help is much appreciated :)
Hi Torleif,
The
DittoPublishedContentModelFactory
has been moved out of the core Ditto project, the reasons for this are:The codebase for the model factory is still available here: https://github.com/leekelleher/umbraco-ditto/tree/master/src/Our.Umbraco.Ditto.ModelFactory
You'll need to build it manually, then drop the
Our.Umbraco.Ditto.ModelFactory.dll
into your /bin folder.I'm planning on adding a NuGet package for this soon - just need to schedule it in. (I'm juggling a lot of community package support these days!)
Cheers,
- Lee
I totally understand Lee. Great work on the package!
Cheers,
Torleif
I am getting the name factory does not exist in the current context. I followed your video and added references to my project and added the DittoPublishedContentModelFactory DLL. The AppStartup.cs is in the AppCode folder and should work. What am i missing?
AppStartup.cs
namespace itmediastudio.com.App_Code
{
public class AppStartup : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
var types = PluginManager.Current.ResolveTypes();
var Factory = new DittoPublishedContentModelFactory(types);
PublishedContentModelFactoryResolver.Current.SetFactory(factory);
}
}
}
any input would be halpful.
thanks Keith
I would try changing the local factory variable to "factory" without the capital letter :)
var types = PluginManager.Current.ResolveTypes<PublishedContentModel>();
var factory = new DittoPublishedContentModelFactory(types);
PublishedContentModelFactoryResolver.Current.SetFactory(factory);
that fixed it thank you
is working on a reply...