Search code examples
dotnetnuke2sxc

2sxc - error in local installation (copy of live instance) something missing?


We have got a 'live' dnn 9.13.2 installation with 2sxc 17.9 which is working without problems. I made a copy of this installation to use as a local dev environment. And when I try to login on this environment I get an error. I think it might be related to the skin which is based on 2shine:

DotNetNuke.Web.DependencyInjectionInitialize - Unable to configure services for ToSic.Sxc.Dnn.StartUp.StartupDnn9, see exception for details
System.IO.FileNotFoundException: Could not load file or assembly 'ToSic.Sxc.Code.Generate, Version=17.9.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Het systeem kan het opgegeven bestand niet vinden.
File name: 'ToSic.Sxc.Code.Generate, Version=17.9.0.0, Culture=neutral, PublicKeyToken=null'
   at ToSic.Sxc.Dnn.StartUp.DnnDi.RegisterServices(IServiceCollection services)
   at ToSic.Sxc.Dnn.StartUp.StartupDnn9.ConfigureServices(IServiceCollection services) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\StartUp\StartupDnn9.cs:line 28
   at DotNetNuke.Web.DependencyInjectionInitialize.ConfigureAllStartupServices(IServiceCollection services)

Any idea why the live site does not have a problem, while the dev environment doesn't?

I've checked the bin folder, but there is no difference between live and dev. So a missing file does not seem the problem.

Also tried to set the rights in IIS again, but that does not seem to be the problem.

What am I missing?


Solution

  • If you completely cloned a live and working DNN instance to a local dev environment, I recommend you take a close look at what versions of .NET and related items you have installed.

    It sounds like the ToSic.Sxc.Code.Generate.dll is failing to load with a missing dependency and the error is not "bubbling up." So, since its obviously outside the DNN instance...

    I would focus on trying to make sure you have runtimes installed for .NET Frame work 4.7.x and 4.8.x and run Windows updates to make sure everything is up to date. Then do the same for .NET 6 and .NET 8 (core, modern .NET).

    If the problem still exists, try installing the various (matching versions) of the development SDKs next.

    .NET Framework Runtimes https://dotnet.microsoft.com/en-us/download/dotnet-framework

    All .NET downloads https://dotnet.microsoft.com/en-us/download/dotnet

    All .NET 8 SDKs https://dotnet.microsoft.com/en-us/download/dotnet/8.0

    If that still doesn't work, then digging deeper and finding the real error probably needs more effort.

    Another possibility might be that the permissions aren't right for the DLL?

    How are you making the copy? Maybe if we had more details about how you cloned the site, there would be a new clue? Have you tried doing a backup (live) and restore (local dev) using a tool like Evotiva DNNBackup?