我刚刚将EPPlus和EPPlus.Extensions NuGet包添加到我的解决方案中,以处理Excel文档的上传。一切都在当地工作得很好,但是当我与Team City一起建立时,我得到的是OfficeOpenXml' OfficeOpenXml'无法找到"错误。
我添加了一个NuGet安装程序步骤作为this post中提到的第一个构建步骤。 (所以这是此解决方案中的第一个NuGet包。)我选择了我的主解决方案文件作为Solution参数。 EPPlus安装在其中的项目中。但是,错误仍然存在。
我还在VS 2010上(将在接下来的一周左右进行评分)和.NET 4.0 Framework。
在Team City中,NuGet Packages选项卡列出了EPPlus(4.0.5)和EPPlus.Extensions(1.0.0.0)。
我可以在我的解决方案中找到DLL并将它们添加到GIT中,这确实有效,但我不相信这是正确的解决方案。
构建日志
[13:57:04]Updating sources: server side checkout (1s)
[13:57:04][Updating sources] Using vcs information from agent file: c1ee5fcf55d7468f.xml
[13:57:04][Updating sources] Building incremental patch for VCS root: MSHSAA BitBucketStaging; checkout rules: =>; revision: d925721c189f9eebd5c2b6ab6f1a66f3ea9d99a5 --> b114606aa4d6ddb9b47b46a1b5c998b64081ca10
[13:57:06][Updating sources] Repository sources transferred: 29.88 KB total
[13:57:06][Updating sources] Updating C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f
[13:57:06]Step 1/2: NuGet Installer (NuGet Installer) (1s)
[13:57:06][Step 1/2] scan: Searching for nuget.config files
[13:57:06][scan] Found packages folder: C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\packages
[13:57:06][scan] Found list of packages.config files: C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\packages\repositories.config
[13:57:06][scan] Scanning projects in solution file: C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\MSHSAA.sln
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\DataAccess.Linq\DataAccess.Linq.csproj
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\UI\UI.csproj
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web_deploy\Web_deploy.wdproj
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Controls\Controls.csproj
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Utility\Utility.csproj
[13:57:06][scan] Found project C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\MSHSAA_Mobile\MSHSAA_Mobile.csproj
[13:57:06][Step 1/2] restore: Restoring NuGet packages for MSHSAA.sln
[13:57:06][restore] NuGet command: C:\TeamCity\buildAgent\tools\NuGet.CommandLine.DEFAULT\tools\NuGet.exe restore C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\MSHSAA.sln
[13:57:06][restore] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script9137858174769788034.cmd
[13:57:06][restore] in directory: C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f
[13:57:07][restore] MSBuild auto-detection: using msbuild version '12.0' from 'C:\Program Files (x86)\MSBuild\12.0\bin'.
[13:57:07][restore] All packages listed in packages.config are already installed.
[13:57:07][restore] Process exited with code 0
[13:57:07]Step 2/2: Staging (Visual Studio (sln)) (24s)
[13:57:07][Step 2/2] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f /msbuildPath:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
[13:57:07][Step 2/2] in directory: C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f
[13:57:09][Step 2/2] MSHSAA.sln.teamcity: Build target: TeamCity_Generated_Build (22s)
[13:57:09][MSHSAA.sln.teamcity] TeamCity_Generated_Build (22s)
[13:57:09][TeamCity_Generated_Build] MSBuild (22s)
[13:57:09][MSBuild] MSHSAA.sln: Build target: Rebuild (21s)
[13:57:09][MSHSAA.sln] ValidateSolutionConfiguration
[13:57:09][MSHSAA.sln] Rebuild (21s)
[13:57:09][Rebuild] MSBuild (21s)
[13:57:09][MSBuild] Web.metaproj: Build target: Rebuild (9s)
[13:57:19][MSBuild] Web_deploy\Web_deploy.wdproj.metaproj: Build target: Rebuild (12s)
[13:57:19][Web_deploy\Web_deploy.wdproj.metaproj] Rebuild (12s)
[13:57:19][Rebuild] MSBuild (12s)
[13:57:19][MSBuild] Web_deploy\Web_deploy.wdproj: Build target: Rebuild (12s)
[13:57:19][Web_deploy\Web_deploy.wdproj] CleanWDP
[13:57:19][Web_deploy\Web_deploy.wdproj] ResolveProjectReferences
[13:57:19][Web_deploy\Web_deploy.wdproj] AfterResolveReferences
[13:57:19][Web_deploy\Web_deploy.wdproj] BeforeBuild
[13:57:19][Web_deploy\Web_deploy.wdproj] AspNetCompiler (12s)
[13:57:19][AspNetCompiler] AspNetCompiler (12s)
[13:57:19][AspNetCompiler] C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /Web -p C:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web -u -f -c obj\Staging\TempBuildDir
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(15, 0): warning CS0109: The member 'Modules_ClassNavigation.ActivityLevelGenderID' does not hide an inherited member. The new keyword is not required.
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(26, 0): warning CS0109: The member 'Modules_ClassNavigation.ActivityLevelGender' does not hide an inherited member. The new keyword is not required.
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(36, 0): warning CS0109: The member 'Modules_ClassNavigation.CurrentSchoolYear' does not hide an inherited member. The new keyword is not required.
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(48, 0): warning CS0109: The member 'Modules_ClassNavigation.CurrentClassNumber' does not hide an inherited member. The new keyword is not required.
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(60, 0): warning CS0109: The member 'Modules_ClassNavigation.CurrentDistrictNumber' does not hide an inherited member. The new keyword is not required.
[13:57:29][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\ClassNavigation.ascx.cs(581, 0): warning CS0162: Unreachable code detected
[13:57:30][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\CompetitionEdit.ascx.cs(91, 0): warning CS0472: The result of the expression is always 'false' since a value of type 'int' is never equal to 'null' of type 'int?'
[13:57:30][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Modules\CompetitionEdit.ascx.cs(110, 0): warning CS0472: The result of the expression is always 'false' since a value of type 'bool' is never equal to 'null' of type 'bool?'
[13:57:31][AspNetCompiler] c:\TeamCity\buildAgent\work\c1ee5fcf55d7468f\Web\Accounting\ExternalInvoices.aspx.cs(17, 0): error CS0246: The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?)
[13:57:31][Step 2/2] Process exited with code 1
[13:57:31][Step 2/2] MSBuild output
[13:57:31][Step 2/2] Step Staging (Visual Studio (sln)) failed
[13:57:31]Publishing artifacts
[13:57:31]Publishing internal artifacts
[13:57:31]Build finished