• Re: MIKE SDK license error while running a simulation

    So for me the solution was to use Mike Hydro format [b]mhydro [/b] instead of sim11 and the simulation runs successfully
  • MIKE SDK license error while running a simulation

    So I have MIKE Zero demo version 19 installed on my computer and I've written a small program which should run a simulation for given sim11 file and give a result. Like it works inside MIKE Zero app.
    My program logs exception which I cannot solve so any ideas are welcome.
    I'll post my code and the log.
    [code]
    using System;
    using System.IO;
    using DHI.Mike.Install;
    using DHI.Mike1D.Generic;
    using DHI.Mike1D.SimLauncher;

    namespace TestMikeSDK
    {
        class Program
        {
            static void Main(string[] args)
            {
                if (!MikeImport.Setup(19, MikeProducts.MikeZero))
                    throw new Exception("Could not find a MIKE installation");

                var testSimFilePath = Path.Combine(Directory.GetCurrentDirectory(), "kratki C1.sim11");

                var simWorker = new SimulationWorker(new FilePath(testSimFilePath));

                simWorker.Work();
            }
        }
    }
    [/code]

    And this is the logged exception
    [code]
    2021-07-26 23:03:02: MIKE 1D Engine started (2021 - 64 bit, .NETFramework,Version=v4.7.2)
                        Version of MIKE 1D                            : 19 (19.1.0.15119, 2021-04-29)
                        Version of DHI.Mike1D.Engine                  : 19 (19.1.0.15119, 2021-04-29 20:02:13)
                        Version of DHI.Mike1D.RainfallRunoffModule    : 19 (19.1.0.15119, 2021-04-29 20:04:20)
    2021-07-26 23:03:03: Loading setup file kratki C1.sim11...
    2021-07-26 23:03:03: Diagnostics messages during load:
    2021-07-26 23:03:03: WARNING: Changing '.res11' extension to res1d for file: '..\bin\Debug\rezultati.res11'. (BR_WAR_ChangingRes1DExtension)
    2021-07-26 23:03:03: ERROR: Unexpected exception occurred. Please see log file for details. Exception message: Failed loading data from M11 bridge (DHI.Mike1D.M11Bridge.M11Bridge): ..\bin\Debug\kratki C1.sim11
    2021-07-26 23:03:03: Exception: Failed loading data from M11 bridge (DHI.Mike1D.M11Bridge.M11Bridge): ..\bin\Debug\kratki C1.sim11
                        Field not found: 'DHI.Mike1D.Generic.LicenseChecker.LRV'.

    [/code]