0

I have problem with adding Piranha CMS to my existing project. I am using MVC. After I have set up everything like it is described here I am receiving error "Entry point was not found."

System.Collections.Generic.IEnumerable`1.GetEnumerator()
   at System.Linq.Enumerable.<UnionIterator>d__88`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Piranha.Manager.ManagerModule.Init() in c:\Proj\GitHub\Piranha\Piranha\Manager\ManagerModule.cs:line 32

This is part of SC

private static string[] ExtensionsFolder = new[] { "~/Areas/Manager/Views/Extensions/{0}.cshtml" };     

/// <summary>
/// Create the view engine.
/// </summary>
public static void Init() {
    if (!Config.DisableManager) {
        // Create new precompiled view engine
        var engine = new PrecompiledMvcEngine(typeof(ManagerModule).Assembly) {
            UsePhysicalViewsIfNewer = true
        } ;
        engine.PartialViewLocationFormats = engine.PartialViewLocationFormats.Union(ExtensionsFolder).ToArray();
        var standard = new RazorViewEngine() ;
        standard.PartialViewLocationFormats = standard.PartialViewLocationFormats.Union(ExtensionsFolder).ToArray() ;

        ViewEngines.Engines.Insert(0, standard) ;
        ViewEngines.Engines.Insert(1, engine) ;
Laurel
  • 5,965
  • 14
  • 31
  • 57
Nikola Gaić
  • 117
  • 1
  • 11

1 Answers1

1

What version of ASP.NET MVC are you using? "Entry point not found" is often caused by having the wrong version of some DLL so the dynamic linking fails at runtime.

Laurel
  • 5,965
  • 14
  • 31
  • 57
Håkan Edling
  • 2,723
  • 1
  • 12
  • 15
  • I was using mvc 4. If I create blank mvc 4 and 5 procject all works fine. If I use new mvc 4 internet aplication template and add piranha or if I add my old procjet I will get this error. I have tried to upgrade my mvc 4 project to mvc 5 but then I am geting other errors from piranha cms. Basicly all works fine if I am creating new project but when I try to add piranha to existing project problem starts. I will try to debug the code so I could finde out more. – Nikola Gaić Jan 21 '14 at 07:46
  • I'll have to try the same steps as you described to see if I can reproduce the error. I'll get back to you! – Håkan Edling Jan 21 '14 at 11:11
  • Maybe I am doing something wrong. Now I have created new mvc 4 project with internet page template. After that, I have instaled piranha, removove reference for Piranha and Piranha.MVC. Then I have added two source projects (Piranha, Piranha.MVC). Fixed some errors from OpenAuth.Core. Then I have change web config for piranha and all is working like charm. I will try now add piranha to my main. – Nikola Gaić Jan 21 '14 at 12:45
  • Allso I forget to say, this is realy great CMS. Realy easy to use and it offers just what I need. – Nikola Gaić Jan 21 '14 at 13:03