tfsbuild

TFS Build: Run a Powershell script as administrator

时间秒杀一切 提交于 2020-07-20 08:41:23
问题 I created a build definition for our nightly build server. After building the project (a windows service), I need to execute a Powershell script to install and start the service. So I added a build step to run the specific Powershell script. Then I installed a TFS Build Agent & Visual Studio at the (soon to be) nightly build server. After running the build script I got an 'exit code 5' which seems to be related to missing administratior permissions. If I start the script as admin on the

Assembly references won't resolve properly on our build server

﹥>﹥吖頭↗ 提交于 2020-07-18 09:02:38
问题 We code in C# using VS2008 SP1. We have a server that runs Team System Server 2008 which we use for source control, tasks etc. The server is also our build machine for Team Build . This has been working just fine for a long time. Untill now. We get these error messages when trying to build one of our projects that has a reference to one external assembly (this happens both via Team Build, and when logging on physically and doing a regular build via Visual Studio): C:\WINDOWS\Microsoft.NET

TFS Visual Studio Build task doesn't recognise macro DevEnvDir during post build event

荒凉一梦 提交于 2020-07-10 10:52:25
问题 I have a Build definition with a Visual Studio Build task. One of the projects has a Post Build Event command that use the macro $(DevEnvDir) but when TFS runs this task I get a compilation error because DevEnvDir is Undefined ... This doesn't happen when I build the solution through Visual Studio. 回答1: You have to define the DevEnvDir environment variable on your build server or add it into variables for build definition. The same posts: Team Build does not understand DevEnvDir Windows 7

Can't access ArtifactStagingDirectory variable in MSBuild

偶尔善良 提交于 2020-06-27 13:42:48
问题 During my build process I'm trying to copy a folder to the artifacts folder (\myserver\d$\TFBuild-Agent01\66\a). So I put this in the .csproj file: <Target Name="BeforeBuild"> <Exec Command="xcopy.exe Databases "$(Build.ArtifactStagingDirectory)\Databases" /i /e /y /d" /> </Target> This gets me Error MSB4184: The expression """.ArtifactStagingDirectory" cannot be evaluated. Method 'System.String.ArtifactStagingDirectory' not found* Everything I can find online says that $(Build

Can't access ArtifactStagingDirectory variable in MSBuild

こ雲淡風輕ζ 提交于 2020-06-27 13:42:28
问题 During my build process I'm trying to copy a folder to the artifacts folder (\myserver\d$\TFBuild-Agent01\66\a). So I put this in the .csproj file: <Target Name="BeforeBuild"> <Exec Command="xcopy.exe Databases "$(Build.ArtifactStagingDirectory)\Databases" /i /e /y /d" /> </Target> This gets me Error MSB4184: The expression """.ArtifactStagingDirectory" cannot be evaluated. Method 'System.String.ArtifactStagingDirectory' not found* Everything I can find online says that $(Build

How can I create build pipeline with Yaml using TFVC?

折月煮酒 提交于 2020-06-08 13:44:26
问题 Need to create a CICD pipeline with yaml using TFVC repository. 回答1: See this doc: Two types of repositories the pipelines supported. Until now, the YAML only support the repository of git type, and we haven't expand the feature and YAML grammer to support the YAML for TFVC repository. Since only one workaround is migrate your repository from TFVC to Git, but I could not sure whether it is feasible for you to do migrate, especially if your repository is a bit old. If repos is little old,

How can I create build pipeline with Yaml using TFVC?

六眼飞鱼酱① 提交于 2020-06-08 13:43:21
问题 Need to create a CICD pipeline with yaml using TFVC repository. 回答1: See this doc: Two types of repositories the pipelines supported. Until now, the YAML only support the repository of git type, and we haven't expand the feature and YAML grammer to support the YAML for TFVC repository. Since only one workaround is migrate your repository from TFVC to Git, but I could not sure whether it is feasible for you to do migrate, especially if your repository is a bit old. If repos is little old,