Chez TeamCity, nous avons toujours porté une attention particuliÚre à .NET, ses nombreux outils et frameworks de test. Dans cet article, nous voulons parler des mises à jour récentes de notre support .NET et partager un exemple de projet de démonstration qui les illustre.
Désormais, le support .NET dans TeamCity est implémenté avec un vaste ensemble de " runners " et de " fonctionnalités de construction " spécialisés . Les exécuteurs fournissent l'intégration de la version avec des logiciels tiers, et les fonctionnalités agissent comme des modules complémentaires fonctionnels à la construction.
Avant la version 2020.1, TeamCity fournissait les composants .NET suivants:
- MSBuild ï»żï»ż - runner avec prise en charge de MSBuild et Mono XBuild
- Visual Studio (SLN) - runner simulant l' IDE de Visual Studio (devenv) Ă l' aide de MSBuild
- Visual Studio 2003 - le mĂȘme que le runner prĂ©cĂ©dent, mais en tenant compte des spĂ©cificitĂ©s de Visual Studio 2003
- Tests Visual Studio - runner qui exécute les tests Visual Studio et MS
- .NET Process Runner - runner qui lance des applications .NET
- .NET CLI Runner â , TeamCity .NET Core CLI
- NUnit â , NUnit-
- NuGet â nuget.exe CLI Windows
- TeamCity NuGet
- TeamCity symbol server â
- Azure DevOps ( Team Foundation Server)
- Duplicates Finder (ReSharper) â
- Inspections (ReSharper) â JetBrains Resharper
- FxCop â FxCop
- JetBrains dotTrace â dotTrace Command-Line Profiler
- JetBrains dotMemory Unit â JetBrains dotMemory Unit
- 3D- Unity
TeamCity .NET, . , , , :
- .NET-
..
, .NET Core , Microsoft , .NET SDK. .NET 5 â .NET Core, .NET Framework, Xamarin Mono. 2020.1 TeamCity , , , .NET. . , .NET . :
, .NET, . .NET 5 Visual Studio Rider.
-
, .NET â .NET CLI. , .NET-. TeamCity . TeamCity -.
- .NET .NET :
|
|
|
TeamCity |
|
|
.NET Standard 1.2 |
|
|
NuGet |
|
.NET Standard 1.2 |
IoC |
|
NuGet |
|
.NET 5.0 |
|
|
|
|
.NET 5.0 |
|
|
Docker |
|
.NET 5.0 |
Web |
|
Docker |
|
.NET 4.8 WPF |
|
|
Windows |
|
UAP |
UWP- |
|
UWP |
|
.NET Standard 1.2 |
Xamarin |
|
Android |
|
Xamarin Android |
Android |
|
Android |
CI/CD-, -. TeamCity , TeamCity Kotlin DSL. , . , . , , DSL, ( ).
2 :
- Windows 10 x64 Pro 10.0.19041
- Visual Studio 2019 Pro 16.8.1
- Docker (Windows container) 19.03.13
- .NET SDK 5.0
- Ubuntu 16.04
- Docker 18.06.3
GitHub Maven, IntelliJ IDEA 2020.2.2 : , .. , DSL- Kotlin.
DSL- .NET TeamCity. , TeamCity VCS rootâ, DSL-. , Versioned Settings, âKotlinâ:
, TeamCity DSL- .
.NET : «Building» «Deployment». -.
, .NET - â Build Deploy. :
â , Docker NuGet:
, , .NET- - /p:key=value
. , - system.configuration=Release
, /p:configuration=Release
. system.
, TeamCity , . , , TeamCity .NET:
TeamCity | |||
configuration | Release | MSBuild-. | |
VersionPrefix | 1.0.0 | . | |
VersionSuffix | beta%build.number% | . | |
Build console and web | InvariantGlobalization | true | , . |
Build Windows desktop | PublishDir | ../bin/Clock.Desktop/win/ | . |
AppxPackageDir | ../bin/Clock.Desktop.Uwp/win/ | UWP . | |
Pack | Copyright | Copyright 2020 JetBrains | NuGet-. |
Title | TeamCity .NET sample | ||
RepositoryType | git | ||
RepositoryUrl | https://github.com/JetBrains/teamcity-dotnet-samples.git | ||
RepositoryBranch | refs/heads/master |
«Test on Windows Test on Linux»
Windows #1 Linux Docker- mcr.microsoft.com/dotnet/core/sdk:5.0, .NET. Linux Docker, UI :
Linux Docker- .NET SDK 5.0. Windows , Docker.
Clock.Tests .NET 5.0, .NET Core CLI test
. JetBrains dotCover JetBrains.dotCover.DotNetCliTool, TeamCity. DSL, TestBase Linux Windows.
«Build console and web for win-x64» «Build console and web for linux-x64»
TeamCity Linux Windows Clock.Console Clock.Web , . BuildConsoleAndWebBase, â BuildBase. , Projects , , outputDir. .NET 5.0, , .NET Core CLI publish
.
UI Linux, Clock.Console , Output directory:
Windows, Runtime, win-x64, Output directory bin/Clock.Console/win-x64.
Clock.Web Linux , , Output directory bin/Clock.Web/linux-x64. , TeamCity .
win-x64:
- bin/Clock.Console/win-x64/Clock.Console
- bin/Clock.Console/win-x64/Clock.Web
linux-x64:
- bin/Clock.Console/linux-x64/Clock.Console
- bin/Clock.Console/linux-x64/Clock.Web
«Build Windows desktop»
Windows MSBuild Visual Studio 2019 #1 «» Restore, Rebuild Publish :
- Clock.Desktop/Clock.Desktop.csproj
- Clock.Desktop.Uwp/Clock.Desktop.csproj
, PublishDir ( Clock.Desktop) AppxPackageDir ( Clock.Desktop.Uwp). .
«Build Android app»
Android, Windows MSBuild Visual Studio 2019, #1:
, MSBuild «» Publish «» SignAndroidPackage, Android-.
«Pack»
NuGet- .NET CLI pack
, â Clock Clock.IoC:
NuGet- , .., TeamCity â . , NuGet-, .
«Build»
TeamCity . , TeamCity- - :
«Deploy»
- Push image ⊠Linux Windows
- Push multi-arch image ⊠- Docker.
- Publish to NuGet NuGet TeamCity NuGet.
NuGet- , NuGet-. Clock.Console Docker :
docker pull nikolayp/clock-console
docker run -it --rm nikolayp/clock-console
Clock.Web:
docker pull nikolayp/clock-web
docker run -it --rm -p 5000:5000 nikolayp/clock-web
Microsoft .NET 5, . TeamCity , .NET .NET 5 .
, . .