Tyler Buchanan (Customer) asked a question.

Can't add module packages to Headless CMS / .NET Core SF15 Setup

Hi, I have a problem with installing module packages in my Headless CMS install, specifically packages like `Telerik.Sitefinity.RecycleBin` and `Telerik.Sitefinity.SitemapGenerator`. When I try to set these up I have many issues with missing references and binding redirects. Usually it starts out with `Could not load file or assembly 'System.Net.Http, Version=4.2.0.0`, but even if I manage to resolve this issue, other assembly issues arise.

 

I have gotten this working before by installing the `Telerik.Sitefinity.All` package, but this installs all of the MVC tooling which isn't appropriate for my setup. I used the `Progress.Sitefinity.Headless` package as per the docs, I'm currently on version 15.1.8330.


  • Tyler Buchanan (Customer)

    I was able to resolve this by taking the following steps -

     

    1. After encountering the issue, reset back to the state before trying to install the additional module
    2. Delete all assembly binding redirects
    3. Rebuild
    4. Observe the compiler warnings and update your web.config with the output of the new assembly binding recommendations
    5. Run the project, confirm that it works
    6. Stage / check-in your changes
    7. Add the module package you want to install
    8. Revert all web.config changes made by the package install
    9. Build and run the project, the CMS should start and the module should now be present

     

    Some of these steps might not be necessary, but it helped me see what was going on. It seems the package install for these extra modules adds several binding redirects that don't seem to get along with the Headless setup, possibly because these packages also need to support the MVC / Hybrid modes, but I'm not sure.

    Selected as Best
  • Jonathan Read (Progress Software)

    When you are trying to install Telerik.Sitefinity,RecycleBin are you target version 15.1.8330 specifically? If you don't specify a version it might try to do the latest which could result in the errors you are having

    • Tyler Buchanan (Customer)

      Yes, I am targeting my current version/8330 through the NuGet Package Manager. This project has been ongoing for a while and has had a few patches and I tried installing this while on the older patches as well, with the appropriate package version, and it generates the same issue.

      • Jonathan Read (Progress Software)

        if you are doing command line you can try the --force flag.

  • Tyler Buchanan (Customer)

    I was able to resolve this by taking the following steps -

     

    1. After encountering the issue, reset back to the state before trying to install the additional module
    2. Delete all assembly binding redirects
    3. Rebuild
    4. Observe the compiler warnings and update your web.config with the output of the new assembly binding recommendations
    5. Run the project, confirm that it works
    6. Stage / check-in your changes
    7. Add the module package you want to install
    8. Revert all web.config changes made by the package install
    9. Build and run the project, the CMS should start and the module should now be present

     

    Some of these steps might not be necessary, but it helped me see what was going on. It seems the package install for these extra modules adds several binding redirects that don't seem to get along with the Headless setup, possibly because these packages also need to support the MVC / Hybrid modes, but I'm not sure.

    Selected as Best