NuGet packages for deploying Blazor server-side application #25457
-
Is it be possible to use NuGet packages, instead of installing .NET Core hosting bundle? I am developing a Blazor server-side application hosted on IIS. Currently, I have the .NET Core hosting bundle included in the installation package, in case the end-user does not have .NET Core installed. Would it be possible to replace it with NuGet packages? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Is your goal to reduce the size of your installation package by having it fetch the ASP.NET Core dependencies dynamically? If so I'm not aware of a recommended way to do that, since at the very least it would involve the end user having the .NET Core SDK installed so that NuGet could execute to fetch those packages, and that doesn't seem like something you'd want to rely on (you already said above "in case the end-user does not have .NET Core installed"). @Tratcher Not sure if this is in your area or not, but pinging you for any further expertise on how this relates to ASP.NET Core hosting :) |
Beta Was this translation helpful? Give feedback.
-
The hosting bundle installs a few different things including the runtime and an IIS native module. The native module is required in order to run AspNetCore in IIS. It's possible to exclude the runtime install and bundle that with the application in what's called a stand alone publish, but without the native module there's no point. If you wanted to host outside of IIS using Kestrel or HttpSys server then a standalone publish is viable. |
Beta Was this translation helpful? Give feedback.
See https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-hosting-bundle
The hosting bundle installs a few different things including the runtime and an IIS native module. The native module is required in order to run AspNetCore in IIS. It's possible to exclude the runtime install and bundle that with the application in what's called a stand alone publish, but without the native module there's no point.
If you wanted to host outside of IIS using Kestrel or HttpSys server then a standalone publish is viable.