-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when building Electron app for dist #21
Comments
To be honest its not the first time that people have problems when using |
I have just confirmed that the EDGE_APP_ROOT is being set properly. I have configured Electron-builder is an extremely popular package in the electron community. Would it be possible for you to look into the issue and possibly help support it's usage. Do you know of other users that have successfully got this combo to work? |
From what I have seen so far Edge.js does not work from asar archives in general. There were multiple issues and questions on Slack about it and to my knowledge you cannot pack Edge.js into asar archive. You would need to have all Edge.js specific parts outside asar archive. |
On a related note if you create a sample repo that uses |
Hmmm, had various problems with the build step of native dependency edge.js with electron-builder in the past, but those were minor bumps. |
First time I hear about it, all the issues that were raised so far were left unresolved. But this means there is some hope :) Are you getting this problem on specific OS or all of them? |
@consense How are you packaging you .net code in your electron-builder app? Are you referencing DLLs or scripting .net right inside your JS code? My setup on the edge/.net side is exactly like the |
I am on a mac, btw. |
@stephen776 I am assuming that quickstart does not work for you at all? This is a separate issue not related to |
Quickstart works fine as is. When I take the same .net code from the quickstart and copy it into my electron-builder app...it works fine in development but when I package for release, I get the error. |
Ok, this is rather confusing as I am getting multiple reports of |
I had two issues when getting the quickstart to run on mac:
Other than that works fine on mac. |
Can you output the following env variables to console: |
@stephen776 I am referencing dlls which are included via |
The error is specific to .NET Core, quick-start is compiled to .NET Core and specifies |
Ok - in that case sorry for having been misleading.
which didnt mention .NET Core. |
No problem. |
@agracio if I explicitly set
to console, then Here is a link to a repo to reproduce. I notice that the error message is different on windows vs mac but same basic problem building and running from either platform. https://github.com/stephen776/electron-edge-package-test this is the electron-react template I am using on my main project. if you head to this project uses the 2 package.json setup. You will need to run I use nvm on mac to specify my node version as 8.9.3. Project runs fine in dev mode: run Error occurs when project is packaged with electron builder: run Thanks for taking the time to check this out. |
Give me a couple of days, just finishing some improvements to .NET Core handling including support for .NET Standard. |
Just tested it on Windows and followed instructions you provided. |
Thank you for digging that up. I will try to track down exactly why the files aren't ending up where they should. |
@agracio Ok, I have made some progress on this but I am still stuck. If you pull the lastest master branch of my sample posted earlier and follow the same testing instructions, you will notice that it works fine in I have confirmed that the path is now correct on all platforms with the updated code but the error remains on mac when packaged for release: |
Can you update you |
Just upgraded to 8.3.6. Same issue. I am noticing that |
No, it is not suppose to be copied. The error indicates that .NET Core dlls are not found in that location. |
my package has nothing in that folder besides |
I mean in |
Should be the same content as when you run using |
Ok, that's what I expected. I just confirmed. The files are exactly the same in I am kind of lost at this point. Have tried everything I can think of. |
There is another possibility that once app is published it no longer has access to .NET Core files on the machine. In that case you would need to create a real standalone package and bundle it with the app. For some info on publishing a standalone app take a look at this post: https://stackoverflow.com/questions/46829860/how-to-distribute-a-net-core-2-0-console-application-on-osx. Or you can try to manually copy all .NET Core files into the directory. |
Ok, I think you've got me on the right path now. Referring back to the docs on the main edge.js repo, there are instructions to configure a dotnet core app to run standalone. Combining those settings with your linked SO post got me to a packaged build that runs. Just a few more kinks to iron out but it's looking good. Thank you for all of the support. |
In case anyone else is running into problems publishing a self contained app: e.g. dotnet publish MyLibrary.csproj -r win10-x64 --self-contained |
When I package my electron app for distribution using
electron-builder
I am getting the following error:I am using the same .NET code as the quickstart for a proof-of-concept.
Any ideas on why I'd get this error? I have confirmed the .dlls are getting copied into the package.
The text was updated successfully, but these errors were encountered: