+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Module not installing

Custom Module not installing

11 posts, 2 answered
  1. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013
    Link to this post
    Hi
    I have worked through the How To 'Create a Jobs Module' at http://www.sitefinity.com/documentation/documentationarticles/developers-guide/how-to/how-to-create-a-jobs-module. I am pretty sure I have done everything correct as in the how to, but when I set it up in Sitefinity, it does not work.

    Going into Administration -> Modules & Services I can see the module there, but it is not installed. When I try to install it via the Actions drop down menu, the page refreshes but it is still not installed.

    I have break points at the start of all the methods in JobsModule.cs but none of them are being hit when I attempt to debug.

    Has anyone got any ideas on either what I could have done wrong, and how to get this custom module to stop on break points?

    I am using Sitefinity 6.0

    Thanks in advance,
    David
  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    27 Jun 2013 in reply to David
    Link to this post
    Hi David,

    Did you checked the error.log file?
    Maybe there is an exception logged there.

    Kind regards,
    Daniel
  3. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    27 Jun 2013 in reply to Daniel Plomp
    Link to this post
    In addition to Daniel's suggestion make sure you have built your solution in visual studio. CTRL + SHIFT +  B (key board short  cut) or right click on the solution in the Solution Explorer and Build.  On top of that I usually like to give the web.config a "tap", make a change to it (that won't effect it) and then save it.
  4. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013 in reply to Daniel Plomp
    Link to this post
    Hi Daniel

    That was one of the first things I did, and then forgot to mention in my post. There are no errors that I can see around this custom module.

    I even put 
    throw new ApplicationException();
    at the start of every method to try and get that logged to see even if the methods were being called. There was no errors of this type logged, and no sign of any other error that I could identify as being related to the new Jobs Module.

    Thanks,
    David
  5. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    27 Jun 2013 in reply to David
    Link to this post
    Hi David,

    So it seems that your custom module isn't touched at all. Which would probably indicate something is wrong with how the module is registered, since Sitefinity doesn't seems to be aware of a new module?

    Can you show how the module is registered in your SystemConfig.config?

    Kind regards,
    Daniel
  6. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013 in reply to Jonathan
    Link to this post
    Hi Jonathan

    I am restarting the VS dev server after every change, just to ensure the application is starting each time. The solution is definitely being built, as far as I can tell. The Jobs module is a class library in the same solution as the Sitefinity project, and the Sitefinity project references the Jobs project. The files Jobs.dll and Jobs.pdb are appearing in the Sitefinity bin folder, with the expected date modified values.

    Thanks,
    David

  7. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013 in reply to Daniel Plomp
    Link to this post
    Hi Daniel

    Here is the line from my SystemConfig.config after creating the module in Administration -> Settings -> Advanced -> ApplicationModules
    <add title="Jobs Modue" moduleId="00000000-0000-0000-0000-000000000000"
    type="Jobs.JobsModule" startupType="OnApplicationStart" name="Jobs Module"
    />

    Thanks,
    David
  8. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    27 Jun 2013 in reply to David
    Link to this post
    Hi David,

    I don't think it is installed, since there is no version attribute added to that line.
    Hard to say though. My experience is that it 9/10 times has to do something with wrong assembly versions. Are you sure the files that are referenced in the Jobs module are the same as the ones with Sitefinity?

    Make sure that you refer to the Sitefinity /bin/ folder. Sometimes you have to delete the /bin/debug folder, the /bin/release folder, the /obj/ folder before building the project.

    Kind regards,
    Daniel
    Answered
  9. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013
    Link to this post
    Hi Daniel

    You hit the nail on the head. I had referenced the files as outlined in the articles, from the Sitefinity SDK, in the Jobs Module. I went through and removed the references pointing at the files in the SDK and instead referenced the files same files from the bin folder of the Sitefinity website.

    All of a sudden, my breakpoints are being hit, and the custom module is available.

    Thanks very much for your help
    David
  10. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    27 Jun 2013 in reply to Daniel Plomp
    Link to this post
    Hi Daniel

    The problem was file versions by the looks of it. I had referenced the files as outlined in the articles, from the Sitefinity SDK, in the Jobs Module. I went through and removed the references pointing at the files in the SDK and instead referenced the same files from the bin folder of the Sitefinity website.

    All of a sudden, my breakpoints are being hit, and the custom module is available.

    Thanks very much for your help
    David
    Answered
  11. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    27 Jun 2013 in reply to David
    Link to this post
    Hi David,

    Ok, great to hear you got it working.
    Another best practice would be to create a /Lib/ folder inside your project that contains the right .dll versions.

    Best,
    Daniel
11 posts, 2 answered