2013-06-27 24 views
15

Sto cercando di convincere TeamCity a creare un semplice progetto Web che ho creato. Il progetto è stato creato utilizzando il modello di Visual Studio 2012 per un sito Web. Non ho ancora aggiunto nulla.Errore di compilazione del progetto di compilazione TeamCity

Il progetto verrà creato ed eseguito correttamente sul computer locale, non verrà generato quando utilizzo il conduttore di Visual Studio (sln).

Continuo a ricevere i seguenti errori ... (scuse per il lungo taglia e incolla)

[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 

questi riferimenti sembrano tutti essere NuGet Refs, mi sto perdendo un passo qui a TeamCity? Dovrei usare un Runner diverso?

risposta

15

È probabile che gli assembly non esistano dove TeamCity li sta cercando. Ho visto questo quando la soluzione/le dipendenze sono state spostate.

È possibile provare ad aprire il file .csproj in un editor di testo e rivedere i valori <HintPath> per gli assembly in questione. Questi sono in genere percorsi relativi, quindi è necessario assicurarsi che si allineino con la struttura di directory sul server CI. Idealmente, la struttura della directory corrisponderà in entrambi gli ambienti.

Esempio:

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

Si consiglia inoltre di controllare la "pulire tutti i file nella directory di checkout prima di costruire" scatola prima della successiva costruzione solo per essere sicuri che raccoglie le modifiche.

+1

Grazie mille. Dio benedica Internet. – Ronnie

2

Penso che manchino solo i pacchetti nuget nella tua build poichè probabilmente si troveranno in una nuova posizione. Cioè, a meno che tu non li abbia registrati al controllo del codice sorgente? devi dire a teamcity di prenderli.

C'è un passaggio di installazione di Teamcity Nuget per ottenere pacchetti Teamcity nuget installer docs oppure è possibile eseguire la propria attività per eseguire questa operazione.

0

Per la cronaca, questo potrebbe essere dovuto a costruire le dipendenze nella soluzione ...

esempio se al momento del checkout la cartella è 'pulita' e le dipendenze di compilazione sono sbagliate, le dll non saranno ovunque.

Ho riscontrato questo problema dopo un errore di applicazione di una patch da parte di TeamCity e il progetto non è stato impostato per la pulizia automatica al momento del pagamento ... quando non veniva pulito, il problema delle dipendenze non era evidente.

Risultato della pulizia della cartella a causa dell'errore ... e quindi il problema delle dipendenze di build è arrivato in primo piano.

4

L'ho avuto di recente.

Per me due cose hanno aiutato a risolvere il problema.

1) Ho spostato i progetti che erano in cartelle di soluzioni nidificate al livello principale. 2) Ho controllato la cartella di lavoro sul server TeamCity per vedere cosa veniva estratto da SVN (nel mio caso) e anche quali pacchetti venivano scaricati/ripristinati. Ho dovuto rimuovere/aggiungere i pacchetti che si stavano perdendo e per uno di essi (Microsoft.OWIN.Hosting) questo non veniva scaricato/ripristinato affatto (non penso che potesse trovare il pacchetto su Nuget) così ho avuto rimuovere il pacchetto, fare riferimento alla DLL esplicitamente nel mio progetto e copiare la DLL nella casella TC nella stessa posizione. Davvero orribile, ma ce l'ha fatta costruire.Sono sicuro che c'è un modo migliore per farlo - forse con Externals in SVN.

Spero che questo aiuti.