Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity - Unmet requirements (DotNetFramework4.0_x86)

Tags:

.net

teamcity

I recenlty updated my TeamCity to the newest Version. (10.0 build 42002)

Since then the build agent can't build any of my projects.

The agent tells me the following:

Unmet requirements: DotNetFramework4.0_x86 exists 

To solve this problem I already did what was suggested in this stackoverflow question: TeamCity Agent Missing DotNetFramework4.0_x86, but not?

Sadly it doesn't work. So I looked at the log files but didn't find anything weird. Then I looked at the agent configuration paramets. I found this:

DotNetFramework4.6.01055_x64_Path    C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DotNetFramework4.6.01055_x86_Path    C:\Windows\Microsoft.NET\Framework\v4.0.30319
DotNetFramework4.6_x64               4.6.01055
DotNetFramework4.6_x64_Path          C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DotNetFramework4.6_x86               4.6.01055
DotNetFramework4.6_x86_Path          C:\Windows\Microsoft.NET\Framework\v4.0.30319

As you can see the .NET 4.0 Framework is mapped to DotNetFramework4.6. For me this seems to be the problem.

Has someone an idea what I can do to fix this?

like image 861
Shamshiel Avatar asked Aug 01 '16 09:08

Shamshiel


3 Answers

I used the work around from Greg B found here to solve the problem.

To get the agent back running you need to insert following lines to the config of the agent. (For example located here: C:\TeamCity\buildAgent\conf\buildAgent.properties)

DotNetFramework4.0_x86_Path=C\:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319
DotNetFramework4.0_x86=4.0.30319
DotNetFramework4.0_x64_Path=C\:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319
DotNetFramework4.0_x64=4.0.30319
  1. I stopped the agent in the windows services
  2. I pasted the parameters in the buildAgent.properties
  3. I started the agent in the windows services

As far as I understand JetBrains fixed a bug in TeamCity and because of this the .NET Frameworks will not be found anymore.

Quote from Evgeniy Koshkin

...in case your tool targeting .net 4.0 as its required runtime you actually should avoid installing .net 4.5(6) on your build agents. in that case TeamCity will report that .net 4.0 runtime is available. But i don't think this limitation of installed .net version makes sence in most of the cases. Before this bug was fixed TeamCity reports the fact '.net 4.0 was previously a runtime on this agent' as '.net 4.0 is a runtime on this agent'. It's a buggy behaviour in my point of view.

like image 163
Shamshiel Avatar answered Nov 01 '22 15:11

Shamshiel


Ok, looks like it was a bug with the xUnit test runner plugin. It's talked about on the TC issue tracker: https://youtrack.jetbrains.com/issue/TW-46352

The plugin author has already fixed it, you need to upgrade to v 1.1.2: https://github.com/carlpett/xUnit-TeamCity/releases/tag/1.1.2

You can upgrade by installing the .zip file according to: https://confluence.jetbrains.com/display/TCD10/Installing+Additional+Plugins

like image 7
bj0 Avatar answered Nov 01 '22 13:11

bj0


The .NETFramework 4.0 and 4.6 are using the same directory

DotNetFramework4.0_x64   4.0.30319
DotNetFramework4.0_x64_Path  C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DotNetFramework4.0_x86   4.0.30319
DotNetFramework4.0_x86_Path  C:\Windows\Microsoft.NET\Framework\v4.0.30319

DotNetFramework4.6_x64   4.6.01055
DotNetFramework4.6_x64_Path  C:\Windows\Microsoft.NET\Framework64\v4.0.30319
DotNetFramework4.6_x86   4.6.01055
DotNetFramework4.6_x86_Path  C:\Windows\Microsoft.NET\Framework\v4.0.30319

There is two possibles solutions for that:

  • Install the .NETFramework 4.0 ( https://www.microsoft.com/en-us/download/details.aspx?id=17851 ) There can be both .NET Framework 4.0 and 4.6 installed on your system.

  • Fix your agent requirement in your build configuration.

like image 1
Didier Aupest Avatar answered Nov 01 '22 14:11

Didier Aupest