“不正确的格式”在TeamCity中构建Web部署项目时出现引用错误

几天前我开始设置TeamCity服务器,用于自动化测试和CI。我们主要做VB.net网络应用程序,直到现在,它已经检查出来并建立得很好。 当我尝试将实际部署添加到混合中时出现问题。我看到这篇文章: http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn 作为一个很好的指南在整个地方引用,所以我遵循了与设置Web部署项目和绑定TeamCity以运行它相关的步骤。基本上,它建议在VS2010中设置一个名为“Deployment”的新构建配置,该构建配置构建Web部署项目,然后在TC中创建以其为目标的构建配置。 问题是在TeamCity下运行时,Web部署项目将无法编译。常规构建工作正常,但是如果我将MSBuild设置为使用包含Web部署项目的构建配置,则它会在中途崩溃,并且会在尝试以不正确的格式加载System.Data.OracleClient程序集时出错。我认为这意味着32位/ 64位错误,特别是因为我的开发机器是一个32位的盒子,而构建服务器是64,但我不知道为什么会发生这种情况,特别是当常规构建工作时,我的项目中没有任何内容涉及使用Oracle数据库。 我在日志中看到有关于4.0框架缺少参考程序集的警告,所以我前往MS网站并下载了SDK,但这并未改变任何内容。在这一点上,我被卡住了,我在Stack Overflow上看不到任何看起来像这样的东西。我将附上下面的日志。我错过了一些简单的事吗?还有其他人遇到这样的问题吗?
[10:46:05]: Project "MyTools.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):
[10:46:05]:  [Project "MyTools.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target(s)):] Project "MyTools.sln" (Rebuild target(s)):
[10:46:05]:   [Project "MyTools.sln" (Rebuild target(s)):] Building solution configuration "Deployment|Any CPU".
[10:46:05]:   [Project "MyTools.sln" (Rebuild target(s)):] Project "MyTools.vbproj" (Rebuild target(s)):
[10:46:05]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Creating directory "objDeployment".
[10:46:05]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "MyLib.vbproj" (Clean target(s)):
[10:46:05]:     [Project "MyLib.vbproj" (Clean target(s)):] Creating directory "objDeployment".
[10:46:05]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "AutomatedFrontEndClasses.vbproj" (Clean target(s)):
[10:46:05]:     [Project "AutomatedFrontEndClasses.vbproj" (Clean target(s)):] Creating directory "objDeployment".
[10:46:05]:     [Project "AutomatedFrontEndClasses.vbproj" (Clean target(s)):] Project "MyLib.vbproj" (Clean target(s)):
[10:46:05]:    [Project "MyTools.vbproj" (Rebuild target(s)):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(847, 9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[10:46:05]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "MyLib.vbproj" (default targets):
[10:46:05]:     [Project "MyLib.vbproj" (default targets):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(847, 9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[10:46:05]:     [Project "MyLib.vbproj" (default targets):] Creating directory "binDeployment".
[10:46:09]:     [Project "MyLib.vbproj" (default targets):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics,System.Linq /optioncompare:Text /optionstrict+ /optioninfer- /nostdlib /rootnamespace:MyLib /sdkpath:C:WINDOWSMicrosoft.NETFrameworkv4.0.30319 /define:"CONFIG="Deployment",_MyType="Windows",PLATFORM="AnyCPU"" /link:D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinMicrosoft.Office.Interop.Word.dll /reference:C:WINDOWSassemblyGAC_MSILMicrosoft.SqlServer.ConnectionInfo10.0.0.0__89845dcd8080cc91Microsoft.SqlServer.ConnectionInfo.dll,C:WINDOWSassemblyGAC_MSILMicrosoft.SqlServer.Management.Sdk.Sfc10.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Management.Sdk.Sfc.dll,C:WINDOWSassemblyGAC_MSILMicrosoft.SqlServer.Smo10.0.0.0__89845dcd8080cc91Microsoft.SqlServer.Smo.dll,C:WINDOWSassemblyGAC_MSILMicrosoft.SqlServer.SqlEnum10.0.0.0__89845dcd8080cc91Microsoft.SqlServer.SqlEnum.dll,D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinNVelocity.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.ComponentModel.DataAnnotationsv4.0_4.0.0.0__31bf3856ad364e35System.ComponentModel.DataAnnotations.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.configurationv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.configuration.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Corev4.0_4.0.0.0__b77a5c561934e089System.Core.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.DataSetExtensionsv4.0_4.0.0.0__b77a5c561934e089System.Data.DataSetExtensions.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.Datav4.0_4.0.0.0__b77a5c561934e089System.Data.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.Linqv4.0_4.0.0.0__b77a5c561934e089System.Data.Linq.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.DirectoryServicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.DirectoryServices.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystemv4.0_4.0.0.0__b77a5c561934e089System.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Drawingv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Runtime.Serializationv4.0_4.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Securityv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Security.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.ServiceModelv4.0_4.0.0.0__b77a5c561934e089System.ServiceModel.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Webv4.0_4.0.0.0__31bf3856ad364e35System.ServiceModel.Web.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Abstractionsv4.0_4.0.0.0__31bf3856ad364e35System.Web.Abstractions.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.ApplicationServicesv4.0_4.0.0.0__31bf3856ad364e35System.Web.ApplicationServices.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.Webv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Extensionsv4.0_4.0.0.0__31bf3856ad364e35System.Web.Extensions.dll,"C:Program Files (x86)Microsoft ASP.NETASP.NET MVC 2AssembliesSystem.Web.Mvc.dll",C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Servicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.Services.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Windows.Formsv4.0_4.0.0.0__b77a5c561934e089System.Windows.Forms.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xmlv4.0_4.0.0.0__b77a5c561934e089System.Xml.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xml.Linqv4.0_4.0.0.0__b77a5c561934e089System.Xml.Linq.dll /out:objDeploymentMyLib.dll /resource:objDeploymentMyLib.Resources.resources /resource:objDeploymentMyLib.Logos.resources /resource:objDeploymentMyLib.Scorecard.resources /resource:objDeploymentMyLib.keys.resources /resource:ClientRockCountyQuarterlyPtsSummaryPdfPage1.xhtml.vm,MyLib.QuarterlyPtsSummaryPdfPage1.xhtml.vm /resource:ClientRockCountyQuarterlyPtsSummaryPdfPage1Apology.xhtml.vm,MyLib.QuarterlyPtsSummaryPdfPage1Apology.xhtml.vm /resource:ClientConvergysConvergysKyrkynChecklist.xhtml.vm,MyLib.ConvergysKyrkynChecklist.xhtml.vm /resource:ClientRockCountyQuarterlyPtsSummaryPdfPage2.xhtml.vm,MyLib.QuarterlyPtsSummaryPdfPage2.xhtml.vm /resource:ClientRockCountyRockCountyPtsFaxPdf.xhtml.vm,MyLib.RockCountyPtsFaxPdf.xhtml.vm /resource:ResourcesNVelocityWelcomeLetterReport.vm,MyLib.WelcomeLetterReport.vm /resource:ClientValleyViewValleyViewChecklistPdfResources.zip,MyLib.ValleyViewChecklistPdfResources.zip /resource:ClientSjchsSjchsChecklistPdfResources.zip,MyLib.SjchsChecklistPdfResources.zip /resource:ProvidersPcpAutoSelectPcpAutoSelectPdfResources.zip,MyLib.PcpAutoSelectPdfResources.zip /resource:ResourcesNatLimeKyrkynChecklistPdfResources.zip,MyLib.NatLimeKyrkynChecklistPdfResources.zip /resource:ResourcesConvergysKyrkynChecklistPdfResources.zip,MyLib.ConvergysKyrkynChecklistPdfResources.zip /resource:ResourcesKyrkynScorecardPdfResources.zip,MyLib.KyrkynScorecardPdfResources.zip /resource:ClientSjchsSjchsChecklistPage1.htm,MyLib.SjchsChecklistPage1.htm /resource:ClientSjchsSjchsChecklistPage2.htm,MyLib.SjchsChecklistPage2.htm /resource:ProvidersPcpAutoSelectPcpAutoSelectNotificationPage1.htm,MyLib.PcpAutoSelectNotificationPage1.htm /resource:ProvidersPcpAutoSelectPcpAutoSelectNotificationPage2.htm,MyLib.PcpAutoSelectNotificationPage2.htm /resource:ClientWatcoWatcoPCPForm.pdf,MyLib.WatcoPCPForm.pdf /resource:ClientWatcoWatco-Newsletter3.pdf,MyLib.Watco-Newsletter3.pdf /resource:ClientWAICUWAICU_Checklist_Back.pdf,MyLib.WAICU_Checklist_Back.pdf /resource:ClientWAICUWAICU_Checklist_FrontBG.pdf,MyLib.WAICU_Checklist_FrontBG.pdf /resource:ClientWAICUWAICU_FrontBG_ALL_YES.pdf,MyLib.WAICU_FrontBG_ALL_YES.pdf /resource:ClientWAICUWAICU_KYRKYNCard.pdf,MyLib.WAICU_KYRKYNCard.pdf /resource:ClientRockCountyRockCountyPtsFax.pdf,MyLib.RockCountyPtsFax.pdf /resource:ClientValleyViewUpdValleyViewChecklistReqs.sql,MyLib.UpdValleyViewChecklistReqs.sql /resource:ClientValleyViewSelValleyViewChecklistReqs.sql,MyLib.SelValleyViewChecklistReqs.sql /resource:ProvidersPcpAutoSelectSelPcpAutoSelectData.sql,MyLib.SelPcpAutoSelectData.sql /resource:ClientNatLimeSqlNatLimeKyrkynChecklistData.sql,MyLib.SqlNatLimeKyrkynChecklistData.sql /resource:ClientConvergysSqlConvergysKyrkynChecklistData.sql,MyLib.SqlConvergysKyrkynChecklistData.sql /resource:ClientSjchsSjchsEligTrackingChecklist.xml,MyLib.SjchsEligTrackingChecklist.xml /resource:ResourcesXMLSSN.xml,MyLib.SSN.xml /resource:ClientWAICUWAICU_CheckedBoxLarge.jpg,MyLib.WAICU_CheckedBoxLarge.jpg /resource:ClientWAICUWAICU_UncheckedBoxLarge.jpg,MyLib.WAICU_UncheckedBoxLarge.jpg /resource:ClientWAICUWAICU_WarningBox1.png,MyLib.WAICU_WarningBox1.png /resource:ResourcesXSLTBeautify.xslt,MyLib.Beautify.xslt /resource:ResourcesXSLTCompressWhitespace.xslt,MyLib.CompressWhitespace.xslt /target:library ...giant list of source files... "D:TeamCityBuildAgenttempbuildTmp.NETFramework,Version=v4.0.AssemblyAttributes.vb"
[10:46:18]:     [Project "MyLib.vbproj" (default targets):] MyLib -> D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinDeploymentMyLib.dll
[10:46:18]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "AutomatedFrontEndClasses.vbproj" (default targets):
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(847, 9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Creating directory "binDeployment".
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Project "MyLib.vbproj" (default targets):
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Project "MyLib.vbproj" (GetNativeManifest target(s)):
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Processing resource file "My ProjectResources.resx" into "objDeploymentAutomatedFrontEndClasses.Resources.resources".
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
[10:46:18]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics,System.Linq,System.Xml.Linq /optioncompare:Binary /optionexplicit+ /optionstrict:custom /optioninfer+ /nostdlib /rootnamespace:AutomatedFrontEndClasses /sdkpath:C:WINDOWSMicrosoft.NETFrameworkv4.0.30319 /define:"CONFIG="Deployment",_MyType="Windows",PLATFORM="AnyCPU"" /reference:D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesbinceTe.DynamicPDF.20.dll,D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinDeploymentMyLib.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Configurationv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Corev4.0_4.0.0.0__b77a5c561934e089System.Core.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.DataSetExtensionsv4.0_4.0.0.0__b77a5c561934e089System.Data.DataSetExtensions.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.Datav4.0_4.0.0.0__b77a5c561934e089System.Data.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.Linqv4.0_4.0.0.0__b77a5c561934e089System.Data.Linq.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystemv4.0_4.0.0.0__b77a5c561934e089System.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Runtime.Serializationv4.0_4.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xmlv4.0_4.0.0.0__b77a5c561934e089System.Xml.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xml.Linqv4.0_4.0.0.0__b77a5c561934e089System.Xml.Linq.dll /filealign:512 /out:objDeploymentAutomatedFrontEndClasses.dll /resource:objDeploymentAutomatedFrontEndClasses.Resources.resources /target:library ChecklistSJCHSChecklistGen.vb ChecklistValleyViewChecklistGen.vb Config.vb ExportedClassAttribute.vb ExportedMethodAttribute.vb ExportedParameterAttribute.vb MiscPcpAutoSelectLetterGen.vb "My ProjectAssemblyInfo.vb" "My ProjectApplication.Designer.vb" "My ProjectResources.Designer.vb" "My ProjectSettings.Designer.vb" PluginBaseClass.vb ScorecardScorecardGen.vb TestTestChecklistGen.vb "D:TeamCityBuildAgenttempbuildTmp.NETFramework,Version=v4.0.AssemblyAttributes.vb"
[10:46:19]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Project "MyLib.vbproj" (GetCopyToOutputDirectoryItems target(s)):
[10:46:19]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] Copying file from "objDeploymentAutomatedFrontEndClasses.dll" to "binDeploymentAutomatedFrontEndClasses.dll".
[10:46:19]:     [Project "AutomatedFrontEndClasses.vbproj" (default targets):] AutomatedFrontEndClasses -> D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesbinDeploymentAutomatedFrontEndClasses.dll
[10:46:19]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "MyLib.vbproj" (GetNativeManifest target(s)):
[10:46:19]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "AutomatedFrontEndClasses.vbproj" (GetNativeManifest target(s)):
[10:46:19]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Processing resource file "My ProjectResources.resx" into "objDeploymentMyTools.Resources.resources".
[10:46:19]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
[10:46:19]:    [Project "MyTools.vbproj" (Rebuild target(s)):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Linq,System.Xml.Linq,System.Diagnostics,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls /optioncompare:Binary /optionexplicit+ /optionstrict:custom /optioninfer+ /nostdlib /rootnamespace:MyTools /sdkpath:C:WINDOWSMicrosoft.NETFrameworkv4.0.30319 /define:"CONFIG="Deployment",_MyType="Custom",PLATFORM="AnyCPU"" /reference:D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesbinDeploymentAutomatedFrontEndClasses.dll,D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinDeploymentMyLib.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Configurationv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Corev4.0_4.0.0.0__b77a5c561934e089System.Core.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.DataSetExtensionsv4.0_4.0.0.0__b77a5c561934e089System.Data.DataSetExtensions.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.Datav4.0_4.0.0.0__b77a5c561934e089System.Data.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Data.Linqv4.0_4.0.0.0__b77a5c561934e089System.Data.Linq.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystemv4.0_4.0.0.0__b77a5c561934e089System.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Drawingv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.EnterpriseServicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Runtime.Serializationv4.0_4.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.ServiceModelv4.0_4.0.0.0__b77a5c561934e089System.ServiceModel.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.ApplicationServicesv4.0_4.0.0.0__31bf3856ad364e35System.Web.ApplicationServices.dll,C:WINDOWSMicrosoft.NetassemblyGAC_32System.Webv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.DynamicDatav4.0_4.0.0.0__31bf3856ad364e35System.Web.DynamicData.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Entityv4.0_4.0.0.0__b77a5c561934e089System.Web.Entity.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Extensionsv4.0_4.0.0.0__31bf3856ad364e35System.Web.Extensions.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Web.Servicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.Services.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xmlv4.0_4.0.0.0__b77a5c561934e089System.Xml.dll,C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xml.Linqv4.0_4.0.0.0__b77a5c561934e089System.Xml.Linq.dll /out:objDeploymentMyTools.dll /resource:objDeploymentMyTools.Resources.resources /target:library ...(list o' source files)... "D:TeamCityBuildAgenttempbuildTmp.NETFramework,Version=v4.0.AssemblyAttributes.vb"
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Copying file from "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesbinDeploymentAutomatedFrontEndClasses.dll" to "binAutomatedFrontEndClasses.dll".
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Copying file from "D:TeamCityBuildAgentworkc18407eaf8486b52MyLibMyLibbinDeploymentMyLib.dll" to "binMyLib.dll".
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "MyLib.vbproj" (GetCopyToOutputDirectoryItems target(s)):
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Project "AutomatedFrontEndClasses.vbproj" (GetCopyToOutputDirectoryItems target(s)):
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] Copying file from "objDeploymentMyTools.dll" to "binMyTools.dll".
[10:46:20]:    [Project "MyTools.vbproj" (Rebuild target(s)):] MyTools -> D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsbinMyTools.dll
[10:46:20]:   [Project "MyTools.sln" (Rebuild target(s)):] Project "AutomatedFrontEndClasses.vbproj" (Rebuild target(s)):
[10:46:20]:   [Project "MyTools.sln" (Rebuild target(s)):] Project "MyLib.vbproj" (Rebuild target(s)):
[10:46:20]:   [Project "MyTools.sln" (Rebuild target(s)):] Project "MyTools.vbproj_deploy.wdproj.metaproj" (Rebuild target(s)):
[10:46:20]:    [Project "MyTools.vbproj_deploy.wdproj.metaproj" (Rebuild target(s)):] Project "MyTools.vbproj" (Rebuild target(s)):
[10:46:20]:    [Project "MyTools.vbproj_deploy.wdproj.metaproj" (Rebuild target(s)):] Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):
[10:46:20]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Creating directory "objDeployment".
[10:46:20]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Project "MyTools.vbproj" (GetTargetPath target(s)):
[10:46:20]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Project "MyTools.vbproj" (GetNativeManifest target(s)):
[10:46:20]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] C:Program Files (x86)MSBuildMicrosoftWebDeploymentv10.0Microsoft.WebDeployment.targets(1129, 5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[10:46:22]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Copying file from "C:WINDOWSassemblyGAC_64System.Data.OracleClient2.0.0.0__b77a5c561934e089System.Data.OracleClient.dll" to "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsbinSystem.Data.OracleClient.dll".
[10:46:22]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Copying file from "C:WINDOWSassemblyGAC_64System.Transactions2.0.0.0__b77a5c561934e089System.Transactions.dll" to "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsbinSystem.Transactions.dll".
[10:46:22]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Copying file from "C:WINDOWSassemblyGAC_64System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll" to "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsbinSystem.EnterpriseServices.dll".
[10:46:22]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] Copying file from "C:WINDOWSassemblyGAC_64System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.Wrapper.dll" to "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsbinSystem.EnterpriseServices.Wrapper.dll".
[10:46:22]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] C:WINDOWSMicrosoft.NETFrameworkv4.0.30319aspnet_compiler.exe -v /MyTools.vbproj -p D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools -u -f -c objDeploymentTempBuildDir 
[10:46:26]:     [Project "MyTools.vbproj_deploy.wdproj" (Rebuild target(s)):] ASPNETCOMPILER error ASPCONFIG: Could not load file or assembly 'System.Data.OracleClient' or one of its dependencies. An attempt was made to load a program with an incorrect format.
[10:46:27]: MSBuild output:

[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target) (1) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln" (Rebuild target) (2) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyToolsMyTools.vbproj" (Rebuild target) (3) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesAutomatedFrontEndClasses.vbproj" (default target) (5:2) ->
[10:46:27]: (GetReferenceAssemblyPaths target) -> 
[10:46:27]:   C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsAutomatedFrontEndClassesAutomatedFrontEndClasses.vbproj]
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target) (1) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln" (Rebuild target) (2) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj.metaproj" (Rebuild target) (6) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj" (Rebuild target) (7) ->
[10:46:27]:   C:Program Files (x86)MSBuildMicrosoftWebDeploymentv10.0Microsoft.WebDeployment.targets(1129,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj]
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build target) (1) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.sln" (Rebuild target) (2) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj.metaproj" (Rebuild target) (6) ->
[10:46:27]: "D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj" (Rebuild target) (7) ->
[10:46:27]: (AspNetCompiler target) -> 
[10:46:27]:   ASPNETCOMPILER : error ASPCONFIG: Could not load file or assembly 'System.Data.OracleClient' or one of its dependencies. An attempt was made to load a program with an incorrect format. [D:TeamCityBuildAgentworkc18407eaf8486b52MyToolsMyTools.vbproj_deployMyTools.vbproj_deploy.wdproj]
[10:46:27]:     33 Warning(s)
[10:46:27]:     1 Error(s)
[10:46:27]: Time Elapsed 00:00:21.56
[10:46:27]: Publishing artifacts
[10:46:27]:  [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[10:46:27]:  [Publishing artifacts] Publishing files
[10:46:27]: Build finished
    
已邀请:
将项目从.Net4.0切换到.Net4.5后,我遇到了类似的错误。 TeamCity编译开始失败并出现以下错误:
SGEN An attempt was made to load an assembly with an incorrect format: C:WindowsMicrosoft.NetassemblyGAC_64System.Datav4.0_4.0.0.0__b77a5c561934e089System.Data.dll
最后,我通过手动创建以下文件夹并复制其中缺少的dll来解决它:     'c: Program Files(x86) Reference Assemblies Microsoft Framework.NETFramework v4.5 '     
事实证明,我在设置方面存在多个问题,但我认为我已经完成了它们。据我所知,所有这些都是在构建服务器上没有完整安装visual studio的结果。 基本上我缺少4.0框架的引用程序集,这导致MSBuild在GAC的某些程序集中进行复制,因此可以使用它们。我的项目是32位,但机器是64位,所以当它去获取程序集时,它会抓取64位的,导致“格式错误”错误。 通过安装完整的4.0 SDK修复此问题后,我发现构建仍然无法正常工作,因为Web部署目标的几个文件预期到位(因为它们与Visual Studio一起提供)实际上并不存在。我按照我在第三条评论中找到的建议: http://blogs.msdn.com/b/webdevtools/archive/2010/05/26/visual-studio-2010-web-deployment-projects-rtw-available-now.aspx 并将它们从我的开发机器上复制过来。 Web部署项目现在构建得很好。     
您只需要确保您拥有可能要定位的版本的.NET Frameworks SDK(也称为Targeting Pack,aks Developer Pack)。可以在.NET SDK和下载中找到它们并进行很好的枚举     

要回复问题请先登录注册