Is there a way to determine the .NET Framework version from the command line?

前端 未结 7 999
北海茫月
北海茫月 2020-12-05 04:40

To troubleshoot an installation, sometimes I just want a quick answer to what version of .NET is installed.

Is there a way to determine the .NET Framework version on

7条回答
  •  粉色の甜心
    2020-12-05 05:20

    The following would detect if .net framework 3.5 is installed or not.. and if not installed will install it. Just run this on the command prompt.

    if exist "%WINDIR%\Microsoft.Net\Framework\v3.5" goto end start /wait .\Framework\dotnetfx.exe /q /norestart" :end 
    

    If you want to detect other versions just replace v3.5 with v2.0 or v1.0 as the case may be. Further if .net is not detected the installation of the .net framework would be done in silent mode i.e. no ui or user interaction.

提交回复
热议问题