Problem with plugin on win 2003 x64

Topics: Developer Forum, Project Management Forum, User Forum
Dec 20, 2007 at 2:41 PM
Hi,
try to use your library for comunicating with TFS 2005 within cc.net. I'm runnig on Win 2003 x64. But i have problem with ccnet.vsts.plugin.dll.
When I start cc.net, it throws me this exception:
(I have installed TS Client 2005)
2007-12-20 16:16:27,441 MZSR:INFO Project: 'MZSR' is first in queue: 'MZSR' and shall start integration.
2007-12-20 16:16:27,597 MZSR:ERROR INTERNAL ERROR: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
----------
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModificationsWithLogging(ISourceControl sc, IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()

=== Pre-bind state information ===
LOG: User = HEALTH\Administrator
LOG: DisplayName = Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/CruiseControl.NET/server/
LOG: Initial PrivatePath = NULL
Calling assembly : ccnet.vsts.plugin, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\CruiseControl.NET\server\ccnet.exe.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.TeamFoundation.VersionControl.Client, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Program Files (x86)/CruiseControl.NET/server/Microsoft.TeamFoundation.VersionControl.Client.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/CruiseControl.NET/server/Microsoft.TeamFoundation.VersionControl.Client/Microsoft.TeamFoundation.VersionControl.Client.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/CruiseControl.NET/server/Microsoft.TeamFoundation.VersionControl.Client.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/CruiseControl.NET/server/Microsoft.TeamFoundation.VersionControl.Client/Microsoft.TeamFoundation.VersionControl.Client.EXE.----
please, if you know where can be problem, can you write me to my email? radoslav.robes@gmail.com
Thank you very much.
Dec 20, 2007 at 3:31 PM
The TFS DLLs do not work in 64-bit mode, as they are 32-bit only. You need to run CCnet in a 32-bit app pool.
Developer
Dec 20, 2007 at 8:00 PM
Also, make sure you have the TeamExplorer client installed. You can find out more here:
Obtaining the Team Explorer Client
Feb 1, 2008 at 1:15 PM
K, easy question for some of you:

How do you run an service in a 32 bit application pool in WIndows 2003 Server? I can run an IIS worker thread in a 32 bit app pool, but I have never seen a service using a 32 bit application pool.
Feb 1, 2008 at 8:29 PM
If you're compiling the source, change the compilation from "Any CPU" to "x86".

If you're using an already existing binary, use corflags.exe to force a .NET executable to run as 32-bit. Note that if the binary is signed, using corflags.exe will cause the signature to become invalid, so you will have to disable strong name verification for the DLL(s) in question.
Mar 25, 2009 at 2:15 PM
The easiest way is to do as this thread does http://tfsccnetplugin.codeplex.com/Thread/View.aspx?ThreadId=37003 
Run CORFLAGS /32BIT+  on the executable in question. Works also on the service executable.