.net framework 4.0 starts from a USB drive

I need to put my C # application on a USB drive. It must be executed from there.

The problem is that it requires .NET Framework 4.0 to run (or possibly 3.5 - it uses OpenXML to open, modify and save .docx text documents, I'm not sure if it is compatible with 3.5).

Having a program on a USB drive means that there will be no installer, which in turn means that I cannot perform a prerequisite check, which usually says: “Do you need .net framework 4.0 ... to install now?”.

Is there a way to create a check in the application before the default error message from Microsoft and install the .NET Framework 4.0 from the installer to a USB drive (see Where can I download REAL Full.Net Framework 4 Standalone Installer? For links to .net framework installers )

I understand that this question is a duplicate of installing the .NET framework from a USB drive when necessary , however I do not understand this question and am viewing ClickOnce Deployment. I do not know how this can help me.

Thanks.

+6
source share
1 answer

You may have a startup script that will check if there is a valid .NET and install it, and then it will launch the application

vbscript to check if .net 2.0 is installed

+2
source

Source: https://habr.com/ru/post/901986/


All Articles