简体   繁体   中英

Silent installation of .NET framework 4.5

I need to perform a silent installation of .NET Framework 4.5, along with an ASP.NET Core api that runs as a service, because for this api to work, you need this version of the framework installed. Does anyone have an idea?

Thanks

You must provide the .net 4.5 framework installation as an .msi package if you want the server/user to install the framework on their computer. Otherwise they need to install it beforehand for your .net core api to work.

Unfortunately .net 4.5 does not allow you to do a "Self Contained" deployment package like .Net Core does.

If you are able to convert the functionality to pure .net core, then you could absolutely deploy a self contained package to run the APi and the user never needs to know how to install the proper framework for your application to work, obviously this mos likely won't be possible in some situations.

EDIT: You can either manually execute or create a quick console app to execute a powershell script to install the .net 4.5 framework.

This may work or get you on the right path. Instead of using a local path maybe you can pass in an http link or a shared drive elsewhere on your network. I only use powershell scripts sometimes so this may need a bit more research to meet your company architecture.

PS C:\Users\VPS1146858Admin\Downloads> Start-Process -FilePath "C:\Users\VPS1146858Admin\Downloads\dotNetFx45_Full_setup.exe" -ArgumentList "/q /norestart" -Wait

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM