teamcity

Determining what process has a lock on a file

梦想的初衷 提交于 2019-12-04 08:46:26
I have a unit test that works fine locally but when uploaded to TeamCity build server fails with "The process cannot access the file because it is being used by another process." Before I do anything in the Test I check in the setup if the file exists and if so try to delete it. This fails with the same error message as above When wriitng the file, I close the writer then dispose of it which I believe should get rid of any resources. So I have a couple queries Has anyone had similar issues and manage to get around them How can find out programticall what process has selfishly locked the file!!

Force TeamCity to build on a specific agent

痴心易碎 提交于 2019-12-04 08:16:46
问题 Is it possible, without disabling all other connected agents, to force TeamCity to build on a specific agents machine? 回答1: Under Build Configuration Settings go to Agent Requirements and set an Explicit Requirement for the specific agent name: Parameter Name: system.agent.name Condition: equals Value: YOUR_SPECIFIC_AGENT_NAME 回答2: For one time run you can click on the 3 dots next to "Run" and define on what agent you want to run. For a long term configuration you should use the Agent

TeamCity GitHub Private Key Access Denied

风格不统一 提交于 2019-12-04 08:06:23
Does anyone know of a tutorial for using TeamCity with github with ssh private keys. I have tried to set up git hub to connect and I either get a authentication error or get access denied. I am running TeamCity on Windows 2003. I am running the build agent as a custom account. I am running the web server under the administrator account. I have create a key for the custom account and administrator account. I now get an error that: The connection test failed: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Documents and Settings\Administrator.ssh (Access is denied) If anyone has

Update parent version in a maven project's module

强颜欢笑 提交于 2019-12-04 08:02:31
I've a strange scenario where I have a project "Y" and it has a module "X" and some other modules as well. X is part of a project Y however it is not linked as a module of that project. Because of that, each time a newer version of Y is released someone needs to manually update the parent version in X. I need to update the Y project in such a way that: a)each time the Y project is released, the parent project version in X should be automatically updated by TeamCity (in a similar way as for other modules) b)X must not be a part of Y distribution c)Once deployed in TeamCity, it should not run

Microsoft Code Contracts and CI build server

泄露秘密 提交于 2019-12-04 07:31:45
问题 We are migrating to .NET 4 and very interested in implementing new Design By Contract capabilities. As we know Code Contract engine requires installation of Code Contract addin and VS Ultimate or Premium (for static checking). Here is my questions: Can I use code contract rewriting without installing VS on CI build Server (TeamCity)? Is there any msbuild tasks to execute Contract checking? Do you use Code Contract's validation with CI builds? 回答1: Can I use code contract rewriting without

How to deploy after a build with TeamCity?

半世苍凉 提交于 2019-12-04 07:21:58
问题 I'm setting up TeamCity as my build server. I have my project set up, it is updating correctly from subversion, and building ok. So what's next? Ideally, I'd like to have it auto deploy to a test server, with a manual deploy to a live/staging server. What's the best way to go about this? Since I am using C#/ASP.Net, should I add a Web Deployment project to my solution? 回答1: This article explains how to call Microsoft's WebDeploy tool from TeamCity to deploy a web application to a remote web

Could not load file or assembly Antlr3.Runtime.dll

强颜欢笑 提交于 2019-12-04 06:29:34
We were using TeamCity for our Build server, .Net Framework 4 and ASP.NET MVC2 and NHibernate Our build server recently went offline thanks to Amazon EC2 issue recently. We are setting a new build server up. However, even though nothing changed recently in our codebase, Teamcity gives following error. ResGen error RG0000: Could not load referenced assembly "C:\TeamCity\buildAgent\work\1e7706dcd512f467\xxx\Lib\Antlr3.Runtime.dll". Caught a FileLoadException saying "Could not load file or assembly 'C:\TeamCity\buildAgent\work\1e7706dcd512f467\xxx\Lib\Antlr3.Runtime.dll' or one of its

MSBuild calling Powershell with credentials

一世执手 提交于 2019-12-04 06:28:09
问题 I'm trying to deploy a windows service using an MSBuild script that runs a Powershell command. The MSBuild script deploys the files I need and the PowerShell script will uninstall and reinstall the windows service using this command: Invoke-Command -ComputerName IPAddressHere -FilePath "C:\theScriptFileName.ps1" -credential "TheUserName" Using an IP address (which I need to because of different domains) I need to use credentials. The problem is that it prompts for a password, which won't work

MSBuild step in TeamCity considers app.config instead of web.config for ASP.NET WEB API project resulting in warning MSB3247

拥有回忆 提交于 2019-12-04 05:59:49
I have ASP.NET WEB API project with Web.conig file. When it builds in VS2015, no errors and no warnings are reported. However when I build this project on TeamCity using MSBuild build step, I get warning MSB3247: [ResolveAssemblyReferences] ResolveAssemblyReference [14:30:01] : [ResolveAssemblyReference] No way to resolve conflict between "protobuf-net, Version=2.0.0.602, Culture=neutral, PublicKeyToken=257b51d87d2e4d67" and "protobuf-net, Version=2.0.0.480, Culture=neutral, PublicKeyToken=257b51d87d2e4d67". Choosing "protobuf-net, Version=2.0.0.602, Culture=neutral, PublicKeyToken

TeamCity: How tell MSBuild to take into account publish profile parameters?

泄露秘密 提交于 2019-12-04 05:54:59
I have TeamCity build configuration with MSBuild step, when i would like to compile my project with publish profile. My publish profile is located in MyProject\Properties\PublishProfiles\profile.pubxml . My profile.pubxml: <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>FileSystem</WebPublishMethod> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform> <SiteUrlToLaunchAfterPublish /> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <PrecompileBeforePublish