2013-06-27 7 views
15

Ich versuche, TeamCity ein einfaches Web-Projekt erstellen, die ich erstellt habe. Das Projekt wurde mithilfe der Visual Studio 2012-Vorlage für eine Website erstellt. Ich habe noch nichts hinzugefügt.TeamCity Build-Projekt Kompilierung Fehler

Das Projekt wird auf dem lokalen Computer erstellt und ausgeführt, es wird nicht erstellt, wenn ich den Visual Studio (SLN) Runner verwende.

ich die folgenden Fehler erhalten ... (Entschuldigung für die lange Ausschneiden und Einfügen)

[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 

diese Verweise auf alle NuGet Refs sein scheinen, bin ich dabei einen Schritt hier in Teamcity? Sollte ich einen anderen Runner verwenden?

Antwort

15

Es ist wahrscheinlich, dass die Baugruppen nicht existieren, wo TeamCity nach ihnen sucht. Ich habe das gesehen, wenn die Lösung/Abhängigkeiten verschoben wurden.

Sie können versuchen, Ihre .csproj-Datei in einem Texteditor zu öffnen und die Werte <HintPath> für die betreffenden Baugruppen zu überprüfen. Dies sind in der Regel relative Pfade, daher sollten Sie sicherstellen, dass sie mit der Verzeichnisstruktur auf Ihrem CI-Server übereinstimmen. Idealerweise wird die Verzeichnisstruktur in beiden Umgebungen übereinstimmen.

Beispiel:

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

Sie können auch Feld kurz vor dem nächsten Build „alle Dateien im Verzeichnis der Kasse vor Build reinigen“ das überprüfen, um sicherzustellen, dass es die Änderungen aufnimmt.

+1

Vielen Dank. Gott segne das Internet. – Ronnie

2

Ich denke, Sie haben nur Ihre Nugget-Pakete in Ihrem Build fehlt, wie es wahrscheinlich an einem neuen Ort sein wird. Das heißt, es sei denn, Sie haben sie in die Quellcodeverwaltung eingecheckt? Sie müssen Teamcity mitteilen, dass Sie sie erhalten sollen.

Es gibt einen TeamCity Nuget Installations-Build-Schritt für das Abrufen von Paketen Teamcity nuget installer docs, oder Sie können Ihre eigene Aufgabe rollen, um dies zu tun.

0

Nur für das Protokoll, das möglicherweise durch sein könnte Abhängigkeiten in Ihrer Lösung bauen ...

z.B. Wenn beim Checkout der Ordner "bereinigt" wird und die Build-Abhängigkeiten falsch sind, werden die DLLs nirgends sein.

Ich habe dieses Problem nach einem Fehler aufgetreten, ein Patch von TeamCity anzuwenden, und das Projekt wurde nicht auf sich selbst beim Auschecken zu bereinigen ... wenn es nicht gereinigt wurde, war das Build-Abhängigkeitsproblem nicht ersichtlich.

Ergebnis in dem Ordner, der aufgrund des Fehlers bereinigt wird ... und so kam das Buildabhängigkeitsproblem in den Vordergrund.

4

Ich hatte das vor kurzem.

Für mich haben zwei Dinge geholfen, das Problem zu lösen.

1) Ich habe Projekte, die in verschachtelten Solution-Ordnern waren, auf die Stammebene verschoben. 2) Ich habe den Arbeitsordner auf dem TeamCity-Server überprüft, um zu sehen, was aus SVN ausgecheckt wurde (in meinem Fall) und welche Pakete heruntergeladen/wiederhergestellt wurden. Ich musste die Pakete entfernen/hinzufügen, die verpasst wurden und für eines von ihnen (Microsoft.OWIN.Hosting) wurde das überhaupt nicht heruntergeladen/wiederhergestellt (ich glaube nicht, dass es das Paket auf Nuget finden konnte), also hatte ich Um das Paket zu entfernen, verweisen Sie in meinem Projekt explizit auf die DLL, und kopieren Sie die DLL an derselben Stelle in die TC-Box. Wirklich schrecklich, aber es hat gebaut.Ich bin mir sicher, dass es einen besseren Weg gibt, dies zu tun - vielleicht mit Externals in SVN.

Hoffe, das hilft.

Verwandte Themen