Electron.net: .NET Standard compatibility?

Created on 11 Jun 2019  路  1Comment  路  Source: ElectronNET/Electron.NET

Hi,

I'm currently studying how to use Electron.NET inside a Blazor application.

Following this tutorial I'm able to configure the appropriate dependencies in the server project (I'm using a client-side, ASP.NET-hosted solution) and use electronize to start the app and open the main window.

However, I can't use Electron.NET from the Client project. It must use netstandard2.0 as the target framework, and NuGet rejects the ElectronNET.API package when I try to add it:

C:\Users\miguel\Code\blazor\blazorclienthosted\blazorclienthosted.Client
位  dotnet add package ElectronNET.API --version 5.22.12
  Writing C:\Users\miguel\AppData\Local\Temp\tmpCBC1.tmp
info : Adding PackageReference for package 'ElectronNET.API' into project 'C:\Users\miguel\Code\blazor\blazorclienthosted\blazorclienthosted.Client\blazorclienthosted.Client.csproj'.
info : Restoring packages for C:\Users\miguel\Code\blazor\blazorclienthosted\blazorclienthosted.Client\blazorclienthosted.Client.csproj...
error: Package ElectronNET.API 5.22.12 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package ElectronNET.API 5.22.12 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)
error: Package 'ElectronNET.API' is incompatible with 'all' frameworks in project 'C:\Users\miguel\Code\blazor\blazorclienthosted\blazorclienthosted.Client\blazorclienthosted.Client.csproj'.

Is Electron.NET going to be available under .NET Standard 2.0 at some point?

Thanks!

Most helpful comment

Hi Miguel,

Electron.NET should be used inside the Server project since it is the startup project.

Best regards,
Maher

>All comments

Hi Miguel,

Electron.NET should be used inside the Server project since it is the startup project.

Best regards,
Maher

Was this page helpful?
0 / 5 - 0 ratings