Detecting the. NET Framework version

Source: Internet
Author: User

Project, you want to create an ASP. NET project installation file, because the project relies on the. 3.5 SP1, it is necessary to detect if the environment meets the requirements in order to install the program

MOM found the detection scheme: each. NET version corresponding to the installation of the MSBuild.exe, can be run through the DOS command msbuild.exe-version view output version


The following is a project in which the build installer is used to detect the. NET Framework 3.5 SP1 commands,

@echo Offset Netver=0Set Netverstr=3.5ifExist%windir%\\framework\v3.5\msbuild.exe (%windir%\\framework\v3.5\msbuild.exe-version >Tmpver.txt for/F"skip=3 tokens=1,2,3,4 delims=."%%iinch(Tmpver.txt) Do(Set Netver=%%K Set Netverstr=%%i.%%j.%%k.%%l) del tmpver.txt) REM expression 3.5Minimum version number of SP1:3.5.30729.1if%netver% GEQ30729 (    Echo. NET Framework Version number%netverstr%EchoEnvironmental compliance requirements, installation procedures ...) Else(EchoPlease install the. Net Framework First3.5SP1) Pause

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.