Giter Site home page Giter Site logo

electronnet / electron.net Goto Github PK

View Code? Open in Web Editor NEW
7.1K 231.0 704.0 5.37 MB

:electron: Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).

Home Page: https://gitter.im/ElectronNET/community

License: MIT License

C# 73.05% JavaScript 2.01% Batchfile 0.05% TypeScript 9.92% Shell 0.27% CSS 1.91% HTML 12.44% PowerShell 0.34%
electron dotnet dotnet-core dotnet-standard asp-net-core asp-net-core-mvc aspnet electron-net blazor blazor-server blazor-webassembly cross-platform dotnetcore

electron.net's Introduction

Electron.NET Logo

donate Gitter Build status

Build cross platform desktop apps with .NET 6 and Blazor, ASP.NET Core (Razor Pages, MVC).

Electron.NET is a wrapper around a native Electron application with an embedded ASP.NET Core application. Via our Electron.NET IPC bridge we can invoke Electron APIs from .NET.

The CLI extensions hosts our toolset to build and start Electron.NET applications.

Wait - you host a .NET Core app inside Electron? Why?

Well... there are lots of different approaches how to get a X-plat desktop app running. We thought it would be nice for .NET devs to use the ASP.NET Core environment and just embed it inside a pretty robust X-plat enviroment called Electron. Porting Electron to .NET is not a goal of this project, at least we don't have any clue how to do it. We just combine ASP.NET Core & Electron.

📦 NuGet

NuGet ElectronNET.API | NuGet ElectronNET.CLI

🛠 Requirements to Run

The current Electron.NET CLI builds Windows/macOS/Linux binaries. Our API uses .NET 6, so our minimum base OS is the same as .NET 6.

Also you should have installed:

💬 Community

Gitter

Besides the chat on Gitter and the issues discussed here you can also use StackOverflow with the tag electron.net.

If you want to sponsor the further maintenance and development of this project see the donate section.

👩‍🏫 Usage

To activate and communicate with the "native" (sort of native...) Electron API include the ElectronNET.API NuGet package in your ASP.NET Core app.

PM> Install-Package ElectronNET.API

Setup Using Minimal-API

You start Electron.NET up with an UseElectron WebHostBuilder-Extension and open the Electron Window:

Program.cs

using ElectronNET.API;
using ElectronNET.API.Entities;

var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseElectron(args);

// Is optional, but you can use the Electron.NET API-Classes directly with DI (relevant if you want more encoupled code)
builder.Services.AddElectron();

var app = builder.Build();

...

await app.StartAsync();

// Open the Electron-Window here
await Electron.WindowManager.CreateWindowAsync();

app.WaitForShutdown();

Setup using Normal-API

Program.cs

You start Electron.NET up with an UseElectron WebHostBuilder-Extension.

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder.UseElectron(args);
            webBuilder.UseStartup<Startup>();
        });

Startup.cs

Open the Electron Window in the Startup.cs file:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    //...

    Electron.WindowManager.CreateWindowAsync();
}

🚀 Starting the Application

To start the application make sure you have installed the "ElectronNET.CLI" packages as global tool:

dotnet tool install ElectronNET.CLI -g

At the first time, you need an Electron.NET project initialization. Type the following command in your ASP.NET Core folder:

electronize init
  • Now a electronnet.manifest.json should appear in your ASP.NET Core project
  • Now run the following:
electronize start

Note

Only the first electronize start is slow. The next will go on faster.

🔭 Develop Electron.NET apps using a file watcher

The file watcher is included with version 8.31.1 of Electron.NET. For example, a file change can trigger compilation, test execution, or deployment. The Electron.NET window will automatically refresh and new code changes will be visible more quickly. The following Electron.NET CLI command is required:

electronize start /watch

Note

Only the first electronize start is slow. The next will go on faster.

🐞 Debugging the Application

Start your Electron.NET application with the Electron.NET CLI command. In Visual Studio attach to your running application instance. Go in the Debug Menu and click on Attach to Process.... Sort by your projectname on the right and select it on the list.

📔 Usage of the Electron API

A complete documentation will follow. Until then take a look in the source code of the sample application:
Electron.NET API Demos

In this YouTube video, we show you how you can create a new project, use the Electron.NET API, debug a application and build an executable desktop app for Windows: Electron.NET - Getting Started

⛏ Building Release Artifacts

Here you need the Electron.NET CLI as well. Type the following command in your ASP.NET Core folder:

electronize build /target win

There are additional platforms available:

electronize build /target win
electronize build /target osx
electronize build /target linux

Those three "default" targets will produce x64 packages for those platforms.

For certain NuGet packages or certain scenarios you may want to build a pure x86 application. To support those things you can define the desired .NET Core runtime, the electron platform and electron architecture like this:

electronize build /target custom "win7-x86;win32" /electron-arch ia32 

The end result should be an electron app under your /bin/desktop folder.

Note

macOS builds can't be created on Windows machines because they require symlinks that aren't supported on Windows (per this Electron issue). macOS builds can be produced on either Linux or macOS machines.

🔄 Update

After an update to the latest Electron.API package, an update to the latest Electron.CLI is always required. In addition, always update the CLI via NuGet:

dotnet tool update ElectronNET.CLI -g

👨‍💻 Authors

See also the list of contributors who participated in this project.

🙋‍♀️🙋‍♂ Contributing

Feel free to submit a pull request if you find any bugs (to see a list of active issues, visit the Issues section. Please make sure all commits are properly documented.

🧪 Working with this Repo

This video provides an introduction to development for Electron.NET: Electron.NET - Contributing Getting Started

This repository consists of the main parts (API & CLI) and it's own "playground" ASP.NET Core application. Both main parts produce local NuGet packages, that are versioned with 99.0.0. The first thing you will need is to run one of the build scripts (.cmd or .ps1 for Windows, the .sh for macOS/Linux).

If you look for pure demo projects checkout the other repositories.

The problem working with this repository is, that NuGet has a pretty aggressive cache, see here for further information.

🙏 Donate

We do this open source work in our free time. If you'd like us to invest more time on it, please donate. Donation can be used to increase some issue priority. Thank you!

donate

Alternatively, consider using a GitHub sponsorship for the core maintainers:

Any support appreciated! 🍻

🎉 License

MIT-licensed. See LICENSE for details.

Enjoy!

📝 Important notes

ElectronNET.API & ElectronNET.CLI Version 9.31.2

Make sure you also have the new Electron.NET API & CLI 9.31.2 version.

dotnet tool update ElectronNET.CLI -g

This now uses electron-builder and the necessary configuration to build is made in the electron.manifest.json file (on the build part). In addition, own Electron.NET configurations are stored (on the root).

Please make sure that your electron.manifest.json file has the following new structure:

{
  "executable": "{{executable}}",
  "splashscreen": {
    "imageFile": ""
  },
  "name": "{{executable}}",
  "author": "",
  "singleInstance": false,
  "build": {
    "appId": "com.{{executable}}.app",
    "productName": "{{executable}}",
    "copyright": "Copyright © 2020",
    "buildVersion": "1.0.0",
    "compression": "maximum",
    "directories": {
      "output": "../../../bin/Desktop"
    },
    "extraResources": [
      {
        "from": "./bin",
        "to": "bin",
        "filter": ["**/*"]
      }
    ],
    "files": [
      {
        "from": "./ElectronHostHook/node_modules",
        "to": "ElectronHostHook/node_modules",
        "filter": ["**/*"]
      },
      "**/*"
    ]
  }
}

ElectronNET.CLI Version 0.0.9

In the Version 0.0.9 the CLI was not a global tool and needed to be registered like this in the .csproj:

<ItemGroup>
  <DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" />
</ItemGroup>

After you edited the .csproj file, you need to restore your NuGet packages within your Project. Run the following command in your ASP.NET Core folder:

dotnet restore

If you still use this version you will need to invoke it like this:

electronize ...

Node.js Integration

Electron.NET requires Node.js integration to be enabled for IPC to function. If you are not using the IPC functionality you can disable Node.js integration like so:

WebPreferences wp = new WebPreferences();
wp.NodeIntegration = false;
BrowserWindowOptions browserWindowOptions = new BrowserWindowOptions
{
    WebPreferences = wp
};

Dependency Injection

ElectronNET.API can be added to your DI container within the Startup class. All of the modules available in Electron will be added as Singletons.

using ElectronNET.API;

public void ConfigureServices(IServiceCollection services)
{
    services.AddElectron();
}

electron.net's People

Contributors

aarong-av avatar boristhebrave avatar daddoon avatar dafergu2 avatar dependabot[bot] avatar dlanorok avatar florianrappl avatar freosc avatar gregorbiswanger avatar gustavo-lara-molina avatar indiemini avatar jamiebrynes7 avatar kant2002 avatar konstantingross avatar nickrimmer avatar noahpfichter avatar petermarcu avatar rbaker26 avatar robertmuehsig avatar ru-sh avatar scottkuhl avatar softworkz avatar tebeco avatar tsrgy avatar tub5 avatar tum4ik avatar x-xx-o avatar yodon avatar yuvix25 avatar zacbre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron.net's Issues

Events fired not object based

Two different objects that registred the same event will be fired.
As example two BrowserWindow-Objects registred the OnMinimize-Event.
One of this fired the Event, and all handler will be executing. That is the problem.

Package creation improvements

  • buildReleaseNuGetPackage doesn't force a rebuild of the projects, which may lead to "stale" releases
  • It seems that your packages contain debug bit...
  • Oh - and the version number on the assembly is still 1.0
  • Some URLs from the package still point to the old GitHub repo

Fresh clonse and build leads to Errors :( :

D:\Users\muehsig\Documents\GitHub\Electron.NET>echo "Restore & Build API" "Restore & Build API"

D:\Users\muehsig\Documents\GitHub\Electron.NET>cd ElectronNet.API

D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API>dotnet restore
Restoring packages for D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\ElectronNET.API.csproj...
Generating MSBuild file D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\obj\ElectronNET.API.csproj.nuget.g.props.
Generating MSBuild file D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\obj\ElectronNET.API.csproj.nuget.g.targets.
Restore completed in 1.45 sec for D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\ElectronNET.API.csproj.

D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API>dotnet pack /p:PackageVersion=0.0.4 --output D:\Users\muehsig\Documents\GitHub\Electron.NET\artifacts
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\2.0.2\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : The file 'D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\bin\Debug\netcoreapp2.0\ElectronNET.API.dll' to be packed was not found on disk. [D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API\ElectronNET.API.csproj]

D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.API>cd ..

D:\Users\muehsig\Documents\GitHub\Electron.NET>echo "Restore & Build API"
"Restore & Build API"

D:\Users\muehsig\Documents\GitHub\Electron.NET>cd ElectronNet.CLI

D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI>dotnet restore
Restoring packages for D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj...
Generating MSBuild file D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\obj\ElectronNET.CLI.csproj.nuget.g.props.
Generating MSBuild file D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\obj\ElectronNET.CLI.csproj.nuget.g.targets.
Restore completed in 181.44 ms for D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj.

D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI>dotnet pack /p:PackageVersion=0.0.4 --output D:\Users\muehsig\Documents\GitHub\Electron.NET\artifacts
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\2.0.2\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : The file 'D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\bin\Debug\netcoreapp2.0\dotnet-electronize.runtimeconfig.json' to be packed was not found on disk. [D:\Users\muehsig\Documents\GitHub\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj]
PS D:\Users\muehsig\Documents\GitHub\Electron.NET>

webapplication does not appear.

os: win10 64bit .net core 2.0.2 vs2017 15.4

i followed the readme's step,finally the console window appear:
Start Electron Desktop Application...
Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。

C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2>dotnet publish -r win10-x64 --output "C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\obj\Host\bin"
用于 .NET Core 的 Microsoft (R) 生成引擎版本 15.4.8.50001
版权所有(C) Microsoft Corporation。保留所有权利。

ASPNETCORE2 -> C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\bin\Debug\netcoreapp2.0\win10-x64\ASPNETCORE2.dll
ASPNETCORE2 -> C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\obj\Host\bin\

C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2>

Start npm install...
Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。

C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\obj\Host>npm install

[email protected] postinstall C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\obj\Host\node_modules\electron
> node install.js

and hanged.
then I switch to visual stuido and pressed f5
a console weindow appeared:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\Think\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
Hosting environment: Production
Content root path: C:\Users\Think\Documents\Visual Studio 2017\Projects\WebApplication1\ASPNETCORE2\bin\Debug\netcoreapp2.0\win10-x64
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/home/index
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 313.9332ms 404
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 2.569ms 404
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 0.4535ms 404
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/home
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 0.2ms 404
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 0.7621ms 404

then I open chrome and input "http://localhost:5000" ,the browser return "HTTP ERROR 404",
I don't know why, perhaps some of my operations are wrong?. please help, thank you!

Electron.WindowManager.CreateWindowAsync -> NullRef when debugging the ASP.NET core app

  public async void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Error");
            }

            app.UseStaticFiles();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller}/{action=Index}/{id?}");
            });

            // Open the Electron-Window here
            await Electron.WindowManager.CreateWindowAsync();
        }
WebApplication6> Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
WebApplication6>    at ElectronNET.API.WindowManager.CreateWindowAsync(BrowserWindowOptions options, String loadUrl)
WebApplication6>    at ElectronNET.API.WindowManager.<CreateWindowAsync>d__7.MoveNext()
WebApplication6> --- End of stack trace from previous location where exception was thrown ---
WebApplication6>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
WebApplication6>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
WebApplication6>    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
WebApplication6>    at WebApplication6.Startup.<Configure>d__5.MoveNext() in D:\Users\muehsig\Documents\Visual Studio 2017\Projects\WebApplication6\WebApplication6\Startup.cs:line 51
WebApplication6> --- End of stack trace from previous location where exception was thrown ---
WebApplication6>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
WebApplication6>    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
WebApplication6>    at System.Threading.ThreadPoolWorkQueue.Dispatch()

Can't start my app

I'm running dotnet electronize start and it stops at:

stdout: Use Electron Port: 8002

I'm using .NET Core 2.0 and Node 8.9. Is that going to work? Any ideas? What other info would be helpful? Should I expect my app to come up when I run start?

Review Electron.NET-React-Typescript-MobX?

If you have a moment to look over and give feedback on the Typescript React boilerplate sample I just prepped, any suggestions would be much appreciated (and yes, I realize the un-themed app currently looks terrible, I'm aiming to clean that up in the next commit but wanted to get a functionality check first).

The repo is at https://github.com/yoDon/Electron.NET-React-Typescript-MobX

A couple notes: I'm a big fan of so-called static React architecturs where the frontend and backend are nicely decoupled and just data is exchanged between browser and server after the initial HTML/JS/CSS loads, so this sample uses webpack to build the React Typescript into a static /wwwroot/index.html and /wwwroot/bundle.js.

The React pages in this sample communicate with the C# server code entirely over Electron's Ipc API, so there isn't really any need for the ASPNET Controllers but I left the support for them in place in case others want to make use of them. Eventually I'd prefer to use strongly-typed SignalR communications between client and server rather than the text-based Ipc routes, but with the dotnet core version of SignalR still at alpha1 I wasn't convinced now was the time to bake that in. On the Server side, the Ipc routes are registered via code in /Ipc/Register.cs that's called by Startup.cs. I'm currently using a dictionary to ensure uniqueness of the Ipc route names because I wasn't sure if either Electron or Electron.NET would warn/throw an exception if I accidentally screwed up and registered two handlers with competing text paths on a larger project.

The index.html generated by webpack (npm run build) is currently loaded into the renderer process by putting a window.location redirect in the Home View .cshtml file. That's kind of a weird way to go about it but I wasn't sure how to keep the ASPNET MVC intact while routing Electron to open /index.html rather than /, and as with the Controllers I wanted to make sure that the basics of the boilerplate could support either static React sites or MVC sites built using whatever rendering engines the developer might prefer.

I wasn't able to figure out how to get hot reload working on the C# code. I don't know if that's pilot error on my part or a feature that's not implemented yet. I also didn't try to turn on hot reload of the React code into the browser as a result of a currently open bug elsewhere in the React/Typescript ecosystem.

Super excited to start trying to use this for something real.

BuildAll.cmd expect dotnet-electronize to be in the PATH

To be a bit more specific :

Clone the repo in a brand new folder

$\> buildAll.cmd

The output is :

"Start building Electron.NET dev stack..."
"Restore & Build API"
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\ElectronNET.API.csproj...
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\obj\ElectronNET.API.csproj.nuget.g.props.
  Restore completed in 417.03 ms for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\ElectronNET.API.csproj.
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  ElectronNET.API -> C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\bin\Debug\netcoreapp2.0\ElectronNET.API.dll
  Successfully created package 'C:\Workspace\GitHub\TeBeCo\Electron.NET\artifacts\ElectronNET.API.1.0.0.nupkg'.

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.86
"Restore & Build API"
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj...
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\obj\ElectronNET.CLI.csproj.nuget.g.props.
  Restore completed in 138.73 ms for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj.
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  ElectronNET.CLI -> C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\bin\Debug\netcoreapp2.0\dotnet-electronize.dll
  Successfully created package 'C:\Workspace\GitHub\TeBeCo\Electron.NET\artifacts\ElectronNET.CLI.1.0.0.nupkg'.

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:02.91
"Restore & Build WebApp Demo"
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj...
  Restore completed in 18.86 ms for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.
  Installing ElectronNET.API 1.0.0.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\obj\ElectronNET.WebApp.csproj.nuget.g.props.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\obj\ElectronNET.WebApp.csproj.nuget.g.targets.
  Restore completed in 2.38 sec for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  ElectronNET.WebApp -> C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\bin\Debug\netcoreapp2.0\ElectronNET.WebApp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.53
"Invoke electronize build in WebApp Demo"
"-- win"
No executable found matching command "dotnet-electronize"
"-- linux"
No executable found matching command "dotnet-electronize"

C:\Workspace\GitHub\TeBeCo\Electron.NET>

I maybe wrong but
running dotnet foobar will try to find an executable named dotnet-foobar in the current folder (not sure about that one)
then in the PATH

here the build try to
dotnet electronize stuff
and it feels logical that it fails since when developing this dotnet extension point we might not want it to be in the path.
but since we did build dotnet-electronize in the previos step it would be perfectly acceptable to run the actual ElectronNet.Cli\bin\${Build_Config}\${Target_Runtime}\dotnet-electronize.exe build win

This is where this is interesting

i was trying to reproduce the CLI build

$\ElectronNet> cd ElectronNet.CLI
$\ElectronNet\ElectronNet.CLI> dotnet restore
$\ElectronNet\ElectronNet.CLI> dotnet buiild
$\ElectronNet\ElectronNet.CLI> cd bin\debug\netcoreapp2.0

$\ElectronNet\ElectronNet.CLI\bin\debug\netcoreapp2.0> ls -alh 
or
$\ElectronNet\ElectronNet.CLI\bin\debug\netcoreapp2.0> dir

output :

C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\bin\Debug\netcoreapp2.0>ls -alh
total 147K
drwxr-xr-x 1 ahert 197609    0 Nov  6 21:50 .
drwxr-xr-x 1 ahert 197609    0 Nov  6 21:50 ..
-rw-r--r-- 1 ahert 197609  486 Nov  6 21:50 dotnet-electronize.deps.json
-rwxr-xr-x 1 ahert 197609 131K Nov  6 21:50 dotnet-electronize.dll
-rw-r--r-- 1 ahert 197609 6.6K Nov  6 21:50 dotnet-electronize.pdb
-rw-r--r-- 1 ahert 197609  293 Nov  6 21:50 dotnet-electronize.runtimeconfig.dev.json
-rw-r--r-- 1 ahert 197609  154 Nov  6 21:50 dotnet-electronize.runtimeconfig.json

What is in CsProj ?

    <OutputType>exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <AssemblyName>dotnet-electronize</AssemblyName>

see:
https://github.com/dotnet/cli/issues/6760

so either

  • you need to specify each target RID
  • run it using dotnet run ElectronNet.Cli\bin\${Build_Config}\${Target_Runtime}\dotnet-electronize.exe build win

I guess the second one seems to be the best but so far i get this :

C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp>dotnet run "..\ElectronNET.WebApp\bin\Debug\netcoreapp2.0\ElectronNET.WebApp.dll" build win
Using launch settings from C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\Properties\launchSettings.json...

Unhandled Exception: System.FormatException: Unrecognized argument format: '..\ElectronNET.WebApp\bin\Debug\netcoreapp2.0\ElectronNET.WebApp.dll'.
   at Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider.Load()
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at ElectronNET.WebApp.Program.BuildWebHost(String[] args) in C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\Program.cs:line 16
   at ElectronNET.WebApp.Program.Main(String[] args) in C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\Program.cs:line 11

it seems that the CLI tries to run the webapp .... WTF

Electron App events not firing

I've tried subscribing to BeforeQuit, Quitting, WillQuit, and WindowAllClosed. Regardless of the event, my code never fires when I close the Electron window.

            Electron.App.BeforeQuit += SaveOptions;
            Electron.App.Quitting += SaveOptions;
            Electron.App.WillQuit += SaveOptions;
            Electron.App.WindowAllClosed += SaveOptions;

Using version 0.0.7 on Windows 10.

ElectronNET.CLI does not contain an inclusive lower bound

This is my .csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="ElectronNET.API" Version="0.0.7" />
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
  </ItemGroup>

</Project>

My error:

NU1604: Project dependency ElectronNET.CLI does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.

What dependency do I have to upgrade? I do not understand

I follow readme installation guide and I got stuck when I added this piece of code to .csproj

<ItemGroup>
         <DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
</ItemGroup>

Thanks
Andrea

Target branch for Pull request

Hello,

I feel like i made a mistake with the previous PRs, on what branch should i do it ? master or develop ?
And you can close the issue once you answer it if i forget to

Error trying to restore packages through command console

dotnet restore
Restoring packages for C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Apps\Quantica.Web.Dashboard\Quantica.Web.Dashboard.csproj...
Restore completed in 11,91 ms for C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Apps\Quantica.Common.Models\Quantica.Common.Models.csproj.
Restore completed in 11,91 ms for C:\Users\MASTER\source\Workspaces\Quantica\Quantica\Quantica.Utilities.WebDavClient\Quantica.Utilities.WebDavClient.csproj.
Restore completed in 26,44 ms for C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Web\Quantica.Utilities.PdfToDocConverter\Quantica.Utilities.PdfToDocConverter.csproj.
Restore completed in 29,62 ms for C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Apps\Quantica.Common.DataAccess\Quantica.Common.DataAccess.csproj.
Restore completed in 69,59 ms for C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Apps\Quantica.Web.Dashboard\Quantica.Web.Dashboard.csproj.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/javascript/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/windowsphone/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/aspnet/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/silverlight/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/universal/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/lightswitch/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/wpf/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/winrt/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/windowsphone/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/silverlight/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/aspnet/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/universal/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/lightswitch/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/wpf/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/windows-forms/FindPackagesById()?id='ElectronNET.CLI''.
Response status code does not indicate success: 500 (Internal Server Error).
C:\Program Files\dotnet\sdk\2.0.3\NuGet.targets(102,5): error : Failed to retrieve information about 'ElectronNET.CLI' from remote source 'http://nuget.syncfusion.com/aspnet/FindPackagesById()?id='ElectronNET.CLI''. [C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Web\Quantica.Web.sln]
C:\Program Files\dotnet\sdk\2.0.3\NuGet.targets(102,5): error : Response status code does not indicate success: 500 (Internal Server Error). [C:\Users\MASTER\source\Workspaces\Quantica\Quantica.Web\Quantica.Web.sln]

ConfigurationBuilder in Startup.cs Causes Freeze

I have the following code with my Startup.cs to load configuration settings from appsettings.json:
IConfigurationRoot config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json").Build();

If I comment this code out and run dotnet electronize start, everthing runs normally. But with this code in place, when I run dotnet electronize start, package manager starts working through compiling but then hangs here in package manager:

Invoke electron.cmd - in dir: C:\Users\TEST\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules.bin
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Pete\Documents\Visual Studio 2017\Projects\TESTElecNet\TEST\TEST\obj\Host\node_modules.bin>electron.cmd "....\main.js"

stdout: Use Electron Port: 58008

Any ideas? Thanks for your help!

Unexpected error

I cloned this repo and used the build.cmd but I get the following error

dotnet restore
  Restore completed in 27,98 ms for D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.
  Restoring packages for D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj...
D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102: Unable to find package ElectronNET.API with version (>= 1.0.0)\r
D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102:   - Found 5 version(s) in nuget.org [ Nearest version: 0.0.5 ]\r
D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102:   - Found 0 version(s) in LocalDev
  Restore failed in 915,28 ms for D:\repositories\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.

Am I missing something?

Electron-Packer hangs

Electron Packer hangs... produces this output and then nothing happens:

PS D:\Code\GitHub\ElectronNET\ElectronNET.WebApp> dotnet electronize build osx
Build Electron Application...
Executing dotnet publish in this directory: D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop
Build ASP.NET Core App for osx-x64...
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp>dotnet publish -r osx-x64 --output "D:\Code\GitHub\ElectronNET\ElectronNET
.WebApp\obj\desktop\bin"
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

ElectronNET.WebApp -> D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\bin\Debug\netcoreapp2.0\osx-x64\ElectronNET.WebApp
.dll
ElectronNET.WebApp -> D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop\bin\

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp>
Start npm install...
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop>npm install
up to date in 1.289s

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop>
Start npm install electron-packager...
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop>npm install electron-packager --global
C:\Users\Robert\AppData\Roaming\npm\electron-packager -> C:\Users\Robert\AppData\Roaming\npm\node_modules\electron-packa
ger\cli.js

D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\obj\desktop>
Build Electron Desktop Application...
Executing electron magic in this directory: D:\Code\GitHub\ElectronNET\ElectronNET.WebApp\bin\desktop
Package Electron App for Platform darwin...

I found some similar problems in the electron issue list:

https://github.com/electron-userland/electron-packager/issues?q=is%3Aissue+hangs+is%3Aclosed

I saw this "error" also on appveyor yesterday. I'm not sure why, but I can't build the osx package on my windows device.

dotnet electronize build should not npm install

Building and Starting are currently much slower than necessary because every build and every start does a bunch of npm install like tasks that take much longer than the actual build.

The install steps should be handled by a restore or install command, so we don't need to wait for them to complete each time we build/start (or alternatively could we have rebuild/restart commands that are lighter-weight than the full build/start commands, if you want to keep the installs in place?)

Boilerplate now supports Hybrid Web Apps

Just as an FYI, I've significantly upgraded the Electron.NET-React-Typescript-MobX boilerplate to support both conventional Electron.NET apps and Hybrid Electron.NET apps where the app loads a normal web page from the web into an Electron WebView and grants it a whitelisted subset of native Electron functionality.

After building and running the app (being careful to follow the Readme because there was a publishing step I couldn't figure out how to automate), you can also check out the web-hosted (no native Electron capabilities) copy of the web page that gets loaded into the WebView in the Hybrid app example part of the sample app.

CLI: Include electron-builder configuration over the electron.manifest.json

The electron-builder supports a build configuration through the package.json.
We need to inlcude a default configuration in the electron.manifest.json, that based on the electron-builder build configuration.

Maybe we can include an assets folder with sample images? ("electronize init").

Information about the electron-builder configuration:
https://github.com/electron-userland/electron-builder/blob/master/docs/configuration/configuration.md

http://electron.rocks/electron-builder-explained/

Unable to clear cache

I'm unable to find the Electron.NET version of the clearCache method that should be exposed on the session object, in large part because I'm not able to find an Electron.NET implementation of the session object. My guess is this is mostly a "we need more hands manually exposing Electron methods in Electron.NET" sort of issue which I'm happy to help with but I'm not sure what to do about starting to stub in the missing session object.

For context, see
https://stackoverflow.com/questions/31446782/how-to-clear-the-cache-data-in-electronatom-shell
and
https://github.com/electron/electron/blob/70643a865be97a76b4604619921f5e4d047e41b5/docs/api/session.md

It looks to me like the clearCache method is added to the Javascript by way of the C++ WebFrame::BuildPrototype method in https://github.com/electron/electron/blob/c18afc924b7218555e529c0583773f58e1015cbe/atom/renderer/api/atom_api_web_frame.cc

For now, I'm manually clearing the on disk cache, which I found via https://stackoverflow.com/a/44675132/2827071

Exception after dotnet electronize start

Linux, fedora 27
$ dotnet --version

2.0.2

$ node --version

v8.6.0

$ which electron-packager

/usr/bin/electron-packager

$ touch ./Properties/launchSettings.json
$ dotnet electronize init

Adding our config file to your project...
Search your .csproj to add the needed electron.manifest.json...
Found your .csproj: /home/ilya/edn/edn.csproj - check for existing config or update it.
electron.manifest.json will be added to csproj.
electron.manifest.json added in csproj!
Search your .launchSettings to add our electron debug profile...
Debug profile added!
Everything done - happy electronizing!

$ dotnet electronize start

Start Electron Desktop Application...
Microsoft (R) Build Engine версии 15.4.8.50001 для .NET Core
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

  edn -> /home/ilya/edn/bin/Debug/netcoreapp2.0/win10-x64/edn.dll
  edn -> /home/ilya/edn/obj/Host/bin/

Start npm install...

> [email protected] install /home/ilya/edn/obj/Host/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

> [email protected] postinstall /home/ilya/edn/obj/Host/node_modules/electron
> node install.js

npm WARN [email protected] No description
npm WARN [email protected] No repository field.

added 195 packages in 5.628s

Invoke electron.cmd - in dir: /home/ilya/edn/obj/Host/node_modules/.bin
bash: строка 1: electron.cmd: команда не найдена

electron.cmd ? Is it a windows batch script?

Must electron packer be globally installed?

From this comment

You say

"Be aweare that dotnet electonize build require that the electron packer is installed globally via npm."
Using of global node modules is not very good idea. User should not be able to run commands as root.
For what purpose u use global node modules? Just because u can do it?
Can u just use node_modules folder from project?

Currently we assume that electron packer is installed globally and under Windows we even just install it globally.

From the electron packer page:

This module requires Node.js 4.0 or higher to run.

for use in npm scripts

npm install electron-packager --save-dev

for use from cli

npm install electron-packager -g

The question is: Is this needed? I'm not sure, maybe @GregorBiswanger knows more.

Why use string-based Ipc as opposed to controller webrequest?

I get that traditional electron apps need ipc to communicate between renderer and main, but the string-based Ipc message passing between processes feels unnecessary now that we have a full ASP.NET MVC site available with strongly-typed access to the underlying native desktop services.

Is there a reason why you wouldn't just make sync or async web requests to a controller method and have the controller method perform the relevant native task like opening a file save dialog or etc? Using controllers seems like a much more standard/robust/testable/etc way to perform the same communication tasks that old-school electron would do via string-based ipc message passing, or am I missing something fundamental here?

dotnet electronize start should abort if build fails

Hi guys, at least in VS Code if there is a compiler error during the dotnet electronize start's build step, there are still enough old built *.exe's lying around that the electron app will appear to launch and run, but it's running the last successful build not the current code. Definitely a recipe for burning a ton of extra time debugging the wrong exe, and trying to remember to either manually clean bin and obj before each build or manually doing an explicit build step (which spews less into the terminal window) before running start. Having start abort if the build fails would be a huge help.

Electronize Init SHOULD NOT depend on visual Studio file

So i followed the step but never open Visual Studio, Only CLI and VsCode

Repro step :

$/> mkdir PocElectronNet
$/> dotnet new sln PocElectronNet
$/> cd PocElectronNet
$/PocElectronNet> mkdir src
$/PocElectronNet> cd src
$/PocElectronNet/src> mkdir PocElectronNet
$/PocElectronNet/src>cd PocElectronNet
$/PocElectronNet/src/PocElectronNet>dotnet new mvc
$/PocElectronNet/src/PocElectronNet>dotnet sln ..\..\PocElectronNet.sln add PocElectronNet.csproj
  • Edited Program.cs
  • Edited Startup.cs
  • Edited csproj
$/PocElectronNet/src/PocElectronNet>dotnet restore
$/PocElectronNet/src/PocElectronNet>dotnet electronize init

Adding our config file to your project...
Search your .csproj to add the needed electron.manifest.json...
Found your .csproj: C:\Workspace\GitHub\TeBeCo\PocElectronNet\src\PocElectronNet\PocElectronNet.csproj - check for existing config or update it.
electron.manifest.json will be added to csproj.
electron.manifest.json added in csproj!
Search your .launchSettings to add our electron debug profile...

Unhandled Exception: System.AggregateException: One or more errors occurred. (Could not find a part of the path '$\PocElectronNet\src\PocElectronNet\Properties\launchSettings.json'.) ---> System.IO.DirectoryNotFoundException: Could not find a part of the path '$\PocElectronNet\src\PocElectronNet\Properties\launchSettings.json'.

the file not found is a file specific to Visual Studio (used by the Configuration ComboBox) allowing user to choose between IIS or Console etc ...
It the goal of Electron is to be XPlat, and Electron.Net too, that might be a got idea to get rid of dependencies over Visual Studio generated file right ?

What exactly is it? NET wrapper on top of Electron?

The homepage lacks the most important information... What is this exactly? I though tit was a .net alternative to Electron, turns out it's it's just Electron (JS-based yeah) with a web-app running on the background?

OSX processes fail to shut down on close

In both dev and packaged builds, closing the macOS application window kills the Host process but leaves the inner application process running as a high-cpu-consuming zombie that needs to be manually killed via the Activity Monitor.

Blank WebApp fails to start

Repo:
Create new ASP.NET Core 2.0 webapp
Install API & CLI Package
dotnet initialize init
dotnet initalize build

=> open ElectronNET.Host.exe

Nothing happens :(

Fork > dotnet restore > fail

Hi,

I Just tried yo fork and restore for a PR but here it how it went :

C:\Workspace\GitHub\TeBeCo>git clone https://github.com/tebeco/Electron.NET
Cloning into 'Electron.NET'...
remote: Counting objects: 1442, done.
remote: Compressing objects: 100% (315/315), done.
remote: Total 1442 (delta 268), reused 383 (delta 170), pack-reused 924
Receiving objects: 100% (1442/1442), 3.40 MiB | 4.55 MiB/s, done.
Resolving deltas: 100% (836/836), done.

C:\Workspace\GitHub\TeBeCo>cd Electron.NET
C:\Workspace\GitHub\TeBeCo\Electron.NET>code-insiders .
C:\Workspace\GitHub\TeBeCo\Electron.NET>dotnet restore
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj...
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj...
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\ElectronNET.API.csproj...
  Restoring packages for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj...
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\obj\ElectronNET.CLI.csproj.nuget.g.props.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\obj\ElectronNET.CLI.csproj.nuget.g.targets.
  Restore completed in 214.71 ms for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.CLI\ElectronNET.CLI.csproj.
  Restore completed in 253.32 ms for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\obj\ElectronNET.API.csproj.nuget.g.props.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\obj\ElectronNET.API.csproj.nuget.g.targets.
  Restore completed in 1.1 sec for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.API\ElectronNET.API.csproj.
C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102: Unable to find package ElectronNET.API with version (>= 1.0.0)\r [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]
C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102:   - Found 5 version(s) in nuget.org [ Nearest version: 0.0.5 ]\r [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]
C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj : error NU1102:   - Found 0 version(s) in LocalDev [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\obj\ElectronNET.WebApp.csproj.nuget.g.props.
  Generating MSBuild file C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\obj\ElectronNET.WebApp.csproj.nuget.g.targets.
  Restore failed in 2.01 sec for C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.WebApp\ElectronNET.WebApp.csproj.

ElectronNET.WebApp.csproj : error NU1102: Unable to find package ElectronNET.API with version (>= 1.0.0)\r [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]
ElectronNET.WebApp.csproj : error NU1102: - Found 5 version(s) in nuget.org [ Nearest version: 0.0.5 ]\r [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]
ElectronNET.WebApp.csproj : error NU1102: - Found 0 version(s) in LocalDev [C:\Workspace\GitHub\TeBeCo\Electron.NET\ElectronNET.sln]

Unable to resotre DotNetCLI Reference

I grabbed a copy of the Music Player application written by you.

when i run the command dotnet electronize init i get an error.

image

I have tried running dotnet restore prior to this. I have .Net Core 2.0 SDK installed and am using Visual Studio 2017.

Add commit hash to items added to `CHANGELOG.md`

Hey guys 👋

Thanks for maintaining a changelog. Perhaps it'd be better if you could also introduce the commit hash. That way we (and you, as the developer) can precisely see what notable changes have been made between each release.

Right now, I know you "skip npm install on start when node_modules directory already exists", but I can't see what was done to bring upon that change, code-wise.

Lots of bogus intellisense errors

I'm not sure whether I have something misconfigured or if this is a "known issue" but when I open any of the C# files in either Visual Studio or VS Code I get tons of intellisense errors, including complaints about things like System.String and void not being found (screenshot below). I've mainly been working in https://github.com/yoDon/Electron.NET-React-Typescript-MobX but I also get the same errors when looking at the main Electron.NET repo.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.