Last active
August 27, 2019 04:23
-
-
Save bennlee/1a9c2093df3ac10235e07d260236b7e0 to your computer and use it in GitHub Desktop.
Revisions
-
bennlee revised this gist
Aug 27, 2019 . No changes.There are no files selected for viewing
-
bennlee revised this gist
Aug 27, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,6 @@ Task.Run(async () => await Electron.WindowManager.CreateWindowAsync()); ``` ## Electronize Init ``` dotnet electronize init ``` -
bennlee created this gist
Aug 27, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ # Electron.NET Quick Start --- ## 프로젝트 생성 원하는 디렉토리로 이동한 후에 터미널에 다음을 입력 > With MVC ``` dotnet new mvc ``` > With Razor ~~추후 업데이트 예정~~ ``` dotnet new webapp ``` ## ElectronNET.API NuGet Package 추가 ``` dotnet add package ElectronNet.API ``` ## DotNet Cli Tool 레퍼런스 추가 ~~왜 필요한지는 아직 의문 (electronize & dotnet electronize)~~ 프로젝트 디렉토리 내의 .csproj 파일을 연 후 다음을 추가 ``` <ItemGroup> <DotNetCliToolReference Include="ElectronNET.CLI" Version="0.0.9" /> </ItemGroup> ``` ## .NET Restore ``` dotnet restore ``` ## Program.cs 수정 WebHost builder chain에 Electron 사용하도록 추가 ``` WebHost.CreateDefaultBuilder(args) .UseElectron(args) .UseStartup<Startup>() .Build(); ``` ## Startup.cs 수정 Startup.cs의 Configure 함수 밑부분에 다음을 추가 (To open electron window on startup) ``` Task.Run(async () => await Electron.WindowManager.CreateWindowAsync()); ``` ## Electronize Init 다음을 터미널에 입력 ``` dotnet electronize init ``` ## 애플리케이션 실행 ``` dotnet electronize start ```