Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

The application has been generated successfully. No interface will be displayed when opening exe?

Open lzb949838390 opened this issue 4 years ago • 7 comments

🚨 The issue tracker is not for questions 🚨

lzb949838390 avatar Jan 02 '22 06:01 lzb949838390

97a5fe99a40ecb2c614272205d4678c 1641106026(1)

lzb949838390 avatar Jan 02 '22 06:01 lzb949838390

“electronize start” success “electronize build /target win” has question

lzb949838390 avatar Jan 02 '22 06:01 lzb949838390

I run \bin\Desktop\win-unpacked\resources\bin\OOP.BMS.Web.exe 1641107119(1)

lzb949838390 avatar Jan 02 '22 07:01 lzb949838390

Looks like a bug in your code. This is not likely an electron.net issue.

danatcofo avatar Jan 02 '22 13:01 danatcofo

@lzb949838390

NOTE: When electronzie build is executed, it calls to generate a single-file, self-contained exe:

 dotnet publish ....... /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained

By the looks of the exception, your code is utilizing reflection in a particular why that does not work when things are published as a single file. I found this issue over in the dotnet/runtime repo explaining why this is so.

You can either adjust your code or you can disable the single-file flag by:

electronize build /target win /p:publishSingleFile=false

schaveyt avatar Jan 03 '22 05:01 schaveyt

@schaveyt Thank you.I have solved the problem of win build. But I have a new problem,Error occurred while linux build. look... 1641283801(1)

lzb949838390 avatar Jan 04 '22 08:01 lzb949838390

Hi, @lzb949838390! As I can see (https://github.com/electron-userland/electron-builder/issues/3569), it's a temporary (or not so temporary 😢: https://github.com/electron-userland/electron-build-service/issues/17) error caused due to unreachable remote build server, which is used by electron-builder - a npm package and an infrastructure that handles electron apps packaging. You can try again later, or set up a build agent on a local machine. If you need to automate your Electron.NET app's builds, try using CI services like Travis CI, GitHub Actions or AppVeyor - I think that it would be easier to set up and maintain than hosting own build agent for electron-builder.

sirkadirov avatar Jan 10 '22 18:01 sirkadirov