在x64系统上安装多个ccnet
首先,要保证vsts插件在x64系统上可以正常工作,需要先:
corflags /32bit+ ccnet.exe
corflags /32bit+ ccservice.exe
corflags工具在C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin可以找到
否则应该看到如下的报错:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.VersionControl.Client, Version=9.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=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.GetModifications(IIntegrationResult from, IIntegrationResult to) at ThoughtWorks.CruiseControl.Core.Sourcecontrol.MultiSourceControl.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) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
相关知识::::
平台 | PE32/PE32+ | IL Only? | 32-Bit? |
Any CPU | PE32 | 1 | 0 |
Pure x86 | PE32 | 1 | 1 |
Pure x64 | PE32+ | 1 | 0 |
Mixed x86 | PE32 | 0 | 0 |
Mixed x64 | PE32+ | 0 | 0 |
Any CPU必然只能是IL Only,不能含有平台相关的非托管代码。而x86和AnyCPU一样,都是PE32文件,区别在于文件头上的32-Bit的标志设置为1,表明其只能以32-Bit运行。X64则必然是PE32+,可以包含64位非托管代码。
修改ccservice.exe.config文件的
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21235"> [ 默认值为21234 ]
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
然后使用sc命令安装成服务
sc create ccnet_daily binpath= "D:\ci-tools\cruisecontrol.net-1.4.4.83\server2\ccservice.exe" displayname= "ccnet_daily" depend= Tcpip start= auto
[SC] CreateService SUCCESS
浙公网安备 33010602011771号