klionhook.blogg.se

Teamcity versions
Teamcity versions













teamcity versions
  1. #Teamcity versions how to#
  2. #Teamcity versions full#
  3. #Teamcity versions code#
  4. #Teamcity versions windows#

I have Polish Windows so the properties are labeled Wersja pliku (it means File version) and Wersja produktu (it means Product version). Properties window shows version set by AssemblyFileVersion and AssemblyInformationalVersion. You've seen a proof of that rendered on HTML page, you can also check DLL files properties: The build artifacts contain properly versioned assemblies. RestoringĬ:\TeamCity\buildAgent\work\8c2a410f7087e36b\.NET\AssemblyInfoTest\AssemblyInfoTest\Properties\AssemblyInfo.csĬ:\TeamCity\buildAgent\work\8c2a410f7087e36b\.NET\AssemblyInfoTest\Core\Properties\AssemblyInfo.csĬ:\TeamCity\buildAgent\work\8c2a410f7087e36b\.NET\AssemblyInfoTest\DataAccess\Properties\AssemblyInfo.csĭon't worry, reverting takes place only in build agent work files. If you try to do so, you will get an error like this: It means that it cannot be used in setting AssemblyVersion attribute. I'm using Git so this is a long alphanumerical SHA-1 hash. Last attribute contains another TeamCity param:. You can also see the use of TeamCity built-in parameter named build.number. You can see that our Major and Minor parameters are used.

  • AssemblyInformationalVersion: %Major%.%Minor%.%build.number%.%%.
  • AssemblyFileVersion: %Major%.%Minor%.%build.number%.
  • AssemblyVersion: %Major%.%Minor%.%build.number%.
  • The next step is to add AssemblyInfo patcher build feature:

    teamcity versions

    These are meant to represent two initial segments of version number and should be set manually - it's your (technical/marketing?) decision whether to name your next version 1.9 or 2.0, right?

    #Teamcity versions code#

    I used TC to build code from Git repository checkout on my local drive.īefore setting up AssemblyInfo patcher, add two new build parameters: Minor and Major. I’ve used TeamCity 9.1.3 but don't worry if you have a bit older TC ( AssemblyInfo patcher feature exists for a while). NET application, so I will discuss only the steps relevant to versioning. Now, it's time for building the server config! I assume that you have some working knowledge about setting TeamCity build for.

    #Teamcity versions how to#

    To solve it, you would have to restore Nuget packages during build ( here’s some info on how to do it). The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' App_Start\BundleConfig.cs(2, 18): error CS0234: If packages folder is not committed, you can expect this type of error during build: Note: I’ve pushed all used Nuget packages to the repository – that takes some space in the repo and might be against the recommended way of using Git but it makes TeamCity setup easier.

    #Teamcity versions full#

    Ok, so we have our test application - the full code is here. The same kind of code is used in GetAssemblyInfo methods in SomeCoreClass and SomeDataAccessClass. You can get the number form AssemblyFileVersion attribute too - just check all the interesting stuff that GetVersionInfo method returns. Informational version (the one that can have strings) is taken with the help of FileVersionInfo class. NET and designated by AssemblyVersion attribute) is a part of assembly's FullName. You can see how the most important assembly version number (the one used by. ViewBag.WebAssemblyInfo = webAsseblyInfo ( " Full Name = \"\"",įileVersionInfo.GetVersionInfo( assembly.Location).ProductVersion) ViewBag.DataAccessAssemblyInfo = SomeDataAccessClass.GetAssemblyInfo() Īssembly assembly = Assembly.GetExecutingAssembly() ViewBag.CoreAssemblyInfo = SomeCoreClass.GetAssemblyInfo() NET assemblies that are produced by the solution (one is for main web app project and two others are for class libraries). Home/Index.cshtml view generated by VS was modified to present version information pulled from three. Two additional projects of Class Library type were added. My test application was created in Visual Studio Community 2013 by using ASP.NET Web Application / MVC project template (C#/.NET 4.5 ). Detailed description of the meaning of these attributes is outside the scope of this post but check this great SO answer if you want to know more. AssemblyFileVersion is used for file version as seen by Windows and AssemblyInformationalVersion is meant more for human consumption as it can contain strings (we will make use of it for holding Git commit hash). AssemblyVersion sets version number that is recognized by. We will also use another attribute: AssemblyInformationalVersion which is not added by default. It contains two attributes: AssemblyVersion and AssemblyFileVersion along with a comment that describes numbering pattern recommended by Microsoft. You can specify all the values or you can default the Revision and Build Numbers Version information for an assembly consists of the following four values:















    Teamcity versions