I do not know whether SO is the best place for this problem, so if you know a better location, let me know, than I will move it there.
We had a properly running Azure Devops deployment pool running with an agent on our VPS. But my PAT expired so I installed a new agent (yes I know, I could have just extended the expire date of my PAT, but I failed to realize that at the time).
But when I install the agent through the script that DevOps provides I get the following error message:
System.IO.FileNotFoundException: Could not load file or assembly 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'. The system cannot find the file specified. File name: 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'
I have already tried:
- to update the MSBuild tool on the VPS.
- remove all agents from VPS
- remove all my PATs from DevOps and generate a new one while copying the script in DevOps
Edit 1 added system information
Windows Server 2012 R2 64-bit
Powershell engine version 4 0 -1 -1 (used this)
This version detection tool detects I have these versions of asp.net framework installed
.NET FW 2.0 SP 2 (CLR:2.0)
.NET FW 3.0 SP 2 (CLR:2.0)
.NET FW 3.5 SP 1 (CLR:2.0)
.NET FW 4.6.2 General release (CLR:4.0)
.NET FW 4.7 General release (CLR:4.0)
.NET FW 4.7.1 General release (CLR:4.0)
.NET FW 4.7.2 General release (CLR:4.0)
.NET FW 4.8 General release (CLR:4.0)
Edit 2 added bounty for whichever answer is correct or leads me to the correct solution