2013-06-27 5 views
15

Я пытаюсь заставить TeamCity создать простой веб-проект, который я создал. Проект был создан с использованием шаблона Visual Studio 2012 для веб-сайта. Я еще ничего не добавил к этому.Ошибка сборки компиляции TeamCity

Проект будет строить и работать нормально на локальной машине, он не будет построен, когда я использую бегун Visual Studio (sln).

я получаю следующие ошибки ... (извинения за долгое вырезания и вставки)

[MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "AspNet.ScriptManager.jQuery.UI.Combined". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.Core". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OAuth". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OAuth.Consumer". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OpenId". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.OpenId.RelyingParty". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DotNetOpenAuth.AspNet". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.AspNet.Membership.OpenAuth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.AspNet.FriendlyUrls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] 

[14:22:40][MSBuild output] 

[14:22:40][MSBuild output] "C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest.sln.teamcity" (TeamCity_Generated_Build target) (1) -> 

[14:22:40][MSBuild output] "C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest.sln" (Rebuild target) (2) -> 

[14:22:40][MSBuild output] "C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj" (Rebuild target) (3) -> 

[14:22:40][MSBuild output] (CoreCompile target) -> 

[14:22:40][MSBuild output] App_Start\AuthConfig.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] Account\Manage.aspx.cs(7,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] Account\OpenAuthProviders.ascx.cs(4,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] Account\Register.aspx.cs(8,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] Account\RegisterExternalLogin.aspx.cs(4,7): error CS0246: The type or namespace name 'DotNetOpenAuth' could not be found (are you missing a using directive or an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] Account\RegisterExternalLogin.aspx.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] App_Start\RouteConfig.cs(5,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] ViewSwitcher.ascx.cs(8,17): error CS0234: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\TeamCity\buildAgent\work\efb8dd7cf59a4861\TeamCityTest\TeamCityTest\TeamCityTest.csproj] 

[14:22:40][MSBuild output] 

[14:22:40][MSBuild output]  11 Warning(s) 

[14:22:40][MSBuild output]  8 Error(s) 

[14:22:40][MSBuild output] 

[14:22:40][MSBuild output] Time Elapsed 00:00:00.56 

эти ссылки кажутся всем быть NuGet работах, я пропускаю шаг здесь в TeamCity? Должен ли я использовать другого Runner?

ответ

15

Скорее всего, сборки не существуют там, где TeamCity ищет их. Я видел это, когда решение/зависимости были перемещены.

Вы можете попробовать открыть файл .csproj в текстовом редакторе и просмотреть значения <HintPath> для соответствующих сборок. Обычно это относительные пути, поэтому вам нужно убедиться, что они совпадают с структурой каталогов на вашем сервере CI. В идеале структура каталогов будет соответствовать в обеих средах.

Пример:

<ItemGroup> 
    <Reference Include="ServiceStack"> 
     <HintPath>..\packages\ServiceStack.3.9.56\lib\net35\ServiceStack.dll</HintPath> 
    </Reference> 
    ... 
</ItemGroup> 

Вы также можете проверить «очистить все файлы в директории кассе, прежде чем строить» поле до начала следующего билда просто чтобы быть уверенным, что улавливает изменения.

+1

Thankyou так много. Бог благословит Интернет. – Ronnie

2

Я думаю, что вам просто не хватает ваших пакетов nuget в вашей сборке, поскольку это, вероятно, будет в новом месте. То есть, если вы не проверили их в исходном контроле? вам нужно сказать teamcity, чтобы получить их.

Существует сборка Teamcity Nuget для сборки пакетов Teamcity nuget installer docs, или вы можете свернуть свою собственную задачу, чтобы сделать это.

0

Просто для записи, это могло произойти из-за создания зависимостей в вашем решении ...

например если при проверке папка «очищена», а ваши зависимости от сборки ошибочны, то dll не будет нигде.

Я испытал эту проблему после отказа от применения патча TeamCity, и проект не был настроен на очистку при проверке ... когда он не очищался, проблема с зависимостью сборки не была очевидна.

Результатом является очистка папки из-за ошибки ... и поэтому проблема с зависимостью сборки возникла на переднем плане.

4

У меня было это недавно.

Для меня две вещи помогли решить проблему.

1) Я переместил Проекты, которые находились во вложенных папках Solution, на корневой уровень. 2) Я проверил рабочую папку на сервере TeamCity, чтобы узнать, что было проверено на SVN (в моем случае), а также какие пакеты загружались/восстанавливались. Мне пришлось удалить/добавить пакеты, которые были пропущены, и для одного из них (Microsoft.OWIN.Hosting) это вообще не было загружено/восстановлено (я не думаю, что он мог найти пакет на Nuget), поэтому я удалить пакет, напрямую ссылаться на DLL в моем проекте и скопировать DLL в поле TC в том же месте. Действительно ужасно, но получил это здание.Я уверен, что есть лучший способ сделать это - возможно, с Внешними в SVN.

Надеюсь, это поможет.