在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是既可以在32位下运行,也可以在64位下运行,而PE32+只能在64位下面运行。这里有一点需要澄清的是,普通的PE32文件,如果里面代码有非托管代码,那么只能以32位运行,不管是在32Windows还是64位的Windows。但是如果PE32中仅含有托管代码,那么在64Windows下面则可以以64位运行,因为CLR可以将托管代码编译为64Bit并运行,并且将其作为PE32+对待。
对应不同的平台的托管代码对应的CorFlags的结果是不一样的。
平台
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
Pure指纯托管程序,而Mixed指混合。

Any CPU必然只能是IL Only,不能含有平台相关的非托管代码。而x86AnyCPU一样,都是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

posted @ 2009-10-27 13:38  new 维生素C.net()  阅读(574)  评论(1)    收藏  举报