Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

VS2017 Deploying and Starting Minimal Kestrel SCD Application

$
0
0
Hello,

I am trying to create the smallest (only what I need) self-contained deployment possible for Asp.Net Core application using Kestrel that will run on a device like Raspberry Pi. However, I can not figure out how to do that in Visual Studio 2017 or by cmd line.

I am trying to mimick the node.js use case, where I start up an instance of node.js in any random folder with the least amount of modules to do the job. Using "dotnet new console", then adding Kestrel to .csproj (plus few other changes to serve "Hello World"), then calling "dotnet restore", then "dotnet build", creates a small folder (~367k) but depends on "dotnet run" to start. Doing a similar thing in Visual Studio 2017 results in a 17MB deployment folder (which is too big) that depends on VS2017 to start. I am hoping to achieve a size of less than ~2MB minus web application content and source code.

1) How do I deploy only the .Net Core files necessary (not the entire SDK) to the filesystem using Visual Studio 2017 or the cmd line?
a) or Is there a method for manually pruning the resulting deployment package or folder?

2) How do I start an SCD instance (NOT USING "dotnet run") within a folder (NOT USING IIS) from Visual Studio 2017 or the cmd line?

Thank you,

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>