Skip to main content
Background Image
  1. Posts/

How to fix ".NET Framework 2.0 or later is required on this computer to run a Jenkins agent as a Windows service"

·211 words·1 min· ·
Xianpeng Shen
Author
Xianpeng Shen
Table of Contents

When I upgrade Jenkins 2.176.3 to Jenkins 2.235.1, my Windows agent can not connect with master successfully and outcome this warning message “.NET Framework 2.0 or later is required on this computer to run a Jenkins agent as a Windows service”.

It means I need to upgrade my Windows agent .NET Framework. Here are steps about how to upgrade .NET Framework to version 3.5.

Install .NET Framework 3.5
#

  1. Open Programs and Features

    Programs and Features

  2. Select .NET Framework 3.5 Features (In my screenshot, it had already installed)

    Features

Then try to reconnect the Jenkins agent, then it should back to work.

Install Jenkins agent service
#

If you can not found a Jenkins agent like me,

Jenkins agent service

You can try these steps to install Jenkins agent

# install Jenkins agent service
cd c:\\jenkins
.\jenkins-agent.exe install
net start jenkinsslave-C__agent

# unstall Jenkins agent service
sc delete jenkinsslave-C__agent

Manual install .NET Framework 3.5
#

Btw, if you could not install .NET Framework 3.5 successfully. you can try to install manually by this step

  1. Manually download microsoft-windows-netfx3-ondemand-package.cab

  2. Specify the path like below to install(note: the path is the directory where the file located)

    microsoft-windows-netfx3-ondemand-package.cab file path

In my case no need to reboot the Windows agent.

Hopefully, this also works for you. Let me know in case you have any comments.

Related

Jenkins Multibranch Pipeline
·405 words·2 mins
Discusses the use of Jenkins Multibranch Pipeline to manage multiple branches in a project, enabling parallel builds for pull requests and efficient code review processes.
Jenkins Linux agent configuration
·298 words·2 mins
Provides a step-by-step guide on how to configure a Jenkins Linux agent, including setting up the Java runtime, creating the node, and troubleshooting common issues.
Jenkins Windows agent configuration
·544 words·3 mins
Provides a step-by-step guide on how to configure a Jenkins Windows agent, including setting up the Java runtime, creating the node, and troubleshooting common issues.
Jenkins Top 3 best practice
·906 words·5 mins
Discusses three best practices for Jenkins: Configuration as Code, Shared Libraries, and Multi-Branch Pipeline, highlighting their benefits in terms of transparency, traceability, and self-service builds.
How to use JMeter to do Performance Testing
·491 words·3 mins
A guide on using JMeter for performance testing, including recording scripts, running tests in GUI and non-GUI modes, and integrating with Jenkins for automated testing.
Bitbucket Webhooks Configuration
·398 words·2 mins
How to configure Bitbucket webhooks to trigger Jenkins builds for multi-branch pipelines, ensuring that Jenkins can automatically respond to events like pull requests and branch updates.