1

We are building an app using .NET Core 6 Winforms. This app would be hosted on a network file share. If users need to access this app, they would need at least .NET desktop runtime to be installed on their machine.

My question: is it possible to install the .NET desktop runtime on the host machines in non-admin mode?

We have number of users who need to access this app and those users would not have the admin rights to install the needed desktop runtime on their machine so we are trying to create a utility which would install the .NET desktop runtime on their machine by using PowerShell but that's only possible if there is a way to do non-admin installation for the .NET Desktop runtime?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • [Publish self-contained](https://learn.microsoft.com/en-us/dotnet/core/deploying/?WT.mc_id=DT-MVP-5003235#publish-self-contained) + [ClickOnce deployment](https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-security-and-deployment?view=vs-2022&WT.mc_id=DT-MVP-5003235). – Reza Aghaei Jul 26 '22 at 07:58

1 Answers1

1

You can change your Deployment Mode to Self-Contained to bundle the runtime with your program. Note that this option will only appear if the Target runtime is not Portable. I don't think it's possible do do it any other way. This will also produce a lot of DLLS. If you'd like to only produce one large EXE you can use Single-file mode.

Elijah
  • 57
  • 6
  • We did tried using Self-Contained deployment on network file share but the issue is for the first time it takes around 80-90 sec for the app to load which is really too slow. Is there a way too speed up the load time for the first load using Self Contained deployment? we are using forms in number of places in DotNet core 6 and trimming is not supported here. Is there any other option – Sunny Sharma Jul 26 '22 at 21:41
  • @SunnySharma Unfortunately without having administrator access to the client machines I don't believe there is. However usually when I use self-contained deployment it usually doesn't have a notable performance difference which leads me to believe there may be some other underlying issue – Elijah Jul 26 '22 at 22:44