This commit is contained in:
Robert Muehsig
2017-10-03 23:37:46 +02:00
parent ddea8d617c
commit 7c8c26479a
7 changed files with 79 additions and 6 deletions

View File

@@ -2,10 +2,14 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>..\artifacts</PackageOutputPath>
<PackageId>ElectronNET.API</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SocketIoClientDotNet" Version="1.0.3" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>dotnet-electronize</AssemblyName>
<PackageType>DotnetCliTool</PackageType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>..\artifacts</PackageOutputPath>
<PackageId>ElectronNET.CLI</PackageId>
<Version>1.0.0</Version>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,12 @@
using System;
namespace ElectronNET.CLI
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World from electronize xy");
}
}
}

View File

@@ -10,6 +10,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ElectronNET.API" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
@@ -19,9 +20,8 @@
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ElectronNET.API\ElectronNET.API.csproj" />
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
</ItemGroup>
</Project>

View File

@@ -1,11 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.WebApp", "ElectronNET.WebApp\ElectronNET.WebApp.csproj", "{7C048379-401C-4345-B5E7-BE232DEA8157}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.WebApp", "ElectronNET.WebApp\ElectronNET.WebApp.csproj", "{7C048379-401C-4345-B5E7-BE232DEA8157}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.API", "ElectronNET.API\ElectronNET.API.csproj", "{A78157BA-B754-45F1-969F-D6A513CA0E72}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.API", "ElectronNET.API\ElectronNET.API.csproj", "{A78157BA-B754-45F1-969F-D6A513CA0E72}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.CLI", "ElectronNET.CLI\ElectronNET.CLI.csproj", "{CE3EB0F2-DA39-427A-85D2-E00D660EBFDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,6 +23,10 @@ Global
{A78157BA-B754-45F1-969F-D6A513CA0E72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A78157BA-B754-45F1-969F-D6A513CA0E72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A78157BA-B754-45F1-969F-D6A513CA0E72}.Release|Any CPU.Build.0 = Release|Any CPU
{CE3EB0F2-DA39-427A-85D2-E00D660EBFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE3EB0F2-DA39-427A-85D2-E00D660EBFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE3EB0F2-DA39-427A-85D2-E00D660EBFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE3EB0F2-DA39-427A-85D2-E00D660EBFDE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

7
NuGet.config Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="LocalDev" value="artifacts\" />
</packageSources>
</configuration>

View File

@@ -1,2 +1,31 @@
# ElectronNET
Build cross platform desktop apps with .NET Core and ASP.NET NET Core.
## Dev Notes:
Currently there are two main projects and a "WebApp" that serves as a demo playground.
* ElectronNET.API: Defines the Electron / .NET API bridge
* ElectronNET.CLI: Responsible for the dotnet "electronize" tooling.
Both projects create their own nuget package. The resulting nuget packages are saved under "/artifacts".
__Currently__ the packages are just build with version 1.0.0. If you change something you need to clear the nuget cache under this directory (because the version number doesn't change):
%userprofile%\.nuget\packages
The solution contains a NuGet.config which points to the artifacts directory, so we can just use the produced NuGet packages without uploading to NuGet.org.
__ElectronNET.WebApp:__
The WebApp now has referenced the API NuGet package and via the .csproj reference the CLI:
<ItemGroup>
<DotNetCliToolReference Include="ElectronNET.CLI" Version="*" />
</ItemGroup>
## Dev Notes: Usage
Navigate to the WebApp folder and type this in a command prompt:
dotnet electronize