TFSWrapper.exe is not a valid win32 application

Jul 17, 2014 at 8:45 PM
Hello,

I'm trying to get the TFS Issue Tracker plugin working with TeamCity running on Windows 2003 SP2 access TFS 2013 and having an issues. When I test the connection from within TeamCity I get the following error:

Error: 'c:\TeamCity\bin..\temp\TeamCityTfsIssueTracker-1405453894965\TfsWrapper.exe /mode:client /server:http://tfs:8080/tfs/ /user:User /password:****** /command:GetById 12437' command failed. exception: Cannot run program "c:\TeamCity\bin..\temp\TeamCityTfsIssueTracker-1405453894965\TfsWrapper.exe": CreateProcess error=193, %1 is not a valid Win32 application

I know the EXE is a valid win32 application because I'm able to run it from the commadn line on my workstation without any issues. When I run it from a command prompt on the machine running TeamCity I get TFSWrapper.exe is not a valid win32 application and then Access is Denied. I've verified I have access to the executable.

I figure there is something missing from the machine or that it just doesn't support Windows 2003. Does anyone have any ideas?

Thanks,

Arron
Coordinator
Jul 17, 2014 at 10:53 PM
Can you find the right executable at the path indicated in the log? Are you able to run it? The path doesn't seem to be a valid one (\bin..)
Jul 18, 2014 at 12:21 PM
The executable is at C:\TeamCity\temp\TeamCityTfsIssueTracker-1405453894965. Since I am getting same error when running tfswrapper.exe from the command prompt, I assume its finding the executable when I run the test from within TeamCity.

When I navigate to the path of the EXE and run it from a command prompt I get TFSWrapper.exe is not a valid win32 application and then Access is Denied. I've verified I have access to the executable.

I've also tried running the executable on another Windows 2003 server and I get the same results. It runs correctly on my Windows 7 workstation.

Thanks for your help!

Arron
Coordinator
Jul 18, 2014 at 1:42 PM

How many bits is your operating system?

Jul 18, 2014 at 1:43 PM
The TeamCity server and my workstation are both 32 bit machines.

Thanks,
Arron
Coordinator
Jul 18, 2014 at 1:55 PM

Where did you get the plugin from? I suspect the executable might be 64bits, although I'm not sure why since it should be compiled as Any CPU on the build server.

Jul 18, 2014 at 2:01 PM
I downloaded from http://teamcity.jetbrains.com/viewType.html?buildTypeId=TeamCityTfsIssueTrackerIntegrationPlugin_TfsIssueTrackerPluginAgainstTeamCity8x

If it were a 64 bit EXE I should get the same error on my 32 bit workstation, but it runs with no errors.

Thanks,
Arron
Coordinator
Jul 18, 2014 at 2:22 PM
Most likely yes. I downloaded the executable from the build server and can run it on my Windows 7 64bits machine, I ran corflags on it and got this:

Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.

Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 0x1
ILONLY : 1
32BITREQ : 0
32BITPREF : 0
Signed : 0

so yes, it's Any CPU therefore that should not be the problem. You have .NET 4 installed, right?


Jul 18, 2014 at 2:56 PM
Add / Remove programs shows the following versions of .net

.net compact framework 1.0 SP3
.net compact framework 2.0
.net Framework 2.0 SP2
.net Framework 3.0 SP2
.net Framework 3.5 SP1
.net Framework 4 Client Profile
.net Framework 4 Extended
.net Framework 4 Multi-Targeting Pack

I ran a repair on the .net 4 framework, just in case there was something wrong with it, but I'm still getting the same error.

Thanks,
Arron
Coordinator
Jul 18, 2014 at 3:00 PM
I'm afraid I can't help you further, the file seems to be a perfectly valid executable so I guess you should research the cause in your Windows Server 2003 installations.

Simone


Jul 18, 2014 at 3:17 PM
Thanks for trying.

Does anyone else have this working on Windows 2003?

Is there a list of system requirements for the plugin?

Thanks,
Arron
Coordinator
Jul 18, 2014 at 3:19 PM
This issue was never reported, I'm not sure whether anyone is running it on Windows Server 2003, but odds are it's quite likely.

The plugin doesn't have any requirements besides the .NET framework.

Simone