Hey,
Someone already tried to run ElectronNET with DOTVVM ?
Iām using current version for both and setup using Normal-API for ElectronNET. I have been trying to make them run together but I can only have a blank window on Electron.
In the console logs I get a āThe assembly DotVVM.Framework was not foundā and I canāt run the dotvvm website anymore neither.
Something broke after instaling ElectronNET? Someone is able to make Dotvvm run with electron?
Can you post the entire exception including the stack trace?
Is the exception in the server-side log, or in the dev tools console log in the Electron window?
How does the Startup.cs file look like?
For the Startup.cs, I have the default one, I just added the following code at the end of Configure(): Electron.WindowManager.CreateWindowAsync();
This exception appears in the command line after running āelectronize startā. In the console log of the electron window I only get an error 500 (electron window with blank page.)
I tried to remover the Electron.WindowManager.CreateWindowAsync() from Startup.cs e remove the useElectron() from the Program.cs and when I run the project and the website stopped working.
Iāve probably found the issue. The electronize start command publishes the app as a single file which is not supported by DotVVM right now. Also, there is ReadyToRun option - I donāt know how well DotVVM supports it.
I got it work using the following command: electronize start /PublishSingleFile false /PublishReadyToRun false
I am not sure whether it is possible to set these arguments via some configuration file.
Thank you for the help and explanation, Iāve been searching and it looks like the only way is by running your command. The electronize config file has nothing to config that.
You can definitely use ReadyToRun with DotVVM. Although it might not have a high impact on the real startup time, since DotVVM cannot precompile the View.
I suppose the problem with single-file deployment is that DotVVM has to have access to the dothtml files. If you really want to avoid shipping the Views folder, you can add them as embedded resources and then reference them as embedded://Assembly/ResourceName. We have it described for controls Markup Control Registration | DotVVM Documentation, but it should work for normal views too.
There was also some problem with assembly loading. I am afraid that we donāt have this scenario covered by tests, so there may be more things that wonāt work.
Spliting into 2 separate projects and using Electron IPC to communicate with the port where the dotvvm āfrontendā project is running is a solution or not so good idea?
They would be published separately tooā¦
I think this is quite a common solution. It depends on whether you want to embed the DotVVM application and ship it with the Electron app, or whether the DotVVM app should run on the server and the Electron is just a āwindowā in which the application appears.