6/5/2018 - Since this was written a new default angular template has been released. I recommend cloning as the new template has not been tested with self contained executable implementation.
This POC was created so you could create an application which can be distributed to end users using web technology and run by simply clicking a EXE and navigating to the local url. It will be updated with additional features down the road including sqllite database with EntityFramework as the ORM.
Building requires node.js latest LTS and dotnetcore 2x latest sdk
Requires VSCode or VS2017+ (Optimized for VSCode)
THIS TEMPLATE IS BASED ON THE MICROSOFT SPA SERVICES AUTOGENERATED ANGULAR AND MVC PROJECT
If you wanted to build this yourself and not just fork my repo here is how I did it
- dotnet new angular
- npm install
- modify files mentioned below
- dotnet publish -c Release -r win10-x64
- Grab output files from bin\Release\netcoreapp2.0\win10-x64\publish
- Double Click the EXE or if on Mac Use mac commands
./vscode/launch.json
./Views/Home/Index.cshtml
./DotNetCore2StandAloneOutput.csproj (Added runtime identitifers and output type on line 8-9)
-
Full VS Code Debugger support for both C# and Angular Frontend code when launched using the ".Net+Browser" Profile
-
Support Hot Module Replacement when running in development builds but is not used in production (This was implemented using a quick if statement in the index.cshtml file to check if dev/prod)
PC Standalone Release
replace win10-x64 with win-x64 for Generic support for all W7+
- dotnet publish -c Release -r win10-x64
- cd bin\Release\netcoreapp2.0\win10-x64\publish
- run DotNetCore2StandAlone.exe
Mac Standalone Release
replace osx.10.11-x64 with osx-x64 for Generic support for all OSX 10.12+
- dotnet publish -c Release -r osx.10.11-x64
- cd bin/Release/netcoreapp2.0/osx.10.11-x64/publish
- chmod a+x DotNetCore2StandAlone
- ./DotNetCore2StandAlone
Linux Standalone Release (Generic and Untested)
- dotnet publish -c Release -r linux-x64
- cd bin/Release/netcoreapp2.0/linux-x64/publish
- chmod a+x DotNetCore2StandAlone
- ./DotNetCore2StandAlone
If you want to support additional specific build targets check out the following link: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog and add the build targets to the ./DotNetCore2StandAlone.csproj on Line 8
If you look in the documents folder you will see that there is a postman collection which you can import and do Create's reads and updates to the sqllite database using simple rest commands in postman. Angular UI Pieces are not yet built for this yet.